port-labs/port-skills

port-blueprints

Model a Port context lake data model using blueprints, defining identifiers, titles, icons, properties, relations, and calculation, mirror, or aggregation properties, then author them with the raw Port API.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/port-labs/port-skills --skill port-blueprints

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Port blueprints

A blueprint is Port's schema primitive. It defines a type of asset in the context lake (a service, a package, a cluster, anything), the properties that describe it, and how it relates to other blueprints. Every entity in Port's context lake is an instance of a blueprint, the same way a database row is an instance of a table schema.

Use this skill when

Use this skill to design or edit a Port data model: creating a new blueprint, adding or typing a property, relating two blueprints, or adding a calculation, mirror, or aggregation property. It is reference-only, built from the static blueprint JSON schema and the raw Port API, so it works without a live Port account or Port MCP server connected. Without credentials it still produces valid blueprint JSON the user can apply later.

Out of scope: workflows (port-workflows), scorecards (port-scorecards), integration mapping (port-integrations), the Terraform/Pulumi provider reference (port-terraform, pointed to in Step 6), and deciding what to model and how blueprints should relate at the data-model-design level (port-context-lake owns that; this skill is the JSON mechanics it points to).

Prerequisites

  • Go over the port-getting-started skill first if this is your first time

working with Port.

  • To apply changes without MCP: a CLIENT_ID/CLIENT_SECRET pair (...

menu > Credentials in the Port app), exchanged for a bearer token at POST https://api.port.io/v1/auth/access_token.

  • If Port's MCP server is connected, this skill can use it to read the

current blueprint (list_blueprints) and apply the result directly (upsert_blueprint) instead of you copying JSON in by hand; the raw API calls below always work as a fallback. Search search_port_knowledge_sources for anything this skill doesn't cover.

Step 1 - Check whether the blueprint already exists

Precondition: you have a bearer token. Action: GET /v1/blueprints/<identifier>. 200 means it exists, edit it instead of duplicating it. 404 means it's safe to create. Fallback: no credentials yet. Draft the JSON and tell the user to verify uniqueness before applying it.

Step 2 - Decide the blueprint's identity

Precondition: you know what real-world asset this blueprint represents. Action: pick an identifier (unique, ≤100 characters, immutable after creation), a human-readable title, and an icon from Port's built-in icon set. Fallback: if the asset isn't precisely named yet, ask, or default to a camelCase noun (microservice, cloudResource) and flag it as a guess.

Step 3 - Define properties

Precondition: you know what data this asset needs to carry. Action: for each field, add a typed entry under schema.properties and, if mandatory, its key to schema.required. See references/property-types.md for the full type system: string, number, boolean, array, object, string formats (url, email, user, team, date-time, timer, yaml, markdown), enum, and meta-properties. Fallback: if the data actually belongs to a different asset, use a relation (Step 4) instead of duplicating it.

Step 4 - Add relations if this asset connects to others

Precondition: entities of this blueprint need to reference entities of another blueprint (ownership, dependency, hierarchy). Action: add a relations entry pointing at the target blueprint's identifier. See references/relations.md for the single vs. many distinction and the required/many constraint. Fallback: if the target blueprint doesn't exist yet, create it first, relations require an existing target.

Step 5 - Add computed properties if useful

Precondition: a value can be derived from this blueprint's own properties, or from related entities, instead of being ingested directly. Action: use a calculation property (JQ over existing properties), a mirror property (pull a value from a related entity), or an aggregation property (count/sum/average across related entities). See references/calculation-properties.md. Fallback: if the source property doesn't exist yet, add it first.

Step 6 - Create or update the blueprint via the API

Precondition: you have a bearer token and a complete blueprint JSON body. Action: use the endpoints below. Prefer PATCH for additive changes to avoid clobbering unrelated fields.

OperationMethodPath
CreatePOST/v1/blueprints
Fully replacePUT/v1/blueprints/{identifier}
Update (additive)PATCH/v1/blueprints/{identifier}
ReadGET/v1/blueprints/{identifier}
DeleteDELETE/v1/blueprints/{identifier}
bash
curl -L -X POST 'https://api.port.io/v1/blueprints' \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H 'Content-Type: application/json' \
  --data @blueprint.json

Fallback: a 422 usually means required lists a property that isn't in properties, or a relation target that doesn't exist yet. Fix the JSON and retry, don't silently drop the failing field.

If the user's Port account is managed with Terraform or Pulumi instead of raw API calls, use the port-terraform skill, it owns that reference in depth and the blueprint JSON shape maps directly onto it.

Examples

Ready-to-apply templates:

Common pitfalls

SymptomCauseFix
422 on create/updaterequired references a missing property, or a relation target doesn't existCreate the target first; keep required in sync with properties
Property type change is rejected or corrupts dataProperty types are immutable after creationCreate a new property with the right type, migrate data, delete the old one
Relation rejected with many and required both truePort forbids that combinationA required relation must be single (many: false)
Calculation property returns nullJQ references a missing path, or a relation title (.relations.x.title) under persistent calculationTest the JQ against a real entity payload; use a mirror property for relation titles
New property invisible in the UI tableNew properties are hidden by default in table viewsToggle it on with Manage properties; this doesn't affect the API or ingested data

Quick reference

  • Blueprint top-level keys: identifier, title, description, icon,

schema (properties, required), calculationProperties, mirrorProperties, relations, ownership.

  • Property types: string, number, boolean, array, object, plus

string formats. Full list: references/property-types.md.

  • Relation shape: { "title", "target", "required", "many" }. Details:

references/relations.md.

  • Derived properties: calculation (JQ), mirror (path into a relation),

aggregation (count/sum/average/min/max/median). Details: references/calculation-properties.md.

  • Auth: POST /v1/auth/access_token with clientId/clientSecret.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
port-labs
커뮤니티

port-getting-started

Set up Port and connect it to your coding agent: sign up for a Port account, install Port's MCP server, and optionally the Port CLI. Use when asked to 'get started with Port', 'set up Port', 'connect Port MCP', 'install the Port MCP server', 'how do I use Port from Claude Code/Cursor/VS Code', or before using any other skill in this repo for the first time.

설치 수
1
GitHub Stars
3
업데이트
10월 12일
port-labs
커뮤니티

port-permissions

Configure Port's role-based access control: context lake (blueprint/entity) permissions (read, register, update, or delete entities, down to a single property or relation) and page/dashboard view/edit permissions. Use when asked to 'set up Port permissions', 'restrict who can edit an entity', 'only let the owning team modify this blueprint', 'add a dynamic read policy to a blueprint', 'control who can view a Port dashboard or catalog page', or 'why can this user see/edit something they shouldn't

설치 수
1
GitHub Stars
3
업데이트
10월 12일
port-labs
커뮤니티

port-skill-creator

Author a new Agent Skill for this repo (port-labs/port-skills): scaffold the skills/port- / directory, write valid frontmatter, structure the body as a short router into references/ and assets/, validate it, and regenerate the README index. Use when asked to create a new Port skill, add a skill to this repo, help me write a SKILL.md, contribute a skill, port an internal Port AI skill to this repo, or fix a skill that fails validate-skill.js.

설치 수
1
GitHub Stars
3
업데이트
10월 12일
port-labs
커뮤니티

port-context-lake

Design and build a Port context lake: a connected, semantically-rich data model of blueprints, relations, and mirror/aggregation properties that AI agents, scorecards, and workflows can query and act on, not just a plain software catalog. Use when asked to 'build a context lake', 'design a Port data model for AI agents', 'set up the engineering intelligence data model', 'connect services to teams and orgs in Port', 'model our org hierarchy in Port', or 'why can't Port AI answer questions about o

설치 수
1
GitHub Stars
3
업데이트
10월 12일