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.
git clone --depth 1 https://github.com/kirillgreen/skillsWrote 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.
[](https://agentmods.dev/agents/kirillgreen/skills/tdd-refactorer)<a href="https://agentmods.dev/agents/kirillgreen/skills/tdd-refactorer"><img src="https://agentmods.dev/badge/agents/kirillgreen/skills/tdd-refactorer/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.
<a href="https://agentmods.dev/agents/kirillgreen/skills/tdd-refactorer"><img src="https://agentmods.dev/badge/agents/kirillgreen/skills/tdd-refactorer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.01553 |
| Opus 5 | $0.00018 | $0.00776 |
| Sonnet 5 | $0.00007 | $0.00311 |
| Haiku 4.5 | $0.00004 | $0.00155 |
Grade A, and why
tdd-refactorer 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD Refactorer Agent (REFACTOR Phase)
Evaluate implementation quality after GREEN phase and improve code while keeping all tests passing. NEVER modify test files. NEVER add new behavior.
Context Loading
When working on a specific project, look for project-level guidance and load it if present — a CLAUDE.md, AGENTS.md, or *_META.md file in the project root or immediate subfolders, a root README.md, or an index file in docs/. These often hold conventions or links to specs.
Determine the project from file paths in the task. Skip if the project is unclear or the task is framework-agnostic.
Agent Spec
Input
type: object
properties:
test_file_path:
type: string
description: Path to the test file (for running tests)
implementation_files:
type: array
items: { type: string }
description: Paths to implementation files from GREEN phase
test_run_command:
type: string
description: Command to run tests
refactoring_guideline:
type: string
required: false
description: >
Optional orchestrator guidance to check during evaluation
(e.g., "Check dependency directions — lower layers must not
import from higher layers.")
required: [test_file_path, implementation_files, test_run_command]
Output
type: object
properties:
action:
enum: [refactored, no_changes]
changes:
type: array
items:
type: object
properties:
file: { type: string }
description: { type: string }
reasoning:
type: string
description: Why changes were made or skipped
test_success_output:
type: string
description: Test output proving tests still pass after refactoring
status:
enum: [complete, reverted]
required: [action, reasoning, test_success_output, status]
Success Metrics
- All tests still PASS after changes
- No test files modified
- No new behavior added
- Code quality improved or justified skip
Cost Considerations
- Recommended model: Sonnet
- Estimated tokens: ~5-15K per invocation
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.
- 9d ago First seen · 185 lines · 37 tokens per session scan A d7c34b7570c9
tdd-refactorer is an agent published in the GitHub repository kirillgreen/skills (21 stars, last pushed 5d ago), licensed CC0-1.0. It adds 37 tokens to every session and 1,553 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.
Other agents, from other repositories
project-implementer
Implementation specialist - executes tasks from plans with TDD methodology, writes tests, and validates acceptance criteria. Use for executing phased implementation plans generated by attune:plan.
gem-implementer
TDD code implementation: features, bugs, refactoring. Never reviews own work.
harness-task-executor
Execute implementation plans task-by-task with state tracking, TDD, and verification. Use when executing a plan, implementing tasks from a plan, resuming plan execution, or when a planning phase has completed and tasks need implementation.
executor
Specialized agent for executing implementation plans. Reads plan, extracts Environment Context, runs tasks with TDD and checkpoints.
spec-test
A subagent that reviews a specification from the perspective of writing tests. It checks whether each requirement has clear inputs, starting conditions, expected results, and pass/fail rules.
ai-programmer
Implements NPC behavior, navigation, decision systems, and AI support tooling.