agentsclimarketplace

Solid ruby

Skill fusengine/agents/plugins/solid/skills/solid-ruby

SOLID principles for Ruby 3.3+ and Rails 8. Files < 100 lines, contracts separated, modular architecture. Modules MANDATORY. Use when: writing or refactoring Ruby/Rails code, structuring app/modules/[feature]/ layers, or defining contracts/ modules.From its SKILL.md

Install
npx -y skills add fusengine/agents --skill solid-ruby

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

One thing to look at

  • 22 stars22 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.

SKILL.md

3.9 KB, 794 tokens by cl100k_base, as published. Nobody here has run it

SOLID Ruby - Modular Architecture

Agent Workflow (MANDATORY)

Before ANY implementation, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase - Analyze existing architecture
  2. fuse-ai-pilot:research-expert - Verify Ruby/Rails docs via Context7
  3. fuse-ai-pilot:sniper - Post-implementation validation

DRY - Reuse Before Creating (MANDATORY)

Before writing ANY new code:

  1. Grep the codebase for similar modules, services, or logic
  2. Check shared locations: app/modules/core/services/, app/modules/core/contracts/
  3. If similar code exists -> extend/reuse instead of duplicate
  4. If code will be used by 2+ features -> create it in app/modules/core/

Architecture (Modules MANDATORY)

LayerLocationMax Lines
Controllersapp/modules/[feature]/controllers/50
Servicesapp/modules/[feature]/services/100
Repositoriesapp/modules/[feature]/repositories/100
Contractsapp/modules/[feature]/contracts/30
Modelsapp/modules/[feature]/models/50
Sharedapp/modules/core/{services,contracts,concerns}/-

NEVER use flat app/ structure - always app/modules/[feature]/


Critical Rules (MANDATORY)

RuleValue
File limit100 lines (split at 90)
Controllers< 50 lines, delegate to services
Contractscontracts/ directory ONLY (duck typing modules)
YARD docEvery public method documented
Frozen string# frozen_string_literal: true in every file
ConcernsUse for shared behavior (like interfaces)

Reference Guide

Concepts

TopicReferenceWhen to consult
SOLID Overviewsolid-principles.mdQuick reference
SRPsingle-responsibility.mdFat classes
OCPopen-closed.mdAdding strategies
LSPliskov-substitution.mdContracts
ISPinterface-segregation.mdFat modules
DIPdependency-inversion.mdInjection
Architecturearchitecture-patterns.mdModular Rails

Templates

TemplateWhen to use
module.mdFeature module structure
service.mdBusiness logic service
contract.mdDuck typing contracts
model.mdActive Record model
error.mdCustom exceptions
test.mdRSpec tests

Forbidden

Anti-PatternFix
Files > 100 linesSplit at 90
Business logic in modelsExtract to service
Fat controllersDelegate to services
Flat app/ structureUse app/modules/[feature]/
God classesSplit by responsibility

What ships with it: 13 files

34.0 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. 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.