No slash command · from tea-rags
Writes failing tests before implementation during the RED phase of TDD. Ensures each test fails for the right reason (assertion or missing behavior, not harness errors). Supports CREATE, EXTEND, MODIFY, refactor, and bug fix modes.
Ships in tea-rags. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
RED phase. Output = recorded red, the gate GENERATE needs. No production code here.
Lag / drift ≠ licence to leave tea-rags (core). Own checkout, changedFiles > 0
→ incremental index_codebase; subagent / linked worktree → never reindex. →
tea-rags://guide/freshness.
Cannot find module,
is not defined at import, SyntaxError, ENOENT on fixture. Harness
failure → fix TEST harness (import path, fixture, setup), re-run; never count
as red. CREATE, module / symbol not yet existing → stub (signature only, body
throws not-implemented) so run reaches assertion; stub = scaffolding, not
implementation.Caller passes mode (data-driven-generation Step 0) + change kind:
| Change kind | New test | Baseline |
|---|---|---|
| CREATE / EXTEND | yes — one per behaviour, red | — |
| MODIFY, behaviour change | yes — the new behaviour, red | tests-at-risk pins run FIRST, must be GREEN |
| refactor / move (behaviour-neutral) | NO | tests-at-risk pins + target's own tests GREEN = the invariant |
| bug fix | yes — reproduction, red on the reported symptom | tests-at-risk pins GREEN |
Named exceptions only (state ONE line, then skip RED):
EXCEPTION no-tests — <language> has no recognised test files in this project
or EXCEPTION config-docs — change touches only config / docs, no behaviour.
"Too small", "trivial", "hotfix", "time" are not exceptions.
tea-rags:tests-as-context recipe tests-at-risk (affectedFiles = target
files, intent = change description). Run those scenarios + target's own test
file BEFORE any edit.
PIN-UPDATED <test> — <spec line>).
Other pins untouched.Refactor / move: baseline = whole RED output, no new test. Done → caller.
Before writing a test:
tea-rags:tests-as-context recipe fixture-lookup (intent = setup needed)
→ reuse existing setup; never invent mock project already has. SKIP → proceed
without.find_symbol(relativePath=<test file>).RED <mode>/<change kind>
RED <test> — FAIL: <failure excerpt | [planned; not run]> — right reason: <assertion | stub>
BASELINE: <n> pins green | unpinned | pre-existing red: <test ids>
PIN-UPDATED <test> — <spec line> (only when Step 1 rule fired)
EXCEPTION <kind> — <reason> (only when Step 0 exception fired)
One RED line per new test — the only definition of that line. Plan-only /
not-yet-run answer still prints it, excerpt [planned; not run], right reason =
the one the run must show; "I would run the test" without the line = RED not
done.
Caller (data-driven-generation 6b GREEN) implements until every listed test and every baseline pin is green.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tdd, red-phase, test-driven-development, test-first, testing-workflow
npx claudepluginhub artk0de/tearags-mcp --plugin tea-rags17 skills in this plugin
/analytics-rerankPick tea-rags rerank preset, build `{custom: {...}}` weight set, or compose analytics-driven search (ownership, tech-debt, hotspots, code-review, security-audit, fragile-silo). Invoke on intent like "rank by ownership", "find tech debt", "hotspot scan", "code review of recent changes", "security audit of auth code", "code that looks stable but breaks a lot", "custom weights for impact analysis". NOT for project health scan needing cross-preset overlap — use `tea-rags:risk-assessment`. NOT for debug root-cause — use `tea-rags:bug-hunt`. NOT for filter shape — use `tea-rags:filter-building`./architecture-diagnosticsDiagnose structural violations for an explicit architecture audit, an explicit invocation of this skill, or structural refactoring. Assess dependency/layer violations, coupling and move candidates. Not for context gathering, code overviews, behavior or contract questions, or routine feature work. Risk/health uses risk-assessment; failures use bug-hunt; plain cycles use find_cycles./bug-huntFind source of concrete failure — rank historically buggy code (high bugFixRate + churn) AND freshly changed never-fixed code (committed or still uncommitted) against symptom. Triggers on "debug X", "why does Y fail", "test fails", "stack trace says Z", "find bugs in X", "found a bug in X — show / compare Y", "suspects in X and Y — search both", a search hit with bugFixRate / ageDays labels ("proceed?", "проверь там"), "where is error 'X' in code", "где в коде строка / упоминается 'X'", "when did error 'X' appear in git history", "когда появилась ошибка 'X'", "read the whole file" / "прочитай весь файл" of a search hit, "падает". NOT for code history without an error string or failure ("when did X change", "посмотри через git" alone) — core routing answers it. NOT for code health scanning without bug intent — use risk-assessment for that./data-driven-generationDecide HOW to write or change code by inspecting git signals on neighbors — classifies task mode (CREATE / EXTEND / MODIFY), pulls strategy and templates from proven low-churn implementations, reuses existing shared helpers. Triggers on "implement function X", "add method to class Y", "write a helper for Z", "modify function X", "change behavior of Y", "напиши функцию", "добавь метод", "поправь метод", "измени поведение", "overlay labels → strategy?", a hotfix with location + fix named (cause known → not bug-hunt). NOT for discovery — use tea-rags:explore. NOT for pure rename/extract; a file MOVE still routes here./exploreUse for questions about existing code behavior, usages, structure, examples, or explicit pre-change context that need investigation. Not bug symptoms, implementation-plan authoring, or broad code-health audits./extract-project-patternsAgentic-only — runs on any behaviorQuery / positiveIds handoff: proven code as code-gen templates, not test patterns. Returns templates + locality (target subdomain → infra prefix → project). Read body before planning. Called by data-driven-generation Step 2, dinopowers writing-plans / executing-plans. No input → returns { templates: [], locality: "none", diagnostics: ["no input"] }, zero calls.Other plugins' skills for the same job