Bake tasks for discovering and installing context files shipped by Cargo dependencies. It is the Rust counterpart to the Ruby agent-context gem.
Add the task library to the unpublished bake/ crate and regenerate its task links:
cargo bake --regenerate
cargo add --manifest-path bake/Cargo.toml bake-agent-context
cargo bake --regenerateInstall context and skills from all resolved dependencies:
cargo bake agent:context:installOther tasks:
cargo bake agent:context:list
cargo bake agent:context:list --package socketry-executor
cargo bake agent:context:show --package socketry-executor --file getting-started
cargo bake agent:context:install --package socketry-executorcargo bake agent:context:list --package CRATE marks skill documents with (skill). The list, show, and install tasks handle skills alongside ordinary context. cargo bake agent:context:install copies ordinary guidance to .agents/context/SELECTOR/ and maintains local Git exclusions for installed context and dependency skills. Browse the installed Markdown files or use the list/show commands to find relevant guides. Project-owned skills can be tracked under .agents/skills/.
Context documents marked with metadata.type: skill are installed only under .agents/skills/, along with their companion resources. Their installed names use the authored name, or default to <crate>-<filename>, and they are omitted from .agents/context/. Use agent:context:install --package CRATE to install both context and skills from one provider. Project-owned skills can live in .agents/skills/ and remain version controlled.
Add a top-level context/ directory to the crate and ensure Cargo packages it. When using an explicit include list in Cargo.toml, include context/**:
my-crate/
├── Cargo.toml
├── context/
│ └── getting-started.md
└── src/
Use descriptive filenames and focused Markdown guides so agents can find relevant guidance in .agents/context/SELECTOR/. Ordinary context files need no Markdown front matter. A context document can opt into skill installation with YAML front matter; see Using and Providing Context, which is installed as the bake-agent-context-usage skill.
This crate includes guides for its users and for other crate authors:
- Getting Started explains how to add and run the Bake tasks.
- Using and Providing Context describes dependency context and how to publish context from a crate.
- Agent Context explains how to organize package guidance and repository-only instructions.
- Agent Context Specification defines the language-agnostic context directory and installation conventions.
- Rust Context provides shared development guidance for Socketry's Rust crates.
Prepare a release with cargo bake cargo:version:patch (or minor, major, or bump --version X.Y.Z), then run cargo bake cargo:release and open a pull request. After review and merge, GitHub Actions publishes the release when the configured crates-io environment approves it. Follow the shared Releasing skill for the standard process.
See releases.md for the full release history.
- Use Cargo-selected dependency versions and generated task links in setup instructions.
- Adopt
socketry-project0.3.7 for shared project tasks and Markdown normalization. - Require the aggregate test and coverage result for pull request merges.
- Refresh dependency examples and repository-owned agent guidance.
- Require
socketry-markdown0.2.0 or newer for safe inline Markdown serialization.
Please open an issue or pull request on GitHub.
Read the architecture design for the current Ruby and Rust boundaries and the proposed alignment work.
Run cargo bake agent:context:install to install shared context and skills. Follow the repository's agent instructions, discover relevant Markdown guides under .agents/context/, and apply matching skills under .agents/skills/.
Installed SKILL.md front matter records metadata.type: skill and the resolved metadata.ecosystem, metadata.package, and metadata.version. Cargo refreshes reconcile skills within their selected ecosystem and package scope. A full refresh also removes skills from removed or empty providers. After resolving an installation error, rerun the command to refresh generated files.