plugins/solid/skills/solid-ruby/SKILL.md
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.
npx skillsauth add fusengine/agents solid-rubyInstall 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.
Before ANY implementation, use TeamCreate to spawn 3 agents:
Before writing ANY new code:
app/modules/core/services/, app/modules/core/contracts/app/modules/core/| Layer | Location | Max Lines |
|-------|----------|-----------|
| Controllers | app/modules/[feature]/controllers/ | 50 |
| Services | app/modules/[feature]/services/ | 100 |
| Repositories | app/modules/[feature]/repositories/ | 100 |
| Contracts | app/modules/[feature]/contracts/ | 30 |
| Models | app/modules/[feature]/models/ | 50 |
| Shared | app/modules/core/{services,contracts,concerns}/ | - |
NEVER use flat app/ structure - always app/modules/[feature]/
| Rule | Value |
|------|-------|
| File limit | 100 lines (split at 90) |
| Controllers | < 50 lines, delegate to services |
| Contracts | contracts/ directory ONLY (duck typing modules) |
| YARD doc | Every public method documented |
| Frozen string | # frozen_string_literal: true in every file |
| Concerns | Use for shared behavior (like interfaces) |
| Topic | Reference | When to consult | |-------|-----------|-----------------| | SOLID Overview | solid-principles.md | Quick reference | | SRP | single-responsibility.md | Fat classes | | OCP | open-closed.md | Adding strategies | | LSP | liskov-substitution.md | Contracts | | ISP | interface-segregation.md | Fat modules | | DIP | dependency-inversion.md | Injection | | Architecture | architecture-patterns.md | Modular Rails |
| Template | When to use | |----------|-------------| | module.md | Feature module structure | | service.md | Business logic service | | contract.md | Duck typing contracts | | model.md | Active Record model | | error.md | Custom exceptions | | test.md | RSpec tests |
| Anti-Pattern | Fix |
|--------------|-----|
| Files > 100 lines | Split at 90 |
| Business logic in models | Extract to service |
| Fat controllers | Delegate to services |
| Flat app/ structure | Use app/modules/[feature]/ |
| God classes | Split by responsibility |
testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.