/fuse-solid:solid-rustfrom fuse-solid
Enforces SOLID modular architecture for Rust 2024 projects with src/modules/[feature]/ layers, trait-only interfaces, thiserror error handling, and DRY checks against shared core code.
Ships in fuse-solid. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before writing any new code it requires a DRY check against src/core/services and src/core/traits. See solid-principles.md for the overview, the per-principle references for SRP/OCP/LSP/ISP/DIP detail, and the templates for module/service/trait/handler/error/test scaffolding.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
Before writing ANY new code:
src/core/services/, src/core/traits/src/core/| Layer | Location |
|---|---|
| Handlers | src/modules/[feature]/handlers.rs |
| Services | src/modules/[feature]/services.rs |
| Repositories | src/modules/[feature]/repository.rs |
| Traits | src/modules/[feature]/traits.rs |
| Models | src/modules/[feature]/models.rs |
| Shared | src/core/{services,traits,models}/ |
NEVER use flat src/ structure - always src/modules/[feature]/
| Rule | Value |
|---|---|
| File limit | FUSE_SOLID_MAX_LINES |
| Handlers | Thin, delegate to services |
| Traits | traits.rs or src/core/traits/ ONLY |
| Rustdoc | /// on every public item |
| Error handling | Use thiserror for custom errors |
| Generics | Use trait bounds, not concrete types |
| Topic | Reference | When to consult |
|---|---|---|
| SOLID Overview | solid-principles.md | Quick reference |
| SRP | single-responsibility.md | Fat structs |
| OCP | open-closed.md | Adding impls |
| LSP | liskov-substitution.md | Trait contracts |
| ISP | interface-segregation.md | Fat traits |
| DIP | dependency-inversion.md | Generics/DI |
| Architecture | architecture-patterns.md | Modular crate |
| Template | When to use |
|---|---|
| module.md | Feature module structure |
| service.md | Business logic service |
| trait-def.md | Trait definition |
| handler.md | HTTP handler (Axum) |
| error.md | Custom errors (thiserror) |
| test.md | Unit + integration tests |
| Anti-Pattern | Fix |
|---|---|
Files over FUSE_SOLID_MAX_LINES | Split by responsibility |
| Traits in impl files | Move to traits.rs |
Box<dyn Any> | Use proper trait bounds |
Flat src/ structure | Use src/modules/[feature]/ |
| Unwrap in library code | Use Result<T, E> |
references/architecture-patterns.md (opens in a new tab)references/dependency-inversion.md (opens in a new tab)references/interface-segregation.md (opens in a new tab)references/liskov-substitution.md (opens in a new tab)references/open-closed.md (opens in a new tab)references/single-responsibility.md (opens in a new tab)references/solid-principles.md (opens in a new tab)references/templates/error.md (opens in a new tab)references/templates/handler.md (opens in a new tab)references/templates/module.md (opens in a new tab)references/templates/service.md (opens in a new tab)references/templates/test.md (opens in a new tab)references/templates/trait-def.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/solid-csharpUse when writing or refactoring C#/.NET code, structuring Modules/[Feature]/ layers, or defining Contracts/ interfaces (SOLID, files within FUSE_SOLID_MAX_LINES)./solid-detectionUse when determining which language-specific SOLID skill to load, detecting project type from config files, or resolving interface directory conventions./solid-genericUse when building CLI tools, libraries, scripts, hooks, or non-framework TypeScript code (Bun/Node.js -- SOLID, files within FUSE_SOLID_MAX_LINES, JSDoc mandatory).npx claudepluginhub fusengine/claude-plugins --plugin fuse-solidOther plugins' skills for the same job