skills_all/managing-cargo-dependencies/SKILL.md
Cargo.toml dependency management patterns for HASH workspace. Use when adding dependencies, managing workspace dependencies, organizing Cargo.toml sections, setting version pinning, configuring default features, or working with public dependencies.
npx skillsauth add activer007/ordinary-claude-skills managing-cargo-dependenciesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides comprehensive guidance on adding and managing dependencies in Cargo.toml files within the HASH repository's workspace structure.
Automatically activates when:
HASH uses a strict workspace dependency pattern:
✅ DO:
[workspace.dependencies]version = "1.0.0" = ^1.0.0)default-features = false for all dependencies unless specifically neededworkspace = true in package Cargo.tomlpublic = true for dependencies exposed in public API❌ DON'T:
= prefix (e.g., =1.0.0) in workspace rootdefault-features without considering impactpublic = true for dependencies exposed in public APIEvery package Cargo.toml must organize dependencies into these sections:
[dependencies]
# Public workspace dependencies
hash-graph-types = { workspace = true, public = true }
hashql-core = { workspace = true, public = true }
# Public third-party dependencies
serde = { workspace = true, public = true, features = ["derive"] }
tokio = { workspace = true, public = true }
# Private workspace dependencies
error-stack = { workspace = true }
hash-codec = { workspace = true }
# Private third-party dependencies
tracing = { workspace = true }
regex = { workspace = true }
Keep all 4 section comments even if a section is empty.
1.2.3workspace = true (+ public = true if needed)Choose the guide that matches your task:
Use when: Adding new dependencies to workspace root
Use when: Adding dependencies to a package Cargo.toml
public = trueUse when: Looking for real examples from HASH codebase
@local/codec@local/hashql/core# 1. Add to workspace root Cargo.toml
[workspace.dependencies]
my-crate = { version = "1.2.3", default-features = false }
# 2. Add to package Cargo.toml (appropriate section)
[dependencies]
# Private third-party dependencies
my-crate = { workspace = true }
# Use when the dependency appears in your public API
serde = { workspace = true, public = true, features = ["derive"] }
tokio = { workspace = true, public = true }
[dependencies]
serde = { workspace = true, optional = true, features = ["derive"] }
[features]
serde = ["dep:serde", "other-dep/serde"]
Skill Status: Production-ready following Anthropic best practices ✅ Line Count: < 150 (following 500-line rule) ✅ Progressive Disclosure: 3 detailed resource files ✅
tools
Generate typed TypeScript SDKs for AI agents to interact with MCP servers. Converts verbose JSON-RPC curl commands to clean function calls (docs.createDocument() vs curl). Auto-detects MCP tools from server modules, generates TypeScript types and client methods, creates runnable example scripts. Use when: building MCP-enabled applications, need typed programmatic access to MCP tools, want Claude Code to manage apps via scripts, eliminating manual JSON-RPC curl commands, validating MCP inputs/outputs, or creating reusable agent automation.
testing
Generate structured task lists from specs or requirements. IMPORTANT: After completing ANY spec via ExitSpecMode, ALWAYS ask the user: "Would you like me to generate a task list for this spec?" Use when user confirms or explicitly requests task generation from a plan/spec/PRD.
tools
Create compelling story-format summaries using UltraThink to find the best narrative framing. Support multiple formats - 3-part narrative, n-length with inline links, abridged 5-line, or comprehensive via Foundry MCP. USE WHEN user says 'create story explanation', 'narrative summary', 'explain as a story', or wants content in Daniel's conversational first-person voice.
testing
Navigate through the original three-world shamanic technology. Deploy when soul retrieval, power animal guidance, or journey between realms emerges. Deeply respectful of Tungus, Buryat, Yakut, Evenki traditions. Use for consciousness navigation, NOT cultural appropriation.