tdd:write-tests

neolabhq/context-engineering-kit · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/neolabhq/context-engineering-kit --skill tdd:write-tests
0 commentsdiscussion
summary

User can provide a what tests or modules to focus on:

skill.md

Cover Local Changes with Tests

User Arguments

User can provide a what tests or modules to focus on:

$ARGUMENTS

If nothing is provided, focus on all changes in current git diff that not commited. If everything is commited, then will cover latest commit.

Context

After implementing new features or refactoring existing code, it's critical to ensure all business logic changes are covered by tests. This command orchestrates automated test creation for local changes using coverage analysis and specialized agents.

Goal

Achieve comprehensive test coverage for all critical business logic in local code changes.

Important Constraints

  • Focus on critical business logic - not every line needs 100% coverage
  • Preserve existing tests - only add new tests, don't modify existing ones
  • "Analyse complexity of changes" -
    • if there 2 or more changed files, or one file with complex logic, then Do not write tests yourself - only orchestrate agents!
    • if there is only one changed file, and it's a simple change, then you can write tests yourself.

Workflow Steps

Preparation

  1. Read sadd skill if available

    • If available, read the sadd skill to understand best practices for managing agents
  2. Discover test infrastructure

    • Read @README.md and package.json (or equivalent project config)
    • Identify commands to run tests and coverage reports
    • Understand project structure and testing conventions
  3. Run all tests

    • Execute full test suite to establish baseline

Analysis

Do steps 4-5 in parallel using haiku agents:

  1. Verify single test execution

    • Choose any passing test file
    • Launch haiku agent with instructions to find proper command to run this only test file
      • Ask him to iterate until you can reliably run individual tests
    • After he complete try running a specific test file if it exists
    • This ensures agents can run tests in isolation
  2. Analyze local changes

    • Run git status -u to identify all changed files (including untracked files)
      • If there no uncommited changes, then run git show --name-status to get the list of files that were changed in the latest commit.
    • Filter out non-code files (docs, configs, etc.)
    • Launch separate haikue agent per changed file to analyze file itself, and the complexity of the changes, and prepare short summary of it.
    • Extract list of files with actual logic changes

Test Writing

Simple Single File Flow

If there is only one changed file, and it's a simple change, then you can write tests yourself. Following this guidline:

  1. Read TDD skill for best practices on writing tests
  2. Read the target file {FILE_PATH} and understand the logic
  3. Review existing test files for patterns and style, if not exists then create it.
  4. Analyse which tests cases should be added to cover the changes.
  5. Create comprehensive tests for all identified cases
  6. Run the test command identified before.
  7. Iterate and fix any issues until all tests pass

Ensure tests are:

  • Clear and maintainable
  • Follow project conventions
  • Test behavior, not implementation
  • Cover edge cases and error paths

Multiple Files or Complex File Flow

If there are multiple changed files, or one file with complex logic, then you need to use specialized agents to cover the changes. Following this guidline:

  1. Launch code-review:test-coverage-reviewer agents (parallel) (Sonnet or Opus models)

    • Launch one coverage-reviewer agent per changed file
    • Provide each agent with:
      • Context: What changed in this file (git diff)
      • Target: Which specific file to analyze
      • Resources: Read README and relevant documentation
      • Goal: Identify what test suites need to be added
      • Output: List of test cases needed for critical business logic
    • Collect all coverage review reports
  2. Launch developer agents for test file (parallel) (Sonnet or Opus models)

    • Launch one developer agent per changed file that needs tests
    • Provide each agent with:
      • Context: Coverage review report for this file
      • Target: Which specific file to create tests for
      • Test cases: List from coverage-reviewer agent
      • Guidance: Read TDD skill (if available) for best practices on writing tests.
      • Resources: Read README and test examples
      • Command: How to run tests for this file
      • Goal: Create comprehensive tests for all identified cases
      • Constraint: Add new tests, don't modify existing logic (unless clearly broken)
  3. Verify coverage (iteration) (Sonnet or Opus models)

    • Launch code-review:test-coverage-reviewer agents again per file
    • Provide:
      • Context: Original changes + new tests added
      • Goal: Verify all critical business logic is covered
      • Output: Confirmation or list of missing coverage
  4. Iterate if needed

  • If any files still lack coverage: Return to step 5
  • Launch new developer agents only for files with gaps
  • Provide specific instructions on what's still missing
  • Continue until all critical business logic is covered
  1. Final verification
  • Run full test suite to ensure all tests pass
  • Generate coverage report if available
  • Verify no regressions in existing tests

Success Criteria

  • All critical business logic in changed files has test coverage ✅
  • All tests pass (new and existing) ✅
  • Test quality verified by coverage-reviewer agents ✅

Agent Instructions Templates

Coverage Review Agent (Initial Analysis)

Analyze the file {FILE_PATH} for test coverage needs.

Context: This file was modified in local changes:
{GIT_DIFF_OUTPUT}

Your task:
1. Read the changed file and understand the business logic
2. Identify all critical code paths that need testing:
   - New functions/methods added
   - Modified business logic
   - Edge cases and error handling
   - Integration points
3. Review existing tests (if any) to avoid duplication
4. Create a list of test cases needed, prioritized by importance:
   - CRITICAL: Core business logic, data mutations
   - IMPORTANT: Error handling, validations
   - NICE_TO_HAVE: Edge cases, performance

Output format:
- List of test cases with descriptions
- Priority level for each
- Suggested test file location

Developer Agent (Test Creation)

Create tests for file {FILE_PATH} based on coverage analysis.

Coverage review identified these test cases:
{TEST_CASES_LIST}

Your task:
1. Read TDD skill (if available) for best practices on writing tests
2. Read @README.md for project context and testing conventions
3. Read the target file {FILE_PATH} and understand the logic
4. Review existing test files for patterns and style
5. Create comprehensive tests for all identified cases
6. Run the tests: {TEST_COMMAND}
7. Iterate until all tests pass
8. Ensure tests are:
   - Clear and maintainable
   - Follow project conventions
   - Test behavior, not implementation
   - Cover edge cases and error paths

Test command: {TEST_COMMAND}

Coverage Review Agent (Verification)

Verify test coverage for file {FILE_PATH}.

Context: Tests were added to cover local changes in this file.

Your task:
1. Read the changed file {FILE_PATH}
2. Read the new test file(s) created
3. Verify all critical business logic is covered:
   - All new functions have tests
   - All modified logic has tests
   - Edge cases are tested
   - Error handling is tested
4. Identify any gaps in coverage
5. Confirm test quality (clear, maintainable, follows TDD principles)

Output:
- PASS: All critical business logic is covered ✅
- GAPS: List specific missing test cases that need to be added
how to use tdd:write-tests

How to use tdd:write-tests on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add tdd:write-tests
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/neolabhq/context-engineering-kit --skill tdd:write-tests

The skills CLI fetches tdd:write-tests from GitHub repository neolabhq/context-engineering-kit and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/tdd:write-tests

Reload or restart Cursor to activate tdd:write-tests. Access the skill through slash commands (e.g., /tdd:write-tests) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.547 reviews
  • Mia Garcia· Dec 28, 2024

    tdd:write-tests reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Anaya Sethi· Dec 12, 2024

    We added tdd:write-tests from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Layla Kim· Dec 4, 2024

    Registry listing for tdd:write-tests matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Anaya Reddy· Nov 23, 2024

    tdd:write-tests reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Mia Liu· Nov 19, 2024

    Registry listing for tdd:write-tests matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Yuki Robinson· Nov 3, 2024

    Keeps context tight: tdd:write-tests is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Anaya Malhotra· Oct 22, 2024

    tdd:write-tests has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Mia Lopez· Oct 10, 2024

    tdd:write-tests fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Mia Khanna· Sep 21, 2024

    Registry listing for tdd:write-tests matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Oshnikdeep· Sep 17, 2024

    tdd:write-tests fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 47

1 / 5