idako7/bookaction/tdd-workflow

Claude Code and agent skill by idako7/bookaction

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Enforces test-driven development workflow rules. Consult this skill whenever writing tests, implementing features, or working with the __tests__/ directory. Also consult when Claude needs to decide whether to modify a test file or an implementation file. This skill applies to all test-related and implementation tasks.

Install

npx vskill@latest install idako7/bookaction/tdd-workflow

SKILL.md

The same SKILL.md was published earlier as idako7/bookaction/tdd-workflow.

TDD Workflow Rules

This project uses strict two-phase TDD. The phases are enforced by hooks and slash commands.

Phase 1: Write Tests (red state)

Invoked by: /project:write-tests [feature description]

In this phase:

  • Create test files in __tests__/integration/
  • Use Jest + Supertest for testing
  • Cover happy paths, error cases, and edge cases
  • Do not write any implementation code
  • End state: all new tests FAIL

Phase 2: Implement (green state)

Invoked by: /project:implement [feature description] Requires: CLAUDE_TDD_MODE=implement environment variable

In this phase:

  • Read failing tests to understand expected behavior
  • Write minimum implementation to pass tests
  • Files in __tests__/ are blocked by a PreToolUse hook — do not attempt to edit them
  • Follow Routes -> Controllers -> Services -> Repositories -> Prisma architecture
  • End state: all tests PASS

When to consult this skill

  • Before creating any file in __tests__/: check which phase you are in
  • Before modifying any test file: this is only allowed in Phase 1
  • When a test fails during implementation: fix the implementation, not the test
  • When deciding where to put new code: follow the file naming conventions below

File placement reference

TypePath patternNaming
Integration test__tests__/integration/{feature}.test.tskebab-case
Unit test__tests__/unit/{feature}.test.tskebab-case
Routesrc/routes/{feature}.tskebab-case
Controllersrc/controllers/{feature}Controller.tscamelCase
Servicesrc/services/{feature}Service.tscamelCase
Repositorysrc/repositories/{feature}Repository.tscamelCase
Typessrc/types.tsshared types file

Composition rule

Routes -> Controllers -> Services -> Repositories -> Prisma

Test structure template

typescript
describe('Feature: [feature name]', () => {
function setup() {
const { app, prisma, getAuthToken } = await import('../../tests/setup');
}
it('should [expected behavior] when [condition]', async () => {
// 1. Arrange: set up initial state
// 2. Act: perform the action
// 3. Assert: check the result
});
});

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/idako7/bookaction/tdd-workflow/badge)](https://verified-skill.com/skills/idako7/bookaction/tdd-workflow)

Something wrong with this skill or its page? Tell us.