Loading...
Loading...
Define an entire Cargo workspace in code — connectors, models, plays, tools, agents, MCP servers, context, capacities, territories, segments, folders, files, workers, apps — and deploy it declaratively with `cargo-ai cdk` (init → types → plan → deploy), the way you'd manage cloud infra with Pulumi or the AWS CDK. Use when the user wants to manage Cargo resources as code: reproducibly, version-controlled, in git, from a template, or across environments. Routes to authoring/deploy/typing guides (Level 2), recipes (Level 2.5), and references. For one-off imperative operations (create one connector, read a model, run a workflow), use the matching capability skill instead.
npx skill4agent add getcargohq/cargo-skills cargo-cdkdefine*@cargo-ai/cdkcargo-ai cdk deploycargo.state.jsondefine*plandeploydestroyrefreshimportrollbackcargo-ai cdk typescargo-connectioncargo-storagecargo-aicargo-orchestrationcargo-contentcargo-hostingDeclarative (this skill) vs imperative (a capability skill).
cargo-ai <domain>cargocargo-ai cdk init <dir> scaffold a project from a template (blank | full)
│
cargo-ai cdk types generate per-workspace types for typed config (optional)
│
(author define* files) importing a .ts file IS registration — no manifest
│
cargo-ai cdk plan offline: compile the graph, diff against cargo.state.json
│
cargo-ai cdk deploy create/update resources in dependency order, write state
│
cargo-ai cdk destroy tear down resources recorded in statecargo-ai cdk refreshdeploy --refreshdeploy --prunecargo-ai cdk import <id> <uuid>cargo-ai cdk rollbackSKILL.mdguides/authoring-resources.mdguides/deploy-and-state.mdguides/typed-config.mdrecipes/*.mdreferences/resources.mdreferences/commands.mdcargo-ai cdkreferences/troubleshooting.mdreferences/examples/full-workspace.md| When the task involves… | Read this first | What it gives you |
|---|---|---|
Writing | | The builder catalog, the handle/ref model, secrets, and how workflow bodies compile. |
| | The deploy lifecycle, |
Typed config, | | What |
| A field/spec/output for a specific builder | | Every builder → spec fields → which ref each takes → outputs. |
| Exact command flags | | Every |
| A deploy error / footgun | | The known failure modes and fixes. |
| Recipe | Use when… |
|---|---|
| Standing up a new workspace from scratch ( |
| Adding a data source + a model sourced from it, wired by handle. |
| Composing a model + tool + agent (with |
| Bringing an already-live workspace under CDK management via |
| Deploying non-interactively from CI (token auth + committed state). |
cargo.state.jsoncargo-ai cdk import{hash, uuid, outputs}cdk init.cargo-ai/
cargo.state.lock
cargo.state.bak.json
cargo.state.audit.jsonlsecret("ENV_VAR")secret("HUBSPOT_API_KEY")${ENV_VAR}.uuiddefine*dataset: hubspottools: [enrich]xxRef("uuid")connectorRefmodelReffolderReftoolRefagentRef{ ref, …options }models: [{ ref: contacts, readOnly: true }]cargo-ai cdk types.cargo-ai/defineConnectordefineModelintegrations.*cdknpxcargo-aipackage.json.cargo-ai/cargo.state.json--dir <path>--yesdeploydestroy--yes../cargo/references/prerequisites.md@cargo-ai/cdkdefine*cargo-ai cdk initpackage.jsonnpm installcargo-ai cdkcargo-ai cdk --helpunknown commandnpm install -g @cargo-ai/cli@latestcargo-ai cdk --helpcargo-ai cdk <subcommand> --helpcargo-ai workspaceManagement report create../cargo-workspace-management/SKILL.md