home/common/programs/claude/skills/tdd-cycle/SKILL.md
Execute a full TDD red-green-refactor cycle
npx skillsauth add naps62/nixos-config home/common/programs/claude/skills/tdd-cycleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:
Analyze requirements for: $ARGUMENTS. Define acceptance criteria, identify edge cases, and create test scenarios.
Design test structure, fixtures, mocks, and test data strategy. Ensure testability and maintainability.
Write FAILING unit tests. Tests must fail initially. Include edge cases, error scenarios, and happy paths. DO NOT implement production code yet.
Verify all tests are failing correctly. Ensure failures are for the right reasons (missing implementation, not test errors).
GATE: Do not proceed until all tests fail appropriately.
Implement MINIMAL code to make tests pass. Focus only on making tests green. Do not add extra features or optimizations.
Run all tests and verify they pass. Check coverage metrics. Ensure no tests were accidentally broken.
GATE: All tests must pass before proceeding.
Refactor implementation while keeping tests green. Apply SOLID principles, remove duplication, improve naming. Run tests after each refactoring.
Refactor tests: remove duplication, improve names, extract common fixtures. Ensure coverage unchanged or improved.
Write FAILING integration tests. Test component interactions, API contracts, and data flow.
Make integration tests pass. Focus on component interaction and data flow.
TDD implementation for: $ARGUMENTS
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
React component patterns with TypeScript examples. Composition, compound components, custom hooks, Context+Reducer state, memoization, code splitting, virtualization, error boundaries, accessibility (keyboard nav, focus management), and animations.
data-ai
Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.
development
MUST USE for ANY git operations. Atomic commits, rebase/squash, history search (blame, bisect, log -S). STRONGLY RECOMMENDED: Use with delegate_task(category='quick', load_skills=['git-master'], ...) to save context. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'.