packages/sc-rust/skills/rust-best-practices/SKILL.md
Review Rust architecture plans, crate boundaries, and code for structural design-pattern compliance. Use when the task involves typestate, sealed traits, error contracts, wrapper/newtype design, object safety, interior mutability, or other type-system-driven Rust correctness patterns that go beyond general style guidance.
npx skillsauth add randlee/synaptic-canvas rust-best-practicesInstall 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 is the canonical source of truth for structural Rust pattern review in Synaptic Canvas. It complements rust-development by focusing on type-system-driven correctness, API-boundary design, and the lifecycle stage where each pattern should be enforced.
Use this skill for:
This skill does not cover service-runtime hardening such as timeouts, graceful shutdown, request IDs, retries, readiness probes, or backpressure. Those belong in rust-service-hardening.
Read these files in order:
patterns/practice-inventory.md — canonical practice ids, names, lifecycle stage, and review applicabilitypatterns/enforcement-strategy.md — enforcement heuristics, stage mapping, and review guidanceRead these additional pattern docs only when the practice under review requires them:
patterns/error-context-recovery-plan.mdpatterns/typestate-plan.mdpatterns/sealed-traits-plan.mdpatterns/newtype-zero-cost-plan.mdpatterns/deref-coercion-plan.mdpatterns/interior-mutability-plan.mdpatterns/infallible-plan.mdpatterns/trait-object-safety-plan.mdpatterns/cow-plan.mdpatterns/phantomdata-capability-token-plan.mdUse for plans, architecture documents, and implementation blueprints.
Focus on:
PhantomData patterns for resource invariantsUse for implemented Rust code.
Focus on:
Result<T, E> shapes that should be simplified or made InfallibleCow fitsDeref/AsRef/BorrowUse when extracting crates or defining public traits and extension points.
Focus on:
This skill delegates pattern review work to existing Rust agents when specialized execution is needed:
| Operation | Agent | Returns |
|-----------|-------|---------|
| Dedicated structural pattern review | rust-best-practices-agent | Fenced JSON {success,data,error} with findings keyed by stable practice id |
| Architecture or plan review | rust-architect | Fenced JSON {success,data,error} blueprint or design findings |
| Code review for structural findings | rust-code-reviewer | Fenced JSON {success,data,error} findings summary |
| Pattern discovery across a codebase | rust-code-explorer | Fenced JSON {success,data,error} with located files and pattern usage |
Invoke these agents via Agent Runner using .claude/agents/registry.yaml. Require them to load rust-best-practices and the specific pattern references relevant to the requested review.
Dedicated rust-best-practices-agent assignment template:
{
"review_mode": "doc_review | sprint_review | phase_end",
"worktree_path": "/absolute/path/to/worktree",
"review_targets": [
"src/",
"Cargo.toml"
],
"practice_mode": "all | selected",
"practice_ids": [
"RBP-001",
"RBP-004"
],
"notes": "optional context"
}
When using this skill for review:
file:line and remediation guidance for each findingrust-development: general Rust style, idioms, documentation, and implementation guidancerust-best-practices: structural correctness patterns and lifecycle enforcementrust-service-hardening: service-runtime production defaults for Tokio and similar Rust servicestools
Set up a repo-local just task runner with a root Justfile, optional .just/ helper scripts, and curated help, build, fmt, lint, test, and ci recipes. Use when a repo needs just, a Justfile, .just helpers, or when the user mentions task automation, "just build", "just lint", "just fmt", or dropping in a just system.
tools
Convert PDF documents to markdown, extract images and tables using the docling CLI. Use when asked to convert a PDF, extract a datasheet, get images from a PDF, or process any document into structured output. Triggers: 'convert pdf', 'pdf to markdown', 'extract images from pdf', 'datasheet', 'get tables from pdf', 'extract diagrams'. No MCP required — uses docling CLI only.
development
Use when another workflow must launch Claude, Codex, or Gemini as a separate background sub-agent without opening a terminal. Spawns the `launchpad` agent with fenced JSON input and `run_in_background: true`.
testing
Run repo startup: prompt load, checklist sync, optional PR triage, worktree hygiene, and CI pull. Best-effort with structured status.