Agent skill

Write Tests

by NeoLabHQ in NeoLabHQ/context-engineering-kit

Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed).

GPL-3.0Auto-check passedTesting & QA

Install Write Tests

skills CLI
$ npx skills add NeoLabHQ/context-engineering-kit --skill write-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NeoLabHQ/context-engineering-kit write-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NeoLabHQ/context-engineering-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/write-tests .claude/skills/write-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
write-tests
GitHub stars
1.7k
Token cost
~2k tokens
SKILL.md length
804 words
Files
1
Skills in repo
57
Repo updated
First seen
Licence
GPL-3.0

At a glance

Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed).

  • Works in 3 steps: Read sadd skill if available → Discover test infrastructure → Run all tests
  • You want write tests for new logic
  • SKILL.md covers User Arguments, Context, Goal and Important Constraints, plus 3 more sections
  • Calls git

What it does

Write Tests is an agent skill from NeoLabHQ/context-engineering-kit. Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed). Use when you want write tests for new logic or increase test coverage.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test generation and Test coverage. It works with Git. The repository describes itself as: Hand-crafted Claude Code Skills focused on improving agent results quality. Compatible with OpenCode, Cursor, Antigravity, Gemini CLI, and others. Includes CodeRabbit open-source… The licence is GPL-3.0.

When your agent uses it

  • You want write tests for new logic
  • Increase test coverage

Example prompts

  • “/write-tests”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read sadd skill if available
  2. Discover test infrastructure
  3. Run all tests

What it can do on your machine

Read from SKILL.md and the folder at commit 23e2428. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Write Tests loads about 2k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 804 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NeoLabHQ/context-engineering-kit at commit 23e2428, republished under its GPL-3.0 licence (© NeoLabHQ). 804 words, ~2,008 tokens.

Download SKILL.mdSave it as .claude/skills/write-tests/SKILL.md (or your agent's skills folder).
name
write-tests
description
Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed). Use when you want write tests for new logic or increase test coverage.

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
Show full SKILL.md (325 more words)Show less
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 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 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

© NeoLabHQ, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/write-tests of NeoLabHQ/context-engineering-kit.

Open the folder on GitHubat commit 23e2428

Compare with similar skills

Write Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Write Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write Tests this skillNeoLabHQ/context-engineering-kit1.7k—~2kAutomated safety check: PassGPL-3.0
Test RoadmapOvid/paad131—~2.3kAutomated safety check: PassMIT
Test Writer for Changed Codeposhan0126/dotclaude871—~1.2kAutomated safety check: PassMIT
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Senior QAnicepkg/auto-company1923 repos~1.1kAutomated safety check: NotesNone
OpenROAD Module Test AdderThe-OpenROAD-Project/OpenROAD3.2k—~1.8kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Test Roadmap

    Ovid/paad

    EXPERIMENTAL. An agent skill from Ovid/paad.

    131 GitHub stars~2.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Test Writer for Changed Code

    poshan0126/dotclaude

    Writes tests for newly added or changed code by reading the git diff, mapping every code path and writing one-assertion tests that match the project's conventions.

    871 GitHub stars~1.2k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Senior QA

    nicepkg/auto-company

    Comprehensive QA and testing skill for quality assurance, test automation, and testing strategies for ReactJS, NextJS, NodeJS applications.

    192 GitHub starsUsed in 3 repos~1.1k tokens
    Testing & QAAuto-check: notes
  • OpenROAD Module Test Adder

    The-OpenROAD-Project/OpenROAD

    Adds integration or unit tests to an OpenROAD module: writes the Tcl test, generates golden files and registers it in both CMake and Bazel.

    3.2k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed

More from NeoLabHQ/context-engineering-kit

All 57 skills in this repo
  • Prompt Engineering

    NeoLabHQ/context-engineering-kit

    A skill your agent uses when you writing commands, hooks, skills for Agent, or prompts for sub agents or any other LLM interaction, including optimizing prompts, improving LLM outputs, or designing…

    1.7k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • Git Notes

    NeoLabHQ/context-engineering-kit

    A skill your agent uses when adding metadata to commits without changing history, tracking review status, test results, code quality annotations, or supplementing commit messages post-hoc - provides…

    1.7k GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Multi Agent Patterns

    NeoLabHQ/context-engineering-kit

    Design multi-agent architectures for complex tasks. An agent skill from NeoLabHQ/context-engineering-kit.

    1.7k GitHub starsUsed in 7 repos~6k tokens
    Auto-check passed
  • Load PR Comments

    NeoLabHQ/context-engineering-kit

    A skill your agent uses to load open/unresolved PR review comments then aggregate them as tasks in .specs/comments/.md for parallel agents to fix.

    1.7k GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Review PR

    NeoLabHQ/context-engineering-kit

    Review an existing GitHub pull request and post inline review comments on its diff.

    1.7k GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Subagent Driven Development

    NeoLabHQ/context-engineering-kit

    A skill your agent uses when executing implementation plans with independent tasks in the current session or facing 3+ independent issues that can be investigated without shared state or…

    1.7k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Write Tests

What does Write Tests do?

Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed). Write Tests is an agent skill from NeoLabHQ/context-engineering-kit. Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed).

When should I use Write Tests?

Write Tests fits situations like: you want write tests for new logic; increase test coverage.

How do I install Write Tests in Claude Code?

Run `npx skills add NeoLabHQ/context-engineering-kit --skill write-tests -a claude-code`. Or copy the skill folder (skills/write-tests in NeoLabHQ/context-engineering-kit) into .claude/skills/write-tests in your project. Claude Code loads it when a task matches its description.

How do I install Write Tests in Codex?

Run `npx skills add NeoLabHQ/context-engineering-kit --skill write-tests -a codex`. Or copy the skill folder (skills/write-tests in NeoLabHQ/context-engineering-kit) into .agents/skills/write-tests in your project. Codex loads it when a task matches its description.

Can I use Write Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NeoLabHQ/context-engineering-kit --skill write-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-tests, .gemini/skills/write-tests, .github/skills/write-tests and .opencode/skills/write-tests in your project.

What does Write Tests need to run?

Going by SKILL.md and its folder, Write Tests needs the command-line tools its instructions call (git).

Does Write Tests access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Write Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Write Tests use?

Write Tests is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Write Tests use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Write Tests?

Skills that share tags, products or a category with Write Tests: Test Roadmap (Ovid/paad, 131 stars), Test Writer for Changed Code (poshan0126/dotclaude, 871 stars), Evaluate PR Tests (dotnet/maui, 23k stars) and Senior QA (nicepkg/auto-company, 192 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write Tests?

NeoLabHQ (a GitHub organization) maintains it in NeoLabHQ/context-engineering-kit, which has 1,748 GitHub stars. The repository holds 57 skills in this directory. The repository was last updated on August 26, 2026.

Source: NeoLabHQ/context-engineering-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.