By palkan
Audit Rails codebases for layered architecture violations, identify god objects and callback issues, plan phased adoption of patterns like service objects and ViewComponents, and review PRs against architectural rules.
Deep analysis of Active Record callbacks in the codebase.
Identify and analyze god objects in the codebase using churn × complexity metrics.
Comprehensive layered architecture analysis of a Rails codebase or specific directory.
Plan gradual adoption of layered architecture patterns.
Standalone code review from layered architecture perspective.
Use this agent when planning incremental adoption of layered architecture for Rails codebases. Creates phased roadmaps for introducing patterns like authorization (policies), callback extraction, god object decomposition, or ViewComponent adoption. Analyzes current state, finds existing patterns to build upon, and produces specific before/after code examples with 'stop here if' guidance.
Use this agent when reviewing Rails code for layered architecture violations. Checks for: Current.user in models, notifications/mailers in domain layer, request objects in services, business logic in controllers, anemic models, low-scoring callbacks (operations that should be extracted), code-slicing concerns, and god objects. Provides specific fixes with code examples.
Uses power tools
Uses Bash, Write, or Edit tools
Runs pre-commands
Contains inline bash commands via ! syntax
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Bash prerequisite issue
Uses bash pre-commands but Bash not in allowed tools
Bash prerequisite issue
Uses bash pre-commands but Bash not in allowed tools
A collection of Claude Code skills by Vladimir Dementyev.
Design and review Rails applications using layered architecture principles from the Layered Design for Ruby on Rails Applications book.
Install:
/plugin marketplace add palkan/skills
/plugin install layered-rails@palkan-skills
Commands:
| Command | Purpose |
|---|---|
/layers:analyze | Full codebase architecture analysis |
/layers:analyze:callbacks | Score model callbacks, find extraction candidates |
/layers:analyze:gods | Find god objects via churn x complexity |
/layers:review | Review code changes for layer violations |
/layers:spec-test | Run specification test on specific files |
/layers:gradual [goal] | Plan incremental adoption of layered patterns |
We recommend asking Claude itself to update the instructions for Compound Engineering to include Layered Design features according to your needs. Below you can find some examples.
If you use the compound-engineering plugin, add explicit instructions to include layered-rails planning and reviewing agents.
In your compound-engineering.local.md file:
---
review_agents:
- layered-rails
- rails-reviewer
- security-sentinel
# - ...
---
# ...
# also worth adding something like:
We are **gradually adopting layered design principles** from "Layered Design for Ruby on Rails Applications" — clean abstraction boundaries, explicit layers, and specification tests...
Similarly, for planning features, add to your CLAUDE.md (or AGENTS.md, or whatever) smth like:
# ...
### For planning agents
When planning new features or architectural changes, use the `layered-rails` skill for analysis:
- `/layers:gradual` — plan incremental adoption of layered patterns
- `/layers:analyze` — full codebase architecture analysis
- `/layers:review` — review code from a layered architecture perspective
- `/layers:spec-test` — apply the specification test to evaluate layer placement
Alternatively, you can try to add shorter instructions to CLAUDE.md:
Extend the list of **review agents** with the `layered-rails:layered-rails-reviewer` agent to check for architecture layer violations. Must be applicable to such commands from the compound-engineering plugin as `/workflow:review`, `/plan_review`, and similar.
Extend the list of **planning agents** with the `layered-rails:layered-rails-gradual` agent to plan refactoring according to the layered design principles. Must be applicable to such commands from the compound-engineering plugin as `/workflow:plan`, `/deepen_plan`, and similar.
MIT
npx claudepluginhub palkan/skills --plugin layered-railsDesign and review Rails applications using Vanilla Rails philosophy from 37signals/Basecamp. Emphasizes thin controllers, rich domain models, and avoiding unnecessary service layers.
Rails conventions for consistent architecture + implementation in real codebases
Advanced Ruby on Rails skills for MVC patterns, Active Record, and Hotwire
Simplifies and refines Ruby on Rails code following 37signals patterns and the One Person Framework philosophy
A collection of skills for Rails development and consulting, with an emphasis on learning, communication, and client success
Curated library of AI agent skills for Ruby on Rails development. Includes code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and workflow automation.