소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill fastapi-control-plane명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | fastapi-control-plane |
| description | >- Use when this capability is needed. |
You guide the design and implementation of catalyst-api, the FastAPI control plane running on ECS Fargate. You enforce async-first patterns, construct-scoped routing, and API-lifecycle discipline per Enterprise API Management (Weir, Ch 7: API lifecycle) and Platform Engineering for Architects (Korbiacher et al., Ch 6: developer self-service, auth, tenancy). For thin routers, SOLID boundaries, and maintainable handler cores, invoke @clean-python-code.
Router organization — one router module per domain, mounted under versioned prefixes:
services/catalyst-api/catalyst/
routers/
tenants.py # /v1/tenants/...
environments.py # /v1/tenants/{t}/environments/...
landing_zones.py # /v1/tenants/{t}/environments/{e}/landing-zones/...
projects.py # /v1/.../projects/...
applications.py # /v1/.../applications/...
deployments.py # /v1/.../deployments/...
services_catalog.py # /v1/.../services/...
health.py # /v1/health, /v1/openapi.json
models/
constructs.py # ConstructAddress, Tenant, Environment, ...
deployments.py # DeployRequest, DeployStatus, ...
common.py # PaginatedResponse, ErrorResponse, ...
middleware/
auth.py # IAM / OIDC token validation
trace.py # X-Ray trace_id + request_id injection
error_handler.py # Global exception → structured JSON
dependencies/
db.py # Aurora connection pool (asyncpg via aioboto3 IAM auth)
github.py # GitHub App client (httpx)
construct_scope.py # Extract + validate construct address from path
Construct-scoped paths — the construct hierarchy embeds in the URL:
/v1/tenants/{tenant_slug}
/v1/tenants/{tenant_slug}/environments/{env_slug}
/v1/tenants/{tenant_slug}/environments/{env_slug}/landing-zones/{lz_slug}
.../{lz_slug}/projects/{project_slug}/applications/{app_slug}
Use a shared ConstructScope dependency that parses the path params into a ConstructAddress pydantic model and validates the caller's permission at that scope level.
Pydantic v2 models — every request/response is typed:
from pydantic import BaseModel, Field, ConfigDict
class TenantCreate(BaseModel):
model_config = ConfigDict(strict=True)
slug: str = Field(..., pattern=r"^[a-z0-9-]{2,40}$")
display_name: str = Field(..., min_length=1, max_length=120)
owner_email: str # validated as email by a field_validator
class TenantResponse(BaseModel):
model_config = ConfigDict(from_attributes=True)
slug: str
display_name: str
created_at: datetime
construct_address: str # e.g. "pharmacy"
Per Enterprise API Management Ch 5 (CRUD service pattern): keep request models minimal (what the caller provides) and response models rich (what the system knows).
Auth middleware — two layers:
catalyst CLI; resolved to a principal with scoped permissions.ConstructScope dependency asserts the principal has the required verb (read, create, deploy, etc.) at the resolved construct level. Deny by default; 403 or 404 (hide existence) as appropriate.Per Platform Engineering for Architects Ch 6 (pp 207-217): authentication and tenancy are foundational — never optional, never deferred.
Structured error responses — all errors return consistent JSON:
class ErrorResponse(BaseModel):
detail: str
code: str # e.g. "ILLEGAL_TRANSITION", "CONSTRUCT_NOT_FOUND"
trace_id: str | None = None
request_id: str | None = None
# Register as exception handlers in main.py
@app.exception_handler(ConstructNotFoundError)
async def construct_not_found(request, exc):
return JSONResponse(status_code=404, content=ErrorResponse(...).model_dump())
Health and metadata endpoints:
GET /v1/health → {"status": "ok", "version": "...", "aurora": "connected"}
GET /v1/openapi.json → generated OpenAPI 3.1 spec
Health checks Aurora connectivity and returns degraded if the pool is exhausted. Per Enterprise API Management Ch 7 (Observe phase): observability starts at the health endpoint.
Pagination — cursor-based, not offset:
class PaginatedResponse(BaseModel, Generic[T]):
items: list[T]
next_cursor: str | None = None
total_count: int | None = None # only when cheap to compute
Per Enterprise API Management Ch 5 (payload pagination, p130): cursor pagination scales; offset does not.
Dependency injection — use FastAPI Depends() for:
Logging — structlog only, never print():
import structlog
logger = structlog.get_logger()
# In handlers:
logger.info("deployment_created", deployment_id=dep.id,
construct_address=str(scope.address), actor=principal.id)
Every log line includes trace_id and request_id (injected by middleware).
Design-first workflow — per Enterprise API Management Ch 7 (API lifecycle, pp 206-231):
mock and try (p217): stub endpoints return 501 with the expected response shape so consumers can develop in parallel./v1/...); add Sunset header when deprecating.When helping with catalyst-api:
ConfigDict, and example valuesAGENTS.md service inventoryrequests library — use httpx (async-first, modern TLS).print() — log via structlog.AGENTS.md §7.datetime.utcnow() — use datetime.now(UTC).Idempotency-Key header or ULID-based dedup).Source: Cloud-Byte-Consulting/Catalyst — distributed by TomeVault.