Ruby
ericrisco/rsc-harness
A skill your agent uses when writing or refactoring plain Ruby outside Rails — scripts, CLIs, gems, libraries: Enumerable chains and blocks, module mixins and value objects, Bundler/gemspec…
Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.
$ npx skills add doorkeeper-gem/doorkeeper --skill antipattern-prevention -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install doorkeeper-gem/doorkeeper antipattern-prevention --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/doorkeeper-gem/doorkeeper.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/antipattern-prevention .claude/skills/antipattern-prevention && 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 "antipattern-prevention" agent skill from https://github.com/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-prevention into .claude/skills/antipattern-prevention/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "antipattern-prevention", 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/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-preventionType 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 doorkeeper-gem/doorkeeper --skill antipattern-prevention -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install doorkeeper-gem/doorkeeper antipattern-prevention --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/doorkeeper-gem/doorkeeper.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/antipattern-prevention .agents/skills/antipattern-prevention && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "antipattern-prevention" agent skill from https://github.com/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-prevention into .agents/skills/antipattern-prevention/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "antipattern-prevention", 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 doorkeeper-gem/doorkeeper --skill antipattern-prevention -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install doorkeeper-gem/doorkeeper antipattern-prevention --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/doorkeeper-gem/doorkeeper.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/antipattern-prevention .cursor/skills/antipattern-prevention && 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 "antipattern-prevention" agent skill from https://github.com/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-prevention into .cursor/skills/antipattern-prevention/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "antipattern-prevention", 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/doorkeeper-gem/doorkeeper.git --path .agents/skills/antipattern-prevention--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 doorkeeper-gem/doorkeeper --skill antipattern-prevention -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install doorkeeper-gem/doorkeeper antipattern-prevention --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/doorkeeper-gem/doorkeeper.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/antipattern-prevention .gemini/skills/antipattern-prevention && 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 "antipattern-prevention" agent skill from https://github.com/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-prevention into .gemini/skills/antipattern-prevention/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "antipattern-prevention", 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 doorkeeper-gem/doorkeeper antipattern-preventionInstalls 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 doorkeeper-gem/doorkeeper --skill antipattern-prevention -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/doorkeeper-gem/doorkeeper.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/antipattern-prevention .github/skills/antipattern-prevention && 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 "antipattern-prevention" agent skill from https://github.com/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-prevention into .github/skills/antipattern-prevention/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "antipattern-prevention", 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 doorkeeper-gem/doorkeeper --skill antipattern-prevention -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install doorkeeper-gem/doorkeeper antipattern-prevention --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/doorkeeper-gem/doorkeeper.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/antipattern-prevention .opencode/skills/antipattern-prevention && 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 "antipattern-prevention" agent skill from https://github.com/doorkeeper-gem/doorkeeper/tree/main/.agents/skills/antipattern-prevention into .opencode/skills/antipattern-prevention/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "antipattern-prevention", 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.
antipattern-preventionAvoid common Ruby and Rails antipatterns that degrade maintainability and performance.
Antipattern Prevention is an agent skill from doorkeeper-gem/doorkeeper. Avoid common Ruby and Rails antipatterns that degrade maintainability and performance. Use when writing new code, reviewing PRs, or refactoring existing code in Doorkeeper.
Its SKILL.md is about 1.1k 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 Backend & APIs, covering Backend development, Refactoring and OAuth and OpenID Connect. It works with Ruby and Ruby on Rails. The repository describes itself as: Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape. The licence is MIT.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 80f4eba. 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.
Shell commands in SKILL.md call:
bundleFrom 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.
Antipattern Prevention loads about 1.1k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 173 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 doorkeeper-gem/doorkeeper at commit 80f4eba, republished under its MIT licence (© doorkeeper-gem). 173 words, ~1,083 tokens.
.claude/skills/antipattern-prevention/SKILL.md (or your agent's skills folder).When writing or reviewing code in Doorkeeper, use this skill to avoid common antipatterns that degrade maintainability and performance.
Severity: High
# BAD — loads all tokens into memory
AccessToken.all.select { |t| t.expired? }
# GOOD — push to database
# The codebase uses expiration_time_sql for this:
# lib/doorkeeper/models/concerns/expiration_time_sql_math.rb# BAD
ids = AccessToken.pluck(:id).select { |id| id > 100 }
# GOOD
AccessToken.where("id > ?", 100).pluck(:id)Severity: High
# BAD
def fetch_jwks(uri)
response = Net::HTTP.get(URI(uri))
JSON.parse(response)
rescue
nil
end
# GOOD — use the existing HttpFetcher which handles timeouts and errors
# Reference: lib/doorkeeper/http_fetcher.rb
def fetch_jwks(uri)
response = http_fetcher.fetch(uri)
JSON.parse(response)
rescue HttpFetcher::FetchError => e
Rails.logger.warn("JWKS fetch failed: #{e.message}")
nil
endSeverity: Medium
# BAD — fails silently
token.save
# GOOD — raises on failure
token.save!
# ALSO GOOD — check return value
unless token.save
handle_error(token.errors)
endSeverity: High
# BAD — hidden side effects
class AccessToken
after_create :notify_admin, :update_metrics, :send_webhook
end
# GOOD — explicit orchestration in request objects
class AuthorizationCodeRequest
def before_successful_response
find_or_create_access_token(...)
super
end
endDoorkeeper uses before_successful_response / after_successful_response hooks — this is the correct pattern.
Severity: High
# BAD — catches Exception, including SystemExit, Interrupt, NoMemoryError
rescue Exception => e
nil
end
# BAD — swallows all StandardError subclasses indiscriminately
rescue
nil
end
# GOOD — specific exception classes
rescue JWT::DecodeError, JWT::ExpiredSignature => e
handle_jwt_error(e)
endSeverity: Critical (security)
# BAD — SQL injection
where("token = '#{params[:token]}'")
# GOOD — parameterized
where(token: params[:token])
where("token = ?", params[:token])Severity: Critical (security)
# BAD — timing attack
token == stored_token
# GOOD — constant-time
ActiveSupport::SecurityUtils.secure_compare(token, stored_token)Severity: Medium
Doorkeeper supports multiple ORMs. Protocol logic in lib/doorkeeper/oauth/ should use the model mixin interface:
# BAD — AR-specific in protocol code
AccessToken.where(token: value).lock.first
# GOOD — use mixin method
AccessToken.by_token(value)Severity: Medium
If adding a new token attribute requires editing 8+ files, consider whether the design is right. The custom_attributes pattern shows how to add token attributes generically without shotgun surgery.
Severity: Medium
# BAD — one method doing too much
def authorize
validate_client
validate_scopes
validate_redirect_uri
create_grant
generate_response
end
# GOOD — Doorkeeper's validation DSL
validate :client, error: Errors::InvalidClient
validate :redirect_uri, error: Errors::InvalidRedirectUri
validate :scopes, error: Errors::InvalidScope# Bare rescue
grep -rn "rescue$" lib/ app/
# Silent save
grep -rn "\.save$" lib/ app/
# SQL interpolation
grep -rn 'where(".*#\{' lib/ app/
# String equality on secrets
grep -rn '== .*token\|== .*secret\|token.* ==' lib/ app/
# Ruby filtering instead of SQL
grep -rn '\.all\.select\|\.all\.map\|\.all\.each' lib/ app/After changes:
bundle exec rubocop — catches many antipatterns automaticallybundle exec rspec — ensures behavior hasn't regressed© doorkeeper-gem, 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/antipattern-prevention of doorkeeper-gem/doorkeeper.
Open the folder on GitHubat commit 80f4eba
Antipattern Prevention 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 |
|---|---|---|---|---|---|---|
| Antipattern Prevention this skilldoorkeeper-gem/doorkeeper | 5.5k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Rubyericrisco/rsc-harness | 180 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Layered Railsevilmartians/redprints-cfp | 108 | 1 repos | ~4.1k | Automated safety check: Pass | None | |
| Rails ArchitectureThibautBaissac/rails_ai_agents | 665 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Rails ExpertJeffallan/claude-skills | 12k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Ruby Prodavila7/claude-code-templates | 33k | 8 repos | ~445 | Automated safety check: Pass | MIT |
ericrisco/rsc-harness
A skill your agent uses when writing or refactoring plain Ruby outside Rails — scripts, CLIs, gems, libraries: Enumerable chains and blocks, module mixins and value objects, Bundler/gemspec…
evilmartians/redprints-cfp
Write, refactor, and review Rails code using layered architecture principles from "Layered Design for Ruby on Rails Applications".
ThibautBaissac/rails_ai_agents
Guides modern Rails 8 code architecture decisions and patterns.
Jeffallan/claude-skills
Builds Rails 7+ apps with Hotwire Turbo Frames and Streams, Active Record tuning, Action Cable, Sidekiq jobs and RSpec specs, with migration and N+1 checks.
davila7/claude-code-templates
Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization.
affaan-m/ECC
Ruby on Rails framework patterns for Rails 7.1+ and 8.x apps.
doorkeeper-gem/doorkeeper
Maintain code health and architecture standards when implementing features or refactoring Doorkeeper.
doorkeeper-gem/doorkeeper
Ensure gems are safe, necessary, and properly constrained when adding, updating, or reviewing dependencies in Doorkeeper.
doorkeeper-gem/doorkeeper
Verify that code changes do not introduce OAuth security vulnerabilities.
doorkeeper-gem/doorkeeper
Write correct and complete RSpec tests for Doorkeeper. An agent skill from doorkeeper-gem/doorkeeper.
doorkeeper-gem/doorkeeper
Verify OAuth protocol implementations stay aligned with relevant RFCs.
Works with
Categories
Avoid common Ruby and Rails antipatterns that degrade maintainability and performance. Antipattern Prevention is an agent skill from doorkeeper-gem/doorkeeper. Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.
Antipattern Prevention fits situations like: writing new code; refactoring existing code in Doorkeeper.
Run `npx skills add doorkeeper-gem/doorkeeper --skill antipattern-prevention -a claude-code`. Or copy the skill folder (.agents/skills/antipattern-prevention in doorkeeper-gem/doorkeeper) into .claude/skills/antipattern-prevention in your project. Claude Code loads it when a task matches its description.
Run `npx skills add doorkeeper-gem/doorkeeper --skill antipattern-prevention -a codex`. Or copy the skill folder (.agents/skills/antipattern-prevention in doorkeeper-gem/doorkeeper) into .agents/skills/antipattern-prevention 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 doorkeeper-gem/doorkeeper --skill antipattern-prevention -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/antipattern-prevention, .gemini/skills/antipattern-prevention, .github/skills/antipattern-prevention and .opencode/skills/antipattern-prevention in your project.
Going by SKILL.md and its folder, Antipattern Prevention needs the command-line tools its instructions call (bundle).
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.
Antipattern Prevention 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.1k tokens (SKILL.md is roughly 4.3k 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 Antipattern Prevention: Ruby (ericrisco/rsc-harness, 180 stars), Layered Rails (evilmartians/redprints-cfp, 108 stars), Rails Architecture (ThibautBaissac/rails_ai_agents, 665 stars) and Rails Expert (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
doorkeeper-gem (a GitHub organization) maintains it in doorkeeper-gem/doorkeeper, which has 5,523 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 9, 2026.
Source: doorkeeper-gem/doorkeeper on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.