prior-art

prior-art is a skill for Claude Code from thoughtbot/rails-consultant. It costs 36 tokens per session (853 once invoked), scanned A, original, MIT.

A codebase research workflow for finding how an application already handles a specific concern. It searches files, common Rails locations, dependencies, base classes, dedicated modules, and relevant Git history.

In plain words
What is it for?
Use it to investigate topics such as error reporting, authentication, background jobs, service objects, or other repeated implementation concerns.
Why use it?
It prevents you from inventing a new pattern when the project already has an established one or has inconsistent examples.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: agent in frontmatter.

Part of the rails-consultant plugin — 12 skills shipped together

Good fit Use it to investigate topics such as error reporting, authentication, background jobs, service objects, or other repeated implementation concerns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thoughtbot/rails-consultant/prior-art
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add thoughtbot/rails-consultant --skill prior-art
Clone the repo
git clone --depth 1 https://github.com/thoughtbot/rails-consultant

Made for: Claude Code.

Or install rails-consultant, the plugin that ships this one along with the rest of its 12 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prior-art

README.md
[![agentmods](https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/prior-art/github.svg)](https://agentmods.dev/skills/thoughtbot/rails-consultant/prior-art)
Your own site
<a href="https://agentmods.dev/skills/thoughtbot/rails-consultant/prior-art"><img src="https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/prior-art/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prior-art

Your own site · 80×15
<a href="https://agentmods.dev/skills/thoughtbot/rails-consultant/prior-art"><img src="https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/prior-art.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00853
Opus 5 $0.00018 $0.00426
Sonnet 5 $0.00007 $0.00171
Haiku 4.5 $0.00004 $0.00085

Measured 10d ago against content hash afebd194c2f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prior-art scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prior-art/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Behavior

Research how this codebase handles $ARGUMENTS. Explore the codebase thoroughly and report what you find.

Step 1: Search Broadly

Cast a wide net across the codebase. Use multiple search strategies:

  • Grep for keywords — search for terms related to the concern (e.g. for error reporting: error, exception, rescue, Sentry, Bugsnag, notify, report)
  • Check common Rails locations — initializers, middleware, concerns, base classes, config files, lib/
  • Check the Gemfile — are there gems related to this concern? What do they tell you about the approach?
  • Check application-level base classesApplicationController, ApplicationRecord, ApplicationJob — these often set patterns that everything inherits
  • Check for dedicated directories or files — service objects, concerns, lib/ modules that handle this concern

Don't stop at the first result. The goal is to find every place this concern is handled — the consistent pattern and the exceptions.

Step 2: Check Git History

For the key files involved in this concern:

  • git log --oneline -10 <file> to see recent changes
  • git log --all --oneline --grep="<keyword>" to find commits related to the concern
  • Look for: when the pattern was established, whether it's evolved, any recent changes or migrations from one approach to another

Git history reveals whether a pattern is settled or in flux — critical context before you build on top of it.

Step 3: Map What You Found

Report the findings in this order:

The pattern — describe the primary approach in plain English. One paragraph. "This codebase handles X by doing Y." If there's a clear convention, name it. If there are multiple approaches, name each.

Where it lives — list the key files and locations, grouped logically:

  • Configuration (initializers, middleware, config)
  • Base-level setup (ApplicationController, ApplicationRecord, etc.)
  • Implementation files (services, concerns, models, specific controllers)
  • Tests (how is this concern tested?)

Read the full file on GitHub · 73 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 73 lines · 36 tokens per session scan A afebd194c2f5

Subscribe to this mod's changes

prior-art is a skill published in the GitHub repository thoughtbot/rails-consultant (24 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 853 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

swarm

Run a multi-agent audit of a codebase by spawning specialized parallel subagents (security, performance, tests, architecture, dead-code), then synthesize their findings into a single prioritized action plan. Use this whenever the user runs /swarm, asks to "audit the repo," "review this codebase," "find issues across…

Zintellix/Claude-Skills · 138 tokens

review

Phase 5 of 5 — triage-first review orchestrator; dispatches up to 17 domain checks in parallel and compiles one report. Use only when the user asks to run Phase 5 or review a PR, branch, or set of changes — never trigger automatically after writing code.

foyzulkarim/skills · 62 tokens

architecture-review

Audits existing architecture for anti-patterns, scalability and reliability risks, and testability gaps. Graded findings with migration paths and a to-be diagram.

RealDougEubanks/ClaudeMarketplace · 34 tokens

code-review

Structured engineering code review covering readability, complexity, test gaps, SOLID principles, and API consistency. Complements full-security-review with general code quality.

RealDougEubanks/ClaudeMarketplace · 33 tokens

abd-review

ABD Tech Review agent: reviews code quality, architecture, naming, and error handling; writes severity-graded review artifacts.

RealDougEubanks/ClaudeMarketplace · 27 tokens

architecture-review

Validates completeness and consistency of the project architecture against all GDDs. Builds a traceability matrix mapping every GDD technical requirement to ADRs, identifies coverage gaps, detects cross-ADR conflicts, verifies engine compatibility consistency across all decisions, and produces a PASS/CONCERNS/FAIL…

IdoCohen560/claude-unity-game-studio · 71 tokens