{"id":"f980aefc-474f-4f3a-8f97-0e51c75e350d","shortId":"ZsXxDy","kind":"skill","title":"prior-art","tagline":"Discover how a codebase already handles a specific concern — search broadly, find every instance, and assess consistency. The \"how does this app do X?\" tool.","description":"## Behavior\n\nResearch how this codebase handles `$ARGUMENTS`. Explore the codebase thoroughly and report what you find.\n\n### Step 1: Search Broadly\n\nCast a wide net across the codebase. Use multiple search strategies:\n\n- **Grep for keywords** — search for terms related to the concern (e.g. for error reporting: `error`, `exception`, `rescue`, `Sentry`, `Bugsnag`, `notify`, `report`)\n- **Check common Rails locations** — initializers, middleware, concerns, base classes, config files, lib/\n- **Check the Gemfile** — are there gems related to this concern? What do they tell you about the approach?\n- **Check application-level base classes** — `ApplicationController`, `ApplicationRecord`, `ApplicationJob` — these often set patterns that everything inherits\n- **Check for dedicated directories or files** — service objects, concerns, lib/ modules that handle this concern\n\nDon't stop at the first result. The goal is to find every place this concern is handled — the consistent pattern and the exceptions.\n\n### Step 2: Check Git History\n\nFor the key files involved in this concern:\n\n- `git log --oneline -10 <file>` to see recent changes\n- `git log --all --oneline --grep=\"<keyword>\"` to find commits related to the concern\n- Look for: when the pattern was established, whether it's evolved, any recent changes or migrations from one approach to another\n\nGit history reveals whether a pattern is settled or in flux — critical context before you build on top of it.\n\n### Step 3: Map What You Found\n\nReport the findings in this order:\n\n**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.\n\n**Where it lives** — list the key files and locations, grouped logically:\n\n- Configuration (initializers, middleware, config)\n- Base-level setup (ApplicationController, ApplicationRecord, etc.)\n- Implementation files (services, concerns, models, specific controllers)\n- Tests (how is this concern tested?)\n\nFor each file, include the path and a one-line description of its role.\n\n**The conventions** — what rules does this codebase follow for this concern? Be specific:\n\n- Is there a consistent pattern, or multiple approaches?\n- Are there abstractions (base classes, modules, shared concerns) or is it ad-hoc?\n- What naming conventions are used?\n- Is there test coverage for this concern?\n\n**Inconsistencies** — places where the pattern breaks or a different approach is used. Not a judgment — just \"here's where it's different and what's different about it.\" These are the spots where you'd want to understand why before extending the pattern.\n\n**Git context** — is this pattern stable, evolving, or recently changed? Any ongoing migrations or recent refactors worth knowing about?\n\n**How to extend it** — given what exists, what's the right way to add to or build on this pattern? Follow the existing convention unless there's a good reason not to. Name the specific file or directory where new code should go, and the pattern it should follow.\n\n---\n\n## Output Format\n\nReport in plain prose with clear headings. Include file paths for every reference. This is a research artifact — it should be useful as a reference doc for anyone working in this area of the codebase.\n\n## Tone\n\nThorough and neutral. You're an archaeologist, not a critic. Report what exists, how it works, where it's consistent, and where it isn't. Save opinions for the \"how to extend it\" section — and even there, ground the recommendation in what the codebase already does.","tags":["prior","art","rails","consultant","thoughtbot","agent-skills","claude-code-consulting","claude-code-plugin","claude-code-rails","claude-code-skill","claude-code-skills","claude-skills"],"capabilities":["skill","source-thoughtbot","skill-prior-art","topic-agent-skills","topic-claude-code-consulting","topic-claude-code-plugin","topic-claude-code-rails","topic-claude-code-skill","topic-claude-code-skills","topic-claude-skills"],"categories":["rails-consultant"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/thoughtbot/rails-consultant/prior-art","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add thoughtbot/rails-consultant","source_repo":"https://github.com/thoughtbot/rails-consultant","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 9 github stars · SKILL.md body (3,588 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:08:42.743Z","embedding":null,"createdAt":"2026-05-18T13:14:15.221Z","updatedAt":"2026-05-18T19:08:42.743Z","lastSeenAt":"2026-05-18T19:08:42.743Z","tsv":"'-10':182 '1':46 '2':167 '3':241 'abstract':358 'across':53 'ad':368 'ad-hoc':367 'add':457 'alreadi':8,575 'anoth':219 'anyon':522 'app':25 'applic':113 'application-level':112 'applicationcontrol':117,304 'applicationjob':119 'applicationrecord':118,305 'approach':110,217,257,282,355,391 'archaeologist':537 'area':526 'argument':35 'art':3 'artifact':512 'assess':19 'base':88,115,301,359 'base-level':300 'behavior':29 'break':387 'broad':14,48 'bugsnag':78 'build':235,460 'cast':49 'chang':186,212,434 'check':81,93,111,127,168 'class':89,116,360 'clear':274,500 'code':484 'codebas':7,33,38,55,264,341,529,574 'commit':194 'common':82 'concern':12,69,87,102,135,141,157,178,198,310,318,345,363,381 'config':90,299 'configur':296 'consist':20,161,351,550 'context':232,426 'control':313 'convent':275,336,372,467 'coverag':378 'critic':231,540 'd':416 'dedic':129 'describ':254 'descript':331 'differ':390,403,407 'directori':130,481 'discov':4 'doc':520 'e.g':70 'english':260 'error':72,74 'establish':205 'etc':306 'even':566 'everi':16,154,506 'everyth':125 'evolv':209,431 'except':75,165 'exist':450,466,543 'explor':36 'extend':422,446,562 'file':91,132,174,291,308,322,479,503 'find':15,44,153,193,248 'first':147 'flux':230 'follow':342,464,492 'format':494 'found':245 'gem':98 'gemfil':95 'git':169,179,187,220,425 'given':448 'go':486 'goal':150 'good':472 'grep':60,191 'ground':568 'group':294 'handl':9,34,139,159,265 'head':501 'histori':170,221 'hoc':369 'implement':307 'includ':323,502 'inconsist':382 'inherit':126 'initi':85,297 'instanc':17 'involv':175 'isn':554 'judgment':396 'key':173,290 'keyword':62 'know':442 'level':114,302 'lib':92,136 'line':330 'list':288 'live':287 'locat':84,293 'log':180,188 'logic':295 'look':199 'map':242 'middlewar':86,298 'migrat':214,437 'model':311 'modul':137,361 'multipl':57,281,354 'name':276,283,371,476 'net':52 'neutral':533 'new':483 'notifi':79 'object':134 'often':121 'one':216,261,329 'one-lin':328 'onelin':181,190 'ongo':436 'opinion':557 'order':251 'output':493 'paragraph':262 'path':325,504 'pattern':123,162,203,225,253,352,386,424,429,463,489 'place':155,383 'plain':259,497 'primari':256 'prior':2 'prior-art':1 'prose':498 'rail':83 're':535 'reason':473 'recent':185,211,433,439 'recommend':570 'refactor':440 'refer':507,519 'relat':66,99,195 'report':41,73,80,246,495,541 'rescu':76 'research':30,511 'result':148 'reveal':222 'right':454 'role':334 'rule':338 'save':556 'search':13,47,58,63 'section':564 'see':184 'sentri':77 'servic':133,309 'set':122 'settl':227 'setup':303 'share':362 'skill' 'skill-prior-art' 'source-thoughtbot' 'specif':11,312,347,478 'spot':413 'stabl':430 'step':45,166,240 'stop':144 'strategi':59 'tell':106 'term':65 'test':314,319,377 'thorough':39,531 'tone':530 'tool':28 'top':237 'topic-agent-skills' 'topic-claude-code-consulting' 'topic-claude-code-plugin' 'topic-claude-code-rails' 'topic-claude-code-skill' 'topic-claude-code-skills' 'topic-claude-skills' 'understand':419 'unless':468 'use':56,374,393,516 'want':417 'way':455 'whether':206,223 'wide':51 'work':523,546 'worth':441 'x':27,266 'y':269","prices":[{"id":"b5652635-3b98-46ae-827b-6189d8cb64e6","listingId":"f980aefc-474f-4f3a-8f97-0e51c75e350d","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"thoughtbot","category":"rails-consultant","install_from":"skills.sh"},"createdAt":"2026-05-18T13:14:15.221Z"}],"sources":[{"listingId":"f980aefc-474f-4f3a-8f97-0e51c75e350d","source":"github","sourceId":"thoughtbot/rails-consultant/prior-art","sourceUrl":"https://github.com/thoughtbot/rails-consultant/tree/main/skills/prior-art","isPrimary":false,"firstSeenAt":"2026-05-18T13:14:15.221Z","lastSeenAt":"2026-05-18T19:08:42.743Z"}],"details":{"listingId":"f980aefc-474f-4f3a-8f97-0e51c75e350d","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"thoughtbot","slug":"prior-art","github":{"repo":"thoughtbot/rails-consultant","stars":9,"topics":["agent-skills","claude-code-consulting","claude-code-plugin","claude-code-rails","claude-code-skill","claude-code-skills","claude-skills"],"license":"mit","html_url":"https://github.com/thoughtbot/rails-consultant","pushed_at":"2026-03-27T16:24:47Z","description":"A collection of skills for Rails development and consulting with an emphasis on learning, communication, and client success. ","skill_md_sha":"7e6d2918fa1d3bd8f0e948cd8b632e73bd340b15","skill_md_path":"skills/prior-art/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/thoughtbot/rails-consultant/tree/main/skills/prior-art"},"layout":"multi","source":"github","category":"rails-consultant","frontmatter":{"name":"prior-art","description":"Discover how a codebase already handles a specific concern — search broadly, find every instance, and assess consistency. The \"how does this app do X?\" tool."},"skills_sh_url":"https://skills.sh/thoughtbot/rails-consultant/prior-art"},"updatedAt":"2026-05-18T19:08:42.743Z"}}