Back to Skills

cargo-context

Inspect and edit the workspace's git-backed context repository (the GTM knowledge base of markdown/MDX files) and its runtime sandbox using the Cargo CLI. Use when the user wants to browse/read/write/edit context files, run a command in the sandbox, or inspect the context knowledge graph.

14stars3forksUpdated 7/16/2026

Security Assessment

Safe(100/100)
Security Score100/100

About cargo-context

Cargo-context lets an agent inspect and edit a workspace's git-backed context repository, the GTM knowledge base of markdown/MDX files, and its runtime sandbox using the Cargo CLI (cargo-ai). The context captures a workspace's go-to-market knowledge such as company narrative, ICPs, personas, plays, proof, and objections, and is read and written by both humans and agents. The skill solves the problem of browsing, reading, writing, and editing these typed context files and inspecting the derived knowledge graph in a controlled way.

The cargo-ai context domain has two subdomains. The runtime subdomain is a checked-out, executable copy of the context repo: cargo-ai context runtime browse lists entries, read (with optional --start-line and --end-line) reads files, write creates or overwrites a file, edit replaces an exact substring, and execute runs shell commands against the sandbox. Critically, write and edit push commits to the default branch immediately (there is no dry-run mode), while execute does not push, so its file changes are discarded, making it suitable for builds, tests, and inspection. Uploaded content files appear read-only under a .files/ directory outside the committed tree and are never pushed. The graph subdomain builds or loads the knowledge graph derived from every markdown/MDX file via cargo-ai context graph get. Because writes push immediately, the skill requires confirming the target workspace with cargo-ai whoami (checking workspace.uuid and workspace.name) before the first write or edit, and asks the user to disambiguate generic workspace names. New files should begin with a YAML frontmatter block setting title and description; frontmatter is not validated but affects graph indexing, and writes can fail with errors like repositoryNotFound, syncConflict, syncFailed, failedToWrite, or deniedPath.

The skill targets GTM and revenue teams and their agents maintaining a Cargo context repository. It requires @cargo-ai/cli (npm) and a Cargo account, authenticating via browser sign-in with --oauth or an API token. It advises editing context derived from sales-call analysis one change at a time with human review rather than batching, and points to companion skills for related tasks such as workspace file uploads and RAG attachments, plus reference files for conventions, response shapes, troubleshooting, and end-to-end recipes.

FAQ

What are the prerequisites for using cargo-context?

It requires the @cargo-ai/cli npm package and a Cargo account, with authentication via browser sign-in using --oauth or an API token. Verify the session with cargo-ai whoami before running commands.

Which commands push changes and which do not?

runtime write and runtime edit push commits to the default branch of the context repo immediately (they are not local-only), while runtime execute does not push, so file changes it makes stay in the sandbox and are discarded. Use execute for builds, tests, or inspection, not for committing edits.

Why must I confirm the workspace before writing?

Because writes push immediately and there is no dry-run mode, you must confirm the target workspace with cargo-ai whoami (checking workspace.uuid and workspace.name) before the first write or edit. If the workspace name is generic or ambiguous, the skill asks the user for the company name and canonical domain before writing.

What format should new context files use?

Every .md/.mdx file should begin with a YAML frontmatter block setting title and description. Frontmatter is not validated, so a file with missing or malformed frontmatter is still written and committed, but it indexes poorly in the knowledge graph (a missing title falls back to the filename).

How should edits derived from sales calls be applied?

One at a time with human review, not batched. Looping an agent over many calls tends to overweight the loudest signal and miss nuance; the lifecycle reference describes the call-refresh playbook.

All Files

9 files
references/conventions.md9.0 KB
View
references/troubleshooting.md5.6 KB
View
references/examples/authoring.md8.2 KB
View
skill-metadata.json1.3 KB
View
references/examples/graph-queries.md2.8 KB
View
references/examples/bootstrap-from-domain.md11.9 KB
View
SKILL.md16.0 KB
View
references/examples/lifecycle.md5.9 KB
View
references/response-shapes.md4.8 KB
View

Install cargo-context

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill