cc-audit: Skill for Claude Code

.claude/skills/tdd-coach/SKILL.md

tdd-coach is a skill for Claude Code from ryo-ebata/cc-audit. It costs 46 tokens per session (1,023 once invoked), scanned A, original, MIT.

A coaching workflow for test-driven development, or TDD: writing a failing test, adding the smallest code that passes it, and then cleaning up the code.

In plain words
What is it for?
Use it when adding features, fixing bugs, or changing rules in the cc-audit project, with commands for testing, coverage, formatting, and linting.
Why use it?
It helps ensure new behavior is tested before implementation and reduces the risk of changes that are difficult to verify.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is ryo-ebata/cc-audit's own configuration. It tells Claude Code how to work on cc-audit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-audit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ryo-ebata/cc-audit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ryo-ebata/cc-audit/main/.claude/skills/tdd-coach/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ryo-ebata/cc-audit

Made for: Claude Code.

Wrote 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.

agentmods badge for tdd-coach

README.md
[![agentmods](https://agentmods.dev/badge/skills/ryo-ebata/cc-audit/tdd-coach/github.svg)](https://agentmods.dev/skills/ryo-ebata/cc-audit/tdd-coach)
Your own site
<a href="https://agentmods.dev/skills/ryo-ebata/cc-audit/tdd-coach"><img src="https://agentmods.dev/badge/skills/ryo-ebata/cc-audit/tdd-coach/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.

agentmods 80×15 button for tdd-coach

Your own site · 80×15
<a href="https://agentmods.dev/skills/ryo-ebata/cc-audit/tdd-coach"><img src="https://agentmods.dev/badge/skills/ryo-ebata/cc-audit/tdd-coach.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,023 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01023
Opus 5 $0.00023 $0.00511
Sonnet 5 $0.00009 $0.00205
Haiku 4.5 $0.00005 $0.00102

Measured 9d ago against content hash 0e070e0880be, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tdd-coach 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.

.claude/skills/tdd-coach/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Coach for cc-audit

Core Principle

Tests drive implementation, never the reverse.

Red-Green-Refactor Cycle

1. Red: Write a Failing Test First

#[test]
fn test_new_feature_behavior() {
    // Arrange: Set up test data
    let input = "malicious pattern here";

    // Act: Call the function (doesn't exist yet)
    let result = detect_new_pattern(input);

    // Assert: Define expected behavior
    assert!(result.is_some());
    assert_eq!(result.unwrap().rule_id, "EX-011");
}

Verify the test fails:

cargo test test_new_feature_behavior

2. Green: Write Minimal Code to Pass

  • Implement only what's needed to pass the test
  • No extra features, no premature optimization
  • "Fake it till you make it" is acceptable

3. Refactor: Clean Up While Green

  • Remove duplication
  • Improve naming
  • Extract functions if needed
  • Tests must stay green throughout

Workflow Commands

# Run specific test
cargo test <test_name>

# Run with output
cargo test -- --nocapture

# Check coverage (maintain 90%+)
cargo llvm-cov --summary-only

# Format and lint
cargo fmt --all && cargo clippy -- -D warnings

Rules for cc-audit Development

DO

  • Write test BEFORE implementation
  • Confirm test fails before writing code
  • Make smallest possible change to pass test
  • Run full test suite after each green phase
  • Use cargo insta for snapshot tests

DO NOT

  • Write implementation first, then retrofit tests
  • Modify tests to match buggy implementation
  • Skip the red phase
  • Add multiple features in one cycle
  • Use #[allow(...)] or #[cfg(not(coverage))]

Example: Adding a New Detection Rule

Step 1: Write Failing Test

// tests/rules/exfiltration.rs
#[test]
fn test_ex011_detects_dns_exfiltration() {
    let scanner = ExfiltrationScanner::new(Default::default());
    let malicious = "dns.lookup(base64.encode(secret))";

    let result = scanner.scan(malicious, Path::new("test.js")).unwrap();

    assert!(!result.findings.is_empty());
    assert_eq!(result.findings[0].rule_id, "EX-011");
}

#[test]
fn test_ex011_ignores_normal_dns() {
    let scanner = ExfiltrationScanner::new(Default::default());
    let benign = "dns.lookup('example.com')";

    let result = scanner.scan(benign, Path::new("test.js")).unwrap();

    assert!(result.findings.is_empty());
}

Read the full file on GitHub · 180 lines

Changes

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.

  1. 9d ago First seen · 180 lines · 46 tokens per session scan A 0e070e0880be

Subscribe to this mod's changes

tdd-coach is a skill published in the GitHub repository ryo-ebata/cc-audit (24 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 1,023 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.

Related

Other skills, from other repositories

ralphctl-debugging-and-error-recovery

Systematic root-cause debugging. Use when tests fail, builds break, or behaviour does not match expectations. Follow stop-the-line → reproduce → localize → reduce → root-cause → guard-with-regression-test → verify, not guessing; the reproduction and regression steps follow the same red-green discipline as…

lukas-grigis/ralphctl · 78 tokens

bug-fix

A structured bug-fixing workflow that takes a problem from reproduction and evidence-based cause finding through approval, implementation, testing, and cleanup.

rushengzhou/sid-code · 62 tokens

qa-cycle

QA + bugfix cycle until it passes.

Guild-Agents/guild · 11 tokens

simplicio-dev-cli

Perform deterministic Simplicio code changes and validation through the Dev CLI. Use for file edits, patches, implementation, formatting, tests, diagnostics, pre-effect validation, retries, evidence files, and safe mutation workflows. The agent decides intent; Dev CLI owns the mutation and verification.

wesleysimplicio/simplicio · 62 tokens

qa

QA test a live website with Axon discovery/content evidence plus browser automation when interaction is required. Use when the user wants exploratory QA, form testing, navigation/link checks, responsive checks, performance observations, bug reports, or a pre-launch quality review.

dinglebear-ai/axon · 52 tokens

debug-forensic

Compresser une session de debug en cours et produire un prompt forensique strict (donnees -> hypothese unique -> test decisif -> STOP). A utiliser quand un debug long ou complexe derive vers la speculation, ou quand le contexte de la conv est sature et qu'il faut basculer sur une session vierge sans perdre les…

Bidiche49/claude-conf · 77 tokens