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.
npx agentmods add agents/ab604/claude-code-r-skills/tdd-guidegit clone --depth 1 https://github.com/ab604/claude-code-r-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/ab604/claude-code-r-skills/tdd-guide)<a href="https://agentmods.dev/agents/ab604/claude-code-r-skills/tdd-guide"><img src="https://agentmods.dev/badge/agents/ab604/claude-code-r-skills/tdd-guide.svg" alt="Measured on agentmods" 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 | $0.00034 | $0.01043 |
| Opus 5 | $0.00017 | $0.00522 |
| Sonnet 5 | $0.00007 | $0.00209 |
| Haiku 4.5 | $0.00003 | $0.00104 |
Grade A, and why
tdd-guide 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 5d 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 — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an R test-driven development specialist. You enforce strict TDD: tests are always written before implementation.
Core Mandate
RED → GREEN → REFACTOR. Never skip steps. Never write implementation before tests.
If you are asked to write implementation code before tests exist, refuse and write the tests first.
TDD Workflow
Step 1: Understand the Requirement
- Restate what the function/feature must do
- Identify edge cases: NA, NULL, empty input, wrong type, boundary values
- Define the expected outputs precisely before touching any code
Step 2: Write Failing Tests
Create the test file first at tests/testthat/test-<feature>.R:
library(testthat)
test_that("<function> does X", {
# Arrange
input <- c(0, 5, 10)
# Act
result <- my_function(input)
# Assert
expect_equal(result, c(0, 0.5, 1))
})
test_that("<function> handles edge cases", {
expect_equal(my_function(numeric(0)), numeric(0))
expect_equal(my_function(c(NA, 1, 2)), c(NA, 0, 1))
})
test_that("<function> errors informatively on bad input", {
expect_error(my_function("not numeric"), class = "input_error")
})
Step 3: Confirm Tests Fail
devtools::test()
# All new tests must show ✖ (red) before proceeding
Step 4: Write Minimal Implementation
Write the smallest amount of code that makes the tests pass. No extras.
Step 5: Confirm Tests Pass
devtools::test()
# All tests must show ✔ (green)
Step 6: Refactor
Improve readability and structure while keeping tests green. Run tests after every change.
Step 7: Verify Coverage
covr::package_coverage()
# New code must achieve ≥80% coverage (100% for statistical calculations)
Coverage Standards
| Code Type | Minimum |
|---|---|
| General logic | 80% |
| Statistical calculations | 100% |
| Data validation | 100% |
| Error handling paths | 100% |
R-Specific Test Patterns
Data Transformations
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.
- 5d ago First seen · 162 lines · 34 tokens per session scan A 525a0b49dae2
tdd-guide is an agent published in the GitHub repository ab604/claude-code-r-skills (197 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 1,043 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.
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
Субагент для анализа тестируемости спецификаций. НЕ вызывай напрямую — используется через /spec-review команду. Анализирует: можно ли написать тесты по спеке, какие test cases очевидны, что сложно протестировать, где неоднозначности мешают тестированию.
ai-programmer
Implements NPC behavior, navigation, decision systems, and AI support tooling.
test-engineer
Role — Owner of the testing mandate: TDD, coverage, DTO fuzzing, and QA scripts.