From gierd
Use when the user explicitly requests a sweep against every named Rails antipattern (e.g. "/rails-antipatterns", "check all antipatterns", "review for Rails smells"). Do not auto-trigger on general code review — `code-review-orchestration` handles that.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gierd:rails-antipatternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive catalog of named Rails antipatterns sourced from *Rails Antipatterns* (Pytel & Saleh) and the 37signals/DHH idiom. Use these as diagnostic tools when reviewing code for structural smells — each antipattern has a name, detection heuristic, and idiomatic Rails fix.
references/anemic-domain-model.mdreferences/bloated-session.mdreferences/callback-hell.mdreferences/fat-controller.mdreferences/fat-model-god-object.mdreferences/god-helper-module.mdreferences/homemade-keys-and-routes.mdreferences/migration-smells.mdreferences/mock-heavy-tests.mdreferences/n-plus-one-in-views.mdreferences/non-restful-actions.mdreferences/php-itis-views.mdreferences/premature-abstraction-and-di.mdreferences/service-object-soup.mdreferences/spaghetti-sql.mdreferences/voyeuristic-model.mdComprehensive catalog of named Rails antipatterns sourced from Rails Antipatterns (Pytel & Saleh) and the 37signals/DHH idiom. Use these as diagnostic tools when reviewing code for structural smells — each antipattern has a name, detection heuristic, and idiomatic Rails fix.
These are not abstract principles. They are concrete, named problems with concrete, named solutions. Apply them by recognizing the shape of the code, not by keyword matching.
| Antipattern | Reference | Detect When |
|---|---|---|
| Fat Model / God Object | references/fat-model-god-object.md | AR model >300 lines mixing responsibilities |
| Callback Hell | references/callback-hell.md | tangled before_/after_ side-effect chains |
| Voyeuristic Model | references/voyeuristic-model.md | Law of Demeter train wrecks |
| Anemic Domain Model | references/anemic-domain-model.md | behavior in services, models as attribute bags |
| Spaghetti SQL | references/spaghetti-sql.md | raw queries scattered outside scopes |
| Fat Controller | references/fat-controller.md | business logic in controllers |
| Non-RESTful Actions | references/non-restful-actions.md | custom actions instead of new resources |
| Homemade Keys & Routes | references/homemade-keys-and-routes.md | hand-built URL patterns bypassing resources |
| Bloated Session | references/bloated-session.md | AR objects or state stuffed in session |
| PHP-itis Views | references/php-itis-views.md | conditionals/loops/queries in ERB |
| N+1 in Views | references/n-plus-one-in-views.md | per-row queries during iteration |
| God Helper Module | references/god-helper-module.md | ApplicationHelper as dumping ground |
| Service Object Soup | references/service-object-soup.md | *Service class proliferation |
| Premature Abstraction & DI | references/premature-abstraction-and-di.md | DI/interfaces purely for testability |
| Mock-Heavy Tests | references/mock-heavy-tests.md | stubbing collaborators that could be fixtures |
| Migration Smells | references/migration-smells.md | irreversible migrations, mixed schema/data |
When invoked as a sweep, scan the changed code for each antipattern in the table above. For each detected smell, dispatch one subagent per antipattern reference that matches. Each subagent loads this skill, reads the matched reference, and reviews the code against that antipattern. Aggregate findings.
Dispatch one parallel subagent per antipattern. No file gating — smells can hide anywhere. See dispatching-parallel-agents for the dispatch primitive.
Each subagent receives:
Each subagent returns either:
file:line citations with a one-line note tying the code to the smellGroup surviving findings by antipattern, then by file. For each finding cite file:line and the relevant rule from the named reference. Skip antipatterns where no reviewer flagged anything — don't list "no findings" rows.
If invoked from code-review-orchestration as a sub-orchestrator, return the structured findings list rather than narrative prose; the parent will integrate with its own posting protocol.
npx claudepluginhub gierd-inc/dev-skills --plugin gierdGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.