SKILL.md
Load context
Goal
Match the crate in front of you, not a generic tutorial.
Inputs / outputs
- In: project root of the user’s crate
- Out: Context Summary (template below). Confusion Block if two patterns conflict.
Reads / writes
- Read:
Cargo.toml,Cargo.lockif present (versions only),rust-toolchain.tomlif present,src/lib.rsorsrc/main.rs, one sibling module, one sibling test - Write: none
Approval
None. Read-only.
RULES — no exceptions
- Do not propose code or tests until the Context Summary is posted
- Do not read the whole repo —
Cargo.toml+ toolchain + one neighbor + its test - Cite real paths
- On two conflicting patterns, post a Confusion Block and wait — do not pick silently
Steps
- Name the layer in one line (lib API, bin/clap, async task, unsafe, workspace crate).
- Read
Cargo.toml: edition,rust-version, bins/libs, features, relevant deps. - Read
rust-toolchain.tomlor note “stable unspecified.” - Open one neighbor that already solves a similar problem, and its test (
src/…,tests/…, or#[cfg(test)]). - Post the summary. If two patterns conflict, stop with a Confusion Block — do not pick silently.
Validation
Summary cites real paths. No code in the same message unless the user already approved skipping this skill.
Output
### Context Summary
**Layer:** <lib | bin | workspace member | test | build.rs>
**Cargo:** edition=<…>; rust-version=<… or none>; bins/libs=<…>
**Deps that matter:** <name ver — why>
**Neighbor:** <path> — <one convention>
**Test neighbor:** <path> — <how they assert>
**Drift:** <none | spec vs code>
**Next:** <tdd | rust-essentials>
Confusion Block
### Confusion Block
**Conflict:** <path A> does X; <path B> does Y
**Options:** <A> | <B>
**Question:** which pattern should this change follow?
Wait for an explicit answer. Do not implement.
Pitfalls
| ❌ | ✅ |
|---|---|
Dump src/ |
one neighbor |
| Assume tokio/clap exist | read Cargo.toml |
| Start coding | summary first |
Integration
Always first on an existing crate. Successor: playbook tdd, then rust-essentials.