Antipattern Prevention
doorkeeper-gem/doorkeeper
Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.
Guides decisions about when and how to extract code into services, queries, concerns, form objects, or other patterns.
$ npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents extraction-timing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/extraction-timing .claude/skills/extraction-timing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "extraction-timing" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timing into .claude/skills/extraction-timing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extraction-timing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents extraction-timing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/extraction-timing .agents/skills/extraction-timing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "extraction-timing" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timing into .agents/skills/extraction-timing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extraction-timing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents extraction-timing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/extraction-timing .cursor/skills/extraction-timing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "extraction-timing" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timing into .cursor/skills/extraction-timing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extraction-timing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ThibautBaissac/rails_ai_agents.git --path .agents/skills/extraction-timing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents extraction-timing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/extraction-timing .gemini/skills/extraction-timing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "extraction-timing" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timing into .gemini/skills/extraction-timing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extraction-timing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ThibautBaissac/rails_ai_agents extraction-timingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/extraction-timing .github/skills/extraction-timing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "extraction-timing" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timing into .github/skills/extraction-timing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extraction-timing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ThibautBaissac/rails_ai_agents extraction-timing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/extraction-timing .opencode/skills/extraction-timing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "extraction-timing" agent skill from https://github.com/ThibautBaissac/rails_ai_agents/tree/main/.agents/skills/extraction-timing into .opencode/skills/extraction-timing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "extraction-timing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
extraction-timingGuides decisions about when and how to extract code into services, queries, concerns, form objects, or other patterns.
Extraction Timing is an agent skill from ThibautBaissac/rails_ai_agents. Guides decisions about when and how to extract code into services, queries, concerns, form objects, or other patterns. Use when deciding whether to extract code, choosing between patterns (service vs concern vs query), evaluating if a base class or abstraction is needed, or when user mentions refactoring, extraction, code organization, or "where should this go." WHEN NOT: Implementing a specific pattern already decided on (use specialist agents like service-agent, query-agent, or model-agent), writing tests (use…
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Game Development, covering Backend development, Game design and Refactoring. The repository describes itself as: Specialized AI skills, agents, rules and hooks for modern Rails AI driven-development + Spec-Driven-Development kit + MCP. The licence is MIT.
Read from SKILL.md and the folder at commit 03622f2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Extraction Timing loads about 1.2k tokens when it runs. Until then it costs about 151 tokens; SKILL.md has 402 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ThibautBaissac/rails_ai_agents at commit 03622f2, republished under its MIT licence (© ThibautBaissac). 402 words, ~1,247 tokens.
.claude/skills/extraction-timing/SKILL.md (or your agent's skills folder).You are an expert in Rails code organization and extraction decisions. Help decide when to extract, what pattern to use, and when to keep it simple.
The 2025 Rails consensus has evolved beyond "Fat Models" to Skinny Everything:
| Signal | Action |
|---|---|
| Controller action exceeds ~10 lines of business logic | Extract to service object |
| Model exceeds ~100 lines | Extract business logic to services, complex queries to query objects |
| Query joins multiple tables or has conditional clauses | Extract to query object |
| Form touches multiple models or has custom validation | Extract to form object |
| Display formatting logic in model | Extract to presenter |
| UI element reused across 2+ views | Extract to ViewComponent |
| Shared behavior across 2+ models (narrow, simple) | Extract to concern |
| 5+ concrete implementations with identical structure | Extract base class |
| One-off operation | Don't extract. Inline is fine. |
Is it a database query?
├── Simple (one table, one condition) → Model scope
└── Complex (joins, conditionals, reused) → Query object
Is it business logic?
├── Simple CRUD on one model → Controller inline (or model method)
├── Multi-step operation → Service object
├── Involves external API → Service object
└── Spans multiple models → Service object with transaction
Is it shared behavior?
├── Property of the model (soft-delete, slugs, search) → Concern
└── Operation on the model (checkout, import, sync) → Service object
Is it display logic?
├── Formatting one model's data → Presenter (SimpleDelegator)
├── Reusable UI element → ViewComponent
└── Simple helper method → Keep in helper (use sparingly)
Is it validation?
├── Single model, standard rules → Model validation
├── Multi-model form → Form object
└── Business rule (not data integrity) → Service validation| Concerns | Service Objects | |
|---|---|---|
| Use for | Simple shared model properties | Multi-step business operations |
| Examples | SoftDeletable, Searchable, Sluggable | CreateOrder, ProcessRefund, ImportCsv |
| Max size | ~30 lines | No hard limit (but SRP applies) |
| Test via | Including model's specs | Isolated unit specs |
Rule: If the behavior is a property of the model, use a concern. If it's an operation on the model, use a service.
| STI | Polymorphic | |
|---|---|---|
| Use when | Subclasses share >80% of columns | Types have unique attributes |
| Table | One shared table with type column | Separate tables per type |
| Avoid when | >20% columns are NULL for some subtypes | Types are fundamentally similar |
Rule: Callbacks for data normalization only. Everything else is explicit.
| Acceptable Callbacks | Must Be Explicit (in services) |
|---|---|
before_validation :strip_whitespace | Sending emails |
before_save :downcase_email | Enqueuing background jobs |
before_destroy :check_dependencies | Calling external APIs |
after_initialize :set_defaults | Creating related records with business logic |
Before extracting, verify you're not creating:
model.update! call (Service Graveyard)See @docs/rails-development-principles.md for the complete development principles guide including SOLID, testing strategy, security, and performance.
© ThibautBaissac, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/extraction-timing of ThibautBaissac/rails_ai_agents.
Open the folder on GitHubat commit 03622f2
Extraction Timing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Extraction Timing this skillThibautBaissac/rails_ai_agents | 665 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Antipattern Preventiondoorkeeper-gem/doorkeeper | 5.5k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Layered Railsevilmartians/redprints-cfp | 108 | 1 repos | ~4.1k | Automated safety check: Pass | None | |
| Bootui Java Developmentjdubois/boot-ui | 307 | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Engineering PrinciplesAzure/agent-app-orchestrator | 103 | — | ~282 | Automated safety check: Pass | MIT | |
| Spring Data Jparrezartprebreza/spring-boot-skills | 298 | — | ~3k | Automated safety check: Pass | MIT |
doorkeeper-gem/doorkeeper
Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.
evilmartians/redprints-cfp
Write, refactor, and review Rails code using layered architecture principles from "Layered Design for Ruby on Rails Applications".
jdubois/boot-ui
A skill your agent uses when implementing, debugging, refactoring, or testing existing BootUI Java code, including framework-neutral engine logic, Spring MVC and WebFlux adapters, Quarkus runtime…
Azure/agent-app-orchestrator
Agent Landing Zone Orchestrator architecture and implementation principles.
rrezartprebreza/spring-boot-skills
A skill your agent uses when generating or refactoring Spring Boot 4 JPA entities, repositories, queries, projections, persistence tests, entity relationships, embeddables, IDs, or Hibernate mappings.
ericrisco/rsc-harness
A skill your agent uses when writing, reviewing or refactoring modern Java (21+, 25 LTS) — records and sealed interfaces as algebraic data types, exhaustive pattern-matching switch over instanceof…
ThibautBaissac/rails_ai_agents
Audits Rails application accessibility against WCAG 2.2 Level AA, detects violations with axe-core / Lighthouse / Pa11y, and reports remediation guidance for ERB views, ViewComponents, Stimulus…
ThibautBaissac/rails_ai_agents
Implements real-time features with Action Cable and WebSockets.
ThibautBaissac/rails_ai_agents
Configures Active Storage for file uploads with variants and direct uploads.
ThibautBaissac/rails_ai_agents
Implements authentication using Rails 8 built-in generator. An agent skill from ThibautBaissac/rails_ai_agents.
ThibautBaissac/rails_ai_agents
Implements Rails caching patterns for performance optimization.
ThibautBaissac/rails_ai_agents
Implements internationalization with Rails I18n for multi-language support.
Guides decisions about when and how to extract code into services, queries, concerns, form objects, or other patterns. Extraction Timing is an agent skill from ThibautBaissac/rails_ai_agents. Guides decisions about when and how to extract code into services, queries, concerns, form objects, or other patterns.
Extraction Timing fits situations like: deciding whether to extract code; choosing between patterns (service vs concern vs query); evaluating if a base class; abstraction is needed.
Run `npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a claude-code`. Or copy the skill folder (.agents/skills/extraction-timing in ThibautBaissac/rails_ai_agents) into .claude/skills/extraction-timing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a codex`. Or copy the skill folder (.agents/skills/extraction-timing in ThibautBaissac/rails_ai_agents) into .agents/skills/extraction-timing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ThibautBaissac/rails_ai_agents --skill extraction-timing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/extraction-timing, .gemini/skills/extraction-timing, .github/skills/extraction-timing and .opencode/skills/extraction-timing in your project.
SKILL.md names no scripts, command-line tools or credentials: Extraction Timing is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Extraction Timing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Extraction Timing: Antipattern Prevention (doorkeeper-gem/doorkeeper, 5.5k stars), Layered Rails (evilmartians/redprints-cfp, 108 stars), Bootui Java Development (jdubois/boot-ui, 307 stars) and Engineering Principles (Azure/agent-app-orchestrator, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ThibautBaissac (a GitHub user) maintains it in ThibautBaissac/rails_ai_agents, which has 665 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 1, 2026.
Source: ThibautBaissac/rails_ai_agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.