agentsclimarketplace

Rust project architecture

Skill genaptic/skillsets/dist/preview/opencode/rust/best-practices/rust-project-architecture

Design or review Rust package, crate, module, target, binary/library, workspace, ownership-seam, and test-placement boundaries. Use when creating or restructuring Cargo projects, deciding whether code belongs in an existing crate or a new package, keeping binaries thin, or reducing layout-driven coupling and clone-heavy data flow. Do not use for primarily internal type/API design, async behavior, test implementation, dependency selection, or adding one CLI command; prefer the corresponding specialized Rust skill.From its SKILL.md

Install
npx -y skills add genaptic/skillsets --skill rust-project-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 25 days oldThe repository was created 25 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.4 KB, 936 tokens by cl100k_base, as published. Nobody here has run it

Outcome

Produce a repository-aligned Rust architecture whose crate, module, target, and test boundaries express real ownership, dependency, deployment, reuse, or release seams without needless packages.

Compatibility

Portable across Claude Code, Codex, and OpenCode. Follow the target repository's Cargo layout, toolchain, edition, MSRV, feature, lockfile, and CI policy. Edition 2024 templates require Rust 1.85 or newer. Optional research may use the network only when authorized; otherwise report freshness gaps. Native-client compatibility remains unverified without a dated exact-SHA report.

Inputs

  • The requested architectural outcome and constraints.
  • Workspace/package manifests, target trees, public APIs, dependency graph, CI, and test layout.
  • Deployment units, ownership boundaries, reuse consumers, platform constraints, and release policy.
  • Evidence about existing responsibilities, duplicated behavior, and data ownership seams.

Safety

  • Preserve public APIs, package names, feature semantics, paths, and release boundaries unless the request explicitly authorizes migration.
  • Preview moves and manifest changes before applying them. Preserve unrelated edits and generated files managed by repository tooling.
  • Do not add crates or dependencies merely to mirror conceptual layers.
  • Do not install tools, publish packages, run remote Git operations, or execute live/integration infrastructure without explicit authorization.

Procedure

  1. Inventory the current graph. Read repository instructions, workspace/package manifests, targets, modules, public exports, feature edges, tests, CI, and deployment entrypoints. Identify consumers and actual ownership boundaries.
  2. Define responsibilities. Give each proposed crate/module one cohesive job. Record which state and behavior it owns, which direction dependencies flow, and which APIs cross boundaries.
  3. Choose the smallest viable boundary. Extend an existing crate when ownership, dependencies, release cadence, and deployment remain shared. Use src/bin/ for small additional binaries sharing a domain. Add a package only for a real boundary such as independent reuse, dependency isolation, deployment, platform support, ownership, or release.
  4. Keep executable shells thin. Put reusable parsing-independent behavior in a library; keep process setup, CLI parsing, logging setup, exit mapping, and shutdown wiring at executable edges.
  5. Organize modules by domain and behavior. Prefer names that expose responsibility. Follow the repository's module-file convention; both foo.rs plus foo/ and foo/mod.rs are valid Rust.
  6. Design ownership seams. Borrow during validation and internal reads. Move or clone only where data becomes independently owned, such as persistence, queues, spawned tasks, or returned values.
  7. Place tests narrowly. Keep private implementation tests beside code, public integration tests under tests/, reusable executable examples under examples/, and true multi-package/system journeys in an explicit end-to-end boundary.
  8. Preview and implement incrementally. Update manifests and moves in reviewable stages. Avoid compatibility shims unless a documented migration requires them.
  9. Verify the graph. Run repository-derived formatting, metadata, check, test, documentation, feature, and platform commands. Inspect dependency direction and final diff.

Verification

  • Every crate/module has a stated responsibility and evidence-backed boundary.
  • Public paths, features, package selection, test discovery, and binary behavior remain intentional.
  • No new cycle, accidental public API, duplicated binary logic, or unnecessary clone is introduced.
  • Complete templates compile under their declared toolchain; snippets are labeled and adapted.
  • Commands, unavailable checks, migration risks, and compatibility assumptions are reported exactly.

Output contract

Return the current-state inventory, boundary decision record, proposed or applied layout, API and migration effects, verification evidence, and unresolved risks.

Resources

  • Read the guide for target layouts, boundary decisions, test placement, ownership seams, and worked examples.
  • Use the checklist for design and final review.
  • Consult the primary sources for Cargo layout and workspace behavior.
  • The thin-lib-bin template is a complete single-package library-plus-binary template.
  • The workspace-root template is a complete minimal virtual workspace template; rename its example packages and reconcile metadata, MSRV, and commands with the target repository.

What ships with it: 11 files

15.2 KB alongside SKILL.md

references/

Gives 0 of the 12 instructions most architecture codebase skills give in 936 tokens

Counted across 811 of the 1,134 authors here whose files we hold, read 2026-08-07

  • Ask the user which candidate to explorein 45 of 811, across 15 files
  • Apply the deletion test to suspected shallow modulesin 43 of 811, across 15 files
  • Read any relevant architecture decision records firstin 31 of 811, across 8 files
  • Use exact glossary terms in every suggestionin 30 of 811, across 10 files
  • Accept dependencies instead of creating themin 24 of 811, across 5 files
  • Include before and after visualisations for each candidatein 24 of 811, across 5 files
  • Read the domain glossary before exploringin 24 of 811, across 6 files
  • Return results instead of producing side effectsin 23 of 811, across 4 files
  • Explore the codebase for shallow modules and frictionin 23 of 811, across 3 files
  • Introduce seams only where things varyin 22 of 811, across 3 files
  • Reduce the number of methodsin 21 of 811, across 2 files
  • Design deep modules with small interfacesin 21 of 811, across 3 files

Said here and by no other author read

  • Preserve public APIs and release boundaries without explicit migration authorization
  • Preview moves and manifest changes before applying them
  • Do not add crates or dependencies merely to mirror conceptual layers
  • Do not install tools, publish packages, or run remote operations without authorization
  • Inventory the current workspace, manifest, target, and dependency graph
  • Define one cohesive responsibility for each proposed crate or module

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,696. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.