proffesor-for-testing/agentic-qe

strict-tdd

Use when enforcing TDD discipline — blocks writing production code unless a failing test exists first. Activate with /strict-tdd to enable session-scoped Red-Green-Refactor guardrail.

First seen Mar 20, 2026

Installation

$ npx skills add proffesor-for-testing/agentic-qe --skill strict-tdd

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from proffesor-for-testing/agentic-qe · top by installs.

npx skills add proffesor-for-testing/agentic-qe

Browse all from proffesor-for-testing/agentic-qe

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 475
License LICENSE
Default branch main
Open issues 25
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,992 B
  • docs SUMMARY.md 203 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 51 installs

SKILL.md

Strict TDD Mode

When activated, this skill registers a session-scoped hook that enforces Red-Green-Refactor discipline.

What It Does

Blocks writes to src/ (production code) unless:

  1. A test file exists that covers the target module
  2. That test has at least one failing assertion (Red phase confirmed)

This prevents the common agent failure of writing test + implementation simultaneously.

Activation

/strict-tdd

Remains active for the current session only.

Hook Configuration

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hook": ".claude/skills/strict-tdd/scripts/enforce-red-phase.sh",
        "condition": "file matches src/**/*.{ts,js} AND NOT src/**/*.test.{ts,js}"
      }
    ]
  }
}

Enforcement Logic

#!/bin/bash
# enforce-red-phase.sh
# Called before any Write/Edit to src/ files

TARGET_FILE="$1"
TEST_FILE="${TARGET_FILE%.ts}.test.ts"

if [ ! -f "$TEST_FILE" ]; then
  echo "BLOCKED: No test file found at $TEST_FILE"
  echo "Write a failing test first (Red phase), then implement."
  exit 1
fi

# Check if tests are currently failing (Red phase)
npx jest "$TEST_FILE" --passWithNoTests 2>/dev/null
if [ $? -eq 0 ]; then
  echo "WARNING: Tests are passing. Are you in Green/Refactor phase?"
  echo "If adding new behavior, write a failing test first."
fi

Gotchas

  • Only blocks src/ files — test files and config files are always writable
  • During Refactor phase, tests should still pass — this is expected, don't treat as violation
  • If test runner isn't installed, hook will error — ensure jest/vitest is available
  • Agent may try to write to a different path to bypass — the hook should match all production code paths