From tea-rags
Inspects git signals on nearby code to select codegen strategy and templates from proven, low-churn implementations before writing new code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tea-rags:data-driven-generationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Select codegen strategy from git signal labels. Uses overlay labels from TeaRAGs
Select codegen strategy from git signal labels. Uses overlay labels from TeaRAGs results — not hardcoded thresholds — strategies adapt per codebase automatically.
Area context required: files, pathPattern, overlay labels from
risk-assessment must be in conversation. If missing, invoke /tea-rags:explore
for target area — explore detects pre-generation intent, gathers context
automatically. If explore output already exists this conversation, use it.
Labels live in rankingOverlay.file.<signal> and
rankingOverlay.chunk.<signal>. Each labeled value:
{ value: N, label: "high" }.
For label definitions: tea-rags://schema/signal-labels. For thresholds:
get_index_metrics.
Use overlay labels from research output. Apply hard rules first:
| Condition | Strategy |
|---|---|
| chunk.bugFixRate "critical" + file.ageDays "old"/"legacy" | DEFENSIVE |
| chunk.commitCount "high"+ + file.churnVolatility "erratic" | STABILIZATION |
| file.ageDays "legacy" + chunk.commitCount "low" | CONSERVATIVE |
| No match | STANDARD |
Autonomous Judgment Protocol — when no hard rule matches:
Signal axes:
Load strategy: Check for project skill strategy-<mode> in
.claude/skills/. If found → use it. If not → read strategies/<mode>.md.
Custom strategy discovery: Scan .claude/skills/ for strategy-* skills.
Read ## When section. Custom conditions evaluated before hard rules.
Delegate to tea-rags:extract-project-patterns with:
positiveIds | positiveCode = best verified result from Step 1 cascade (or
set behaviorQuery if no chunk/code available)pathPatternL1 = pathPattern from explore PG-OUTPUTlimit = 10Read templates[0] as reference for Step 4 (GENERATE). Recipe owns the locality
cascade (L1 = subdomain, L2 = first 2 segments, L3 = project) and the quality
gate (commitCount low/typical + ageDays old/legacy + bugFixRate healthy; reject
if bugFixRate critical or ageDays recent + commitCount low).
Read locality to inform Step 3 (STYLE):
L1 → use template's blameDominantAuthor for style + review routing.L2 → blameDominantAuthor reviews technique, not exact code.L3 → blameDominantAuthor reviews technique only; verify architectural fit
before adopting verbatim.none → no template; generate from scratch, surface to user so they
scrutinize result.Use blameDominantAuthor from explore pre-gen output (live-line owner — person
whose code you'd match/extend). Style copy mirrors CURRENT code, not historical
commit activity, so use blame-based.
| file.blameDominantAuthorPct.label | Behavior |
|---|---|
| "deep-silo" | Match exactly. Flag the live-line owner for review. |
| "silo" | Match dominant patterns closely. Owner should review. |
| "concentrated" | Follow dominant patterns, minor flexibility. |
| "shared" | Project conventions. Opportunity to unify. |
If recentDominantAuthor differs from blameDominantAuthor (long-time owner
left, new contributor took over): defer to blameDominantAuthor for style
(their code is what's there now), but flag recentDominantAuthor as secondary
reviewer for fastest turnaround.
Apply selected strategy + style. Generate code.
Verify ALL referenced identifiers:
Assess blast radius of change you just generated.
## Enrichment lists codegraph.symbols): use the
blastRadius preset (rerank="blastRadius", metaOnly=true) — real fanIn +
churn + bugFix, ranking reflects actual call/import edges, not raw-import
proxy. Warn on high-fanIn / isHub dependents.codegraph.symbols in prime → fanIn signal absent):
fall back to custom weights { imports: 0.5, churn: 0.3, ownership: 0.2 },
metaOnly=true, note blast radius is approximate (import-proxy, not edge
truth). See search-cascade "Graph navigation".Warn on high-impact modules. Flag shared taskIds → coordinated change.
npx claudepluginhub artk0de/tearags-mcp --plugin tea-ragsEnriches brainstorming with tea-rags git signals (hotspots, ownership, tech debt) before invoking superpowers:brainstorming, ensuring creative exploration is grounded in real code state.
Internal skill for code-gen pipelines that retrieves battle-tested reference code from the project via a three-level locality cascade (subdomain → domain → project-wide). Used by parent skills like tea-rags and dinopowers to find templates for generation or modification.
Implementation skill emphasizing verification-driven coding with tight feedback loops. Guides multi-step implementation work: orient, plan, implement, verify, commit. Based on analysis of 21k+ operations.