From rust
ALWAYS invoke this skill when writing or fixing implementation code for Rust. NEVER write or repair Rust implementation code without this skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rust:coding-rustThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Invoke the `rust:standardizing-rust` skill before proceeding. If that skill is unavailable, report the missing skill and continue with the closest available workflow.
Invoke the rust:standardizing-rust skill before proceeding. If that skill is unavailable, report the missing skill and continue with the closest available workflow.
Invoke the rust:standardizing-rust-tests skill before proceeding. If that skill is unavailable, report the missing skill and continue with the closest available workflow.
<accessing_skill_files> When this skill is invoked, Claude Code provides the base directory in the loading message:
Base directory for this skill: {skill_dir}
Use this path to access skill files:
{skill_dir}/references/{skill_dir}/workflows/Do not search the product directory for skill files when the loading message already provides the base path. </accessing_skill_files>
<reference_loading>
Standards are pre-loaded above. After loading, check for spx/local/rust.md and spx/local/rust-tests.md at the repository root. Read each file that exists and apply each as repo-local routing to the product's governing specs and decisions. A local overlay supplements skill behavior; it does not declare product truth.
</reference_loading>
<quick_start>
/standardizing-rust, /standardizing-rust-tests, and repo-local Rust overlays when present.spec-tree:contextualizing before editing code.workflows/implementation.md for new work or workflows/remediation.md for review feedback./testing-rust when behavior changes require new or revised tests.cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test --all-targets.</quick_start>
<essential_principles>
Behavior comes from specs and tests. Existing code is reference material, not authority.
Prefer explicit ownership, typed errors, and narrow seams over framework-heavy indirection. Traits and function parameters are for real architectural boundaries, not for decoration.
No generated mocks as the default testing strategy. When a controlled implementation is needed, keep coupling to the real seam with a small hand-written recorder, harness, or trait implementation.
Do not declare work complete until the full validation sequence passes.
</essential_principles>
<repo_local_overlay>
After loading /standardizing-rust and /standardizing-rust-tests, check for spx/local/rust.md and spx/local/rust-tests.md at the repository root. Read each file that exists before discovery and implementation. Treat each as repo-local routing to the product's governing specs and decisions; a local overlay supplements skill behavior and does not declare product truth.
</repo_local_overlay>
<hierarchy_of_authority> Use guidance in this order:
README.md, docs/, and other product documentationCLAUDE.mdWhen documentation and code disagree, documentation wins. </hierarchy_of_authority>
<codebase_discovery> Before writing code, discover what already exists.
Read:
README.md, docs/, CLAUDE.md, and CONTRIBUTING.md when presentCargo.toml for crate layout, features, lints, and dependenciesrust-toolchain.toml when presentSearch for:
Before implementation, confirm:
</codebase_discovery>
<testing_methodology>
Invoke /testing-rust before adding or revising tests. If the change alters behavior and no test already proves that behavior, write or extend tests first.
Use /standardizing-rust-tests as the canonical source for filenames, evidence levels, controlled implementations, property tests, compile-fail evidence, fixture placement, and coverage expectations. Keep production code aligned with those constraints instead of re-declaring test policy here.
</testing_methodology>
<context_loading> If this work belongs to a spec-tree node:
spec-tree:contextualizing with the full pathIf the work is outside the spec tree, proceed with the provided requirements and repository context. </context_loading>
<reference_guides>
references/outcome-engineering-patterns.md -- Rust-native code patterns for seams, config, errors, and cleanupreferences/test-patterns.md -- debuggability-first Rust test organizationreferences/verification-checklist.md -- completion checks and validation commandsworkflows/implementation.md -- protocol for new implementation workworkflows/remediation.md -- protocol for fixing review feedback</reference_guides>
<success_criteria>
/standardizing-rust-tests was loaded before behavior-changing implementation work</success_criteria>
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub outcomeeng/plugins --plugin rust