From Rust Code Studio
Adopt / onboard an existing Rust crate or workspace into studio governance — reverse-engineer structure, infer domains and standards, summarize the public API, catalog debt/gaps, then delegate the docs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rust-studio:adopt [optional path][optional path]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Bring an unfamiliar Rust crate or workspace under studio governance: map what exists,
Bring an unfamiliar Rust crate or workspace under studio governance: map what exists,
infer the domains and standards already in use, surface the public API, catalog tech debt
and tooling gaps, then propose and delegate the docs that capture it all. You are the
orchestrator: you do not write files yourself — you delegate to specialists.
See ${CLAUDE_PLUGIN_ROOT}/docs/coordination-protocol.md for the collaboration protocol.
$ARGUMENTS is an optional path to the crate or workspace root. If empty, default to the
current working directory. If the path does not look like a Rust project (no Cargo.toml),
ask: "Where is the crate or workspace you want to adopt?" before proceeding.
rust-scout on the target root. Ask it to return:
lib/bin/proc-macro layout,mod declarations and pub use re-exports),Cargo.toml features, dependencies (direct + dev), and any [patch] / [replace],deny.toml, .cargo/config.toml, rust-toolchain.toml,
clippy.toml, rustfmt.toml, CI config files, benchmark harness, test fixtures.rust-scout is the source of truth for layout. Read-only;
no writes at this phase./detect-stack logic to classify which studio domains are
in play. Check for signals:
tokio, async-std, axum, actix-web, hyper, reqwest, tonicclap, structopt, crossterm, ratatui, indicatifunsafe blocks, no_std, libc, bindgen, FFI modules, criterionpub items in lib.rs, re-exports, public trait implssqlx, diesel, serde, postcard, prost, redis, sledwasm-bindgen, wasm-pack, web-sys${CLAUDE_PLUGIN_ROOT}/docs/agent-roster.md). List them — they will be consulted in
Phase 4.thiserror,
anyhow, custom enums), logging/tracing setup, test patterns (unit vs. integration vs.
property-based), edition and MSRV (from Cargo.toml).api-design-lead to read the public surface of each crate (exported traits,
types, functions, impl blocks, feature flags that gate public items) and produce:
0.x? are items #[doc(hidden)] or unstable?),#[non_exhaustive], leaky internals,
unclear error types).tooling-lead — missing deny.toml, no rust-toolchain.toml, no CI config or CI
that lacks lint/test/publish stages, no rustfmt.toml/clippy.toml. If the scout
reported many workspace members, also assess context-scoping per
${CLAUDE_PLUGIN_ROOT}/docs/large-workspace.md: per-crate CLAUDE.md, permissions.deny
on target//generated, the bundled rust-analyzer LSP for symbol lookup, sparse worktrees.qa-lead — test coverage posture: no tests, tests that only cover happy paths,
missing integration or doc tests, no property-based testing for data-heavy code.systems-perf-lead — unsafe without // SAFETY: comments, missing no_std
feature-gate declarations, absence of a benchmark harness if performance is claimed.async-systems-lead — blocking calls in async contexts, missing cancellation
handling, unstructured concurrency (spawn without join/abort handle).release-lead — no CHANGELOG, missing [badges] or [package.metadata],
incomplete [package] fields required for crates.io publish.api-design-lead — already engaged in Phase 3; add semver / breakage risk items here.architecture.md — crate/module map, dependency graph narrative, key design decisions
already baked in (use ${CLAUDE_PLUGIN_ROOT}/docs/templates/architecture.md).${CLAUDE_PLUGIN_ROOT}/docs/templates/adr.md.AskUserQuestion: present the proposed doc set with a short rationale for each item.
Let the user trim, add, or defer. This is the only write-gate for doc creation.
Once approved, proceed directly to Phase 6 without re-asking.architecture.md → spawn chief-architect with the scout map and domain
classification as context; instruct it to follow
${CLAUDE_PLUGIN_ROOT}/docs/templates/architecture.md.chief-architect (or the owning domain lead for narrow
decisions) per ADR topic; instruct it to follow
${CLAUDE_PLUGIN_ROOT}/docs/templates/adr.md.tooling-lead to assemble from the Phase 4 findings.AskUserQuestion at that point — otherwise proceed.Produce the adoption profile — a single structured summary the user can save or reference:
## Crate / workspace
<name>, edition, MSRV, crate type(s)
## Domains in use
<bulleted list with owning lead for each>
## Public API surface
<one-paragraph summary from api-design-lead>
## Tooling baseline
<what's present / what's missing>
## Tech debt (prioritized)
🔴 CRITICAL — <items that block correctness or safety>
🟠 HIGH — <items that block production readiness>
🟡 MEDIUM — <items that block quality gates>
🔵 LOW — <nice-to-have improvements>
## Docs created
<list of files written and their paths>
End with a prioritized adoption todo — the three to five actions with the highest leverage, ordered by risk/impact. For each, name the skill to run next:
deny.toml → /tech-debt or /tooling/architecture/dev-task scoped to the unsafe module/test-setup${CLAUDE_PLUGIN_ROOT}/docs/large-workspace.md (per-crate CLAUDE.md, deny target/,
the bundled rust-analyzer LSP, sparse worktrees) using
${CLAUDE_PLUGIN_ROOT}/docs/templates/large-workspace-settings.json/review in full modeAt the end of the session, offer to hand off directly:
/architecture — to go deeper on module/crate boundaries or generate a full ADR./tech-debt — to triage and schedule the debt items from Phase 4./test-setup — to scaffold a test harness if coverage is absent or sparse./review — to run a full audit on a specific sub-crate or diff right now.If rust-scout cannot find a Cargo.toml, stop immediately and AskUserQuestion:
"I couldn't find a Cargo.toml at that path. Please provide the correct path, or confirm
this is the right directory."
If a domain lead returns BLOCKED (e.g. ambiguous design, no source to read), surface the blocker, note it in the debt register as a gap, and continue with the remaining phases. Never silently skip a finding — always report what could not be assessed and why.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub vanyastaff/rust-studio --plugin rust-studio