ark-sdk-development
Manages the type generation pipeline from K8s CRDs to TypeScript, ensuring consistency across SDK and API.
Install
mkdir -p .claude/skills/ark-sdk-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6786" && unzip -o skill.zip -d .claude/skills/ark-sdk-development && rm skill.zipInstalls to .claude/skills/ark-sdk-development
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Regenerate and debug types across the ARK stack (SDK, API, Dashboard). Use when fixing TypeScript type errors in ark-dashboard, updating types after CRD changes, regenerating types.ts from OpenAPI spec, debugging "Property does not exist on type" schema errors, or adding custom SDK functionality via overlays. Covers the full type pipeline from Kubernetes CRDs to TypeScript.Key capabilities
- →Regenerate SDK types from CRDs
- →Generate TypeScript types from OpenAPI
- →Debug schema naming collisions
- →Apply custom SDK overlays
How it works
The skill manages the type pipeline by converting Kubernetes CRDs to OpenAPI schemas, generating Python SDK code, and producing TypeScript types for the dashboard.
Inputs & outputs
When to use ark-sdk-development
- →Fixing TypeScript type errors
- →Updating types after CRD changes
- →Regenerating types.ts from OpenAPI
- →Debugging schema mismatches
About this skill
ARK SDK and Type Development
Type Generation Pipeline
Types flow through the ARK stack:
CRD YAML (ark/config/crd/)
↓ make ark-sdk-build (automatic)
ark-sdk Python types + overlay utilities
↓
ark-api Pydantic models (manual updates if exposing new fields)
↓ make ark-api-build → generates openapi.json
ark-dashboard TypeScript types
↓ npm run generate:api → generates types.ts
ark-sdk: Automatic Type Generation
CRD types are automatically generated from Kubernetes CRD YAML files.
make ark-sdk-build
This runs:
crd_to_openapi.py- converts CRDs to OpenAPI schemaopenapi-generator-cli- generates Python types from schema- Copies overlay files on top of generated code
- Builds wheel package
Adding Custom SDK Functionality (Overlays)
The lib/ark-sdk/gen_sdk/overlay/python/ark_sdk/ directory contains custom Python modules that are copied on top of generated code. This is how utilities like client.py, k8s.py, and executor.py are added.
To add custom SDK functionality:
- Add Python files to
lib/ark-sdk/gen_sdk/overlay/python/ark_sdk/ - Run
make ark-sdk-build
ark-api: Manual Model Updates
The ark-api has manually written Pydantic models in services/ark-api/ark-api/src/ark_api/models/.
When to update ark-api models:
- When exposing new CRD fields via the HTTP API
- When adding new API response types
make ark-api-build
This generates services/ark-api/openapi.json from FastAPI routes and Pydantic models.
Pydantic Model Naming (CRITICAL)
Pydantic model class names MUST be globally unique across all model files. When multiple files define classes with the same name (e.g., ConfigMapKeyRef, Header, ValueFrom), FastAPI generates non-deterministic OpenAPI schema names like ark_api__models__agents__Header-Input. These names depend on import order and cause CI failures when types.ts differs between environments.
Solution: Prefix class names with their domain context:
| File | Naming Pattern | Examples |
|---|---|---|
agents.py | Agent* | AgentHeader, AgentValueFrom, AgentParameter |
mcp_servers.py | MCPServer* | MCPServerHeader, MCPServerValueSource |
queries.py | Query* | QueryParameter, QueryLabelSelector |
models.py | Model* | ModelValueSource |
Safety net: generate_openapi.py fails if any schema name contains __models__, catching collisions at build time.
See: https://github.com/mckinsey/agents-at-scale-ark/issues/656
ark-dashboard: TypeScript Type Generation
cd services/ark-dashboard/ark-dashboard
cp ../../ark-api/openapi.json ../out/
npm run generate:api
npm run build # verify types compile
Debugging Type Errors
When you see:
Property 'SomeSchema' does not exist on type
- Regenerate types.ts from latest openapi.json
- Find the correct schema name:
grep "SomeSchema" services/ark-dashboard/ark-dashboard/lib/api/generated/types.ts - Update service files to use correct schema names
If you see schema names with __models__ pattern (e.g., ark_api__models__agents__Header-Input):
- This indicates a Pydantic model naming collision
- Fix by renaming the Python class to be unique (see naming convention above)
- Do NOT work around by using the
__models__name - fix the root cause
Key Files
| File | Purpose |
|---|---|
ark/config/crd/bases/*.yaml | Source of truth - Kubernetes CRDs |
lib/ark-sdk/gen_sdk/overlay/ | Custom SDK utilities (copied on top of generated) |
services/ark-api/ark-api/src/ark_api/models/ | Manually written Pydantic models |
services/ark-api/ark-api/generate_openapi.py | Generates openapi.json with collision safety net |
services/ark-api/openapi.json | Generated OpenAPI spec from FastAPI |
services/ark-dashboard/out/openapi.json | Copy used for dashboard type generation |
services/ark-dashboard/ark-dashboard/lib/api/generated/types.ts | Generated TypeScript types |
When not to use it
- →Modifying non-ARK stack services
- →Manual type definition without pipeline sync
Prerequisites
Limitations
- →Requires unique Pydantic model names
- →Limited to ARK stack components
How it compares
It automates the synchronization of types across the entire stack, preventing manual errors and schema collisions through a defined build pipeline.
Compared to similar skills
ark-sdk-development side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ark-sdk-development (this skill) | 1 | 4mo | Review | Advanced |
| react-component-patterns | 3 | 28d | No flags | Intermediate |
| typescript-pro | 3 | 4mo | No flags | Advanced |
| nx-generate | 1 | 6mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mckinsey
View all by mckinsey →You might also like
react-component-patterns
HoangNguyen0403
Modern React component architecture and composition patterns.
typescript-pro
sickn33
Master TypeScript with advanced types, generics, and strict type safety. Handles complex type systems, decorators, and enterprise-grade patterns. Use PROACTIVELY for TypeScript architecture, type inference optimization, or advanced typing patterns.
nx-generate
nrwl
Generate code using nx generators. USE WHEN scaffolding code or transforming existing code - for example creating libraries or applications, or anything else that is boilerplate code or automates repetitive tasks. ALWAYS use this first when generating code with Nx instead of calling MCP tools or running nx generate immediately.
generate-subsystem-skills
llama-farm
Generate specialized skills for each subsystem in the monorepo. Creates shared language skills and subsystem-specific checklists for high-quality AI code generation.
effect-patterns-domain-modeling
PaulJPhilp
Effect-TS patterns for Domain Modeling. Use when working with domain modeling in Effect-TS applications.
effect-patterns-getting-started
PaulJPhilp
Effect-TS patterns for Getting Started. Use when working with getting started in Effect-TS applications.