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 skills/freepeak/ktme/test-driven-developmentnpx skills add FreePeak/ktme --skill test-driven-developmentgit clone --depth 1 https://github.com/FreePeak/ktmeWhat 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.00020 | $0.03203 |
| Opus 5 | $0.00010 | $0.01602 |
| Sonnet 5 | $0.00004 | $0.00641 |
| Haiku 4.5 | $0.00002 | $0.00320 |
Grade A, and why
test-driven-development 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 2d 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 — 597 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Development
A disciplined approach to development where tests drive the design and implementation of code.
When to Use
Use this skill when:
- Implementing new features
- Fixing bugs (write test first to capture bug)
- Refactoring existing code
- Building new modules or components
- Writing library code
The TDD Cycle
The Three Laws of TDD
- Red: Write a failing test before writing production code
- Green: Write the minimal code to make the test pass
- Refactor: Clean up the code while keeping tests green
Visual Workflow
┌─────────┐
│ RED │ ──► Write failing test
└────┬────┘
│
▼
┌─────────┐
│ GREEN │ ──► Write minimal code to pass
└────┬────┘
│
▼
┌──────────┐
│ REFACTOR │ ──► Improve code quality
└─────┬────┘
│
└──► Repeat
Phase 1: RED - Write Failing Test
Goal: Write a test that fails because the feature doesn't exist yet
Steps
-
Understand the requirement
- What should the code do?
- What are the inputs and outputs?
- What are the edge cases?
-
Write a minimal test
- Test one thing only
- Use descriptive test name
- Focus on behavior, not implementation
-
Run the test
- Verify it fails for the right reason
- The test should fail, not crash
- Error message should be informative
Test Template
#[test]
fn test_<behavior_description>() {
// Arrange - Set up test data
let input = /* test input */;
let expected = /* expected output */;
// Act - Execute the behavior
let result = function_under_test(input);
// Assert - Verify the outcome
assert_eq!(result, expected);
}
Examples
// ✅ Good: Test behavior with descriptive name
#[test]
fn test_calculate_total_returns_sum_of_item_prices() {
let items = vec![
Item { name: "A", price: 10.0 },
Item { name: "B", price: 20.0 },
];
let result = calculate_total(&items);
assert_eq!(result, 30.0);
}
// ✅ Good: Test edge case
#[test]
fn test_calculate_total_returns_zero_for_empty_items() {
let items = vec![];
let result = calculate_total(&items);
assert_eq!(result, 0.0);
}
// ✅ Good: Test error case
#[test]
fn test_parse_config_returns_error_for_invalid_toml() {
let invalid_toml = "not valid toml [[[";
let result = parse_config(invalid_toml);
assert!(result.is_err());
assert!(matches!(result.unwrap_err(), ConfigError::InvalidToml(_)));
}
// ❌ Bad: Testing implementation details
#[test]
fn test_internal_parser_helper() {
// Don't test private functions directly
}
// ❌ Bad: Multiple assertions in one test
#[test]
fn test_everything() {
assert_eq!(func1(), 1);
assert_eq!(func2(), 2);
assert_eq!(func3(), 3); // If func2 fails, we don't test func3
}
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.
- 2d ago First seen · 597 lines · 20 tokens per session scan A 5c1a703cb01e
test-driven-development is a skill published in the GitHub repository FreePeak/ktme (15 stars, last pushed 6mo ago), licensed MIT. It adds 20 tokens to every session and 3,203 once invoked, about $0.0001 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 skills, from other repositories
agent-integration
Run all three agent integration phases sequentially: research, write-tests, and implement using E2E-first TDD (unit tests written last). For individual phases, use /agent-integration:research, /agent-integration:write-tests, or /agent-integration:implement. Use when the user says "integrate agent", "add agent…
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
code-assist
Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical Implementation Partner and TDD Coach — following existing patterns, avoiding over-engineering, and producing idiomatic, modern code.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
css-design-tdd
Test-driven CSS design system modifications. Run checks before/after CSS changes to verify token usage, variable definitions, fallbacks, and consistency. Use when modifying CSS tokens, fixing design inconsistencies, or auditing CSS architecture.
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.