← ClaudeAtlas

pattern-minelisted

Extracts the codebase's own convention before building something new — finds the three closest existing examples, reads them fully, derives what they agree on. Run it before creating any component, service, store slice, test, route or form.
AlpayC/claude-skill-set · ★ 0 · AI & Automation · score 60
Install: claude install-skill AlpayC/claude-skill-set
# Pattern mine An agent writing a component from general knowledge produces idiomatic code for the framework and foreign code for the repo. Reviewers reject it, and they are right to: it is a second way to do a thing that already had one. The fix is mechanical. Before writing, read what exists. ## 1 — Find three Three, not one. One example is indistinguishable from an accident; three reveal what is deliberate. Search by structural similarity, not by name. For a paginated table with row actions, the nearest neighbours are other paginated tables with row actions — in any app, in any feature. - Same project first (local convention wins over workspace convention) - Then sibling projects with the same stack, per `docs/agent/repo-map.md` - Prefer **recently touched** files: `git log -1 --format=%ai -- <file>`. A three-year-old component shows the convention the team is migrating away from, and copying it propagates the thing they are trying to delete. When three do not exist, say so. Two is thin evidence; one is precedent, not convention; zero means you are establishing the pattern, which is a ledger entry and worth flagging in the PR. ## 2 — Read them fully In full, not skimmed. The convention is usually in the parts that look like boilerplate: how errors are handled, where types are declared, what is exported from the barrel, how the test is arranged, what the file header carries. Read the three in parallel — one subagent each, each returning the extracted slots below w