Layered Rails

Reviews and refactors Rails code by architecture layer using the specification test

Tested · Works

Test report

Verdict
Tested · Works
Score
8.8/10
Tested
Jul 21, 2026
Environment
Claude Code 2.x (agent harness)
Upstream re-checked
Aug 10, 2026 · 5f5b8c6

Fetched SKILL.md at layered-rails/skills/layered-rails/; frontmatter parses with name+description; spot-checked 4 referenced files (architecture-layers, spec-test workflow, service-objects, plugin.json) all HTTP 200; no security smells. Verified the install block in a temp HOME — SKILL.md lands at ~/.claude/skills/layered-rails/SKILL.md. Ran the spec-test workflow on a fresh fat SubscriptionsController I wrote (not the skill's own example). Baseline review swept proration/tax AND all side effects into one CreateSubscription service (an anemic-model trap); the skill-followed output produced a per-context test skeleton (10 contexts, 3 ✓ / 7 ✗, "30% belongs at this layer") and routed each concern to a different layer — proration/tax to the Subscription model as a before_validation transformer plus a TaxRate value object, Stripe to a service+job, email/analytics to Active Delivery — with test-impact per extraction. Concrete divergence: model vs service placement for domain math, which baseline got backwards.

Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works

  • Installs cleanly 5/5
  • Triggers reliably 5/5
  • Output vs. baseline 7/10
  • Docs & honesty 5/5

What Layered Rails does

Analyzes, reviews, and refactors Ruby on Rails code against a four-layer architecture (presentation, application, domain, infrastructure), flagging layer violations like Current-in-models, business logic in controllers, anemic models, and low-scoring callbacks. Triggers when reviewing Rails PRs/diffs or writing/refactoring models, controllers, services, jobs, policies, form/query/value objects, presenters, or state machines. Ships workflows for a full architecture audit, code review, specification test, callback scoring, and god-object analysis, plus pattern and gem references.

How to install Layered Rails

git clone --depth 1 https://github.com/palkan/skills.git /tmp/layered-rails-src
mkdir -p ~/.claude/skills
cp -R /tmp/layered-rails-src/layered-rails/skills/layered-rails ~/.claude/skills/layered-rails
# No external deps: allowed-tools are Grep/Glob/Read/Task, all in-context. Pure Rails/Ruby architecture guidance.
# Plugin alternative (adds /layered-rails:* slash commands):
#   /plugin marketplace add palkan/skills
#   /plugin install layered-rails@palkan-skills

Skills live in ~/.claude/skills/ (global) or .claude/skills/ (per-project). Restart Claude Code after installing.

Commands — how to trigger Layered Rails

  • /layered-rails Reviews and refactors Rails code by architecture layer using the specification test

It also activates on plain-language prompts like these:

  • Refactor this fat controller using layered design
  • Review this PR for layer violations
  • Move this business logic into a service object

Frequently asked questions

Is the Layered Rails skill free?
Yes. The skill itself is free from palkan/skills. SkillProof publishes the install command and an independent test verdict at no cost.
Does Layered Rails work with Claude Code?
We tested it with Claude Code 2.x (agent harness) on Jul 21, 2026. Verdict: Tested · Works. Fetched SKILL.md at layered-rails/skills/layered-rails/; frontmatter parses with name+description; spot-checked 4 referenced files (architecture-layers, spec-test workflow, service-objects, plugin.json) all HTTP 200; no security smells. Verified the install block in a temp HOME — SKILL.md lands at ~/.claude/skills/layered-rails/SKILL.md. Ran the spec-test workflow on a fresh fat SubscriptionsController I wrote (not the skill's own example). Baseline review swept proration/tax AND all side effects into one CreateSubscription service (an anemic-model trap); the skill-followed output produced a per-context test skeleton (10 contexts, 3 ✓ / 7 ✗, "30% belongs at this layer") and routed each concern to a different layer — proration/tax to the Subscription model as a before_validation transformer plus a TaxRate value object, Stripe to a service+job, email/analytics to Active Delivery — with test-impact per extraction. Concrete divergence: model vs service placement for domain math, which baseline got backwards.
What is the Layered Rails SkillProof Score?
8.8/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 7/10, docs & honesty 5/5.
How do I install Layered Rails?
Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
Can I use Layered Rails with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.