add-unit-tests

Generate focused unit tests for critical code paths using Bun test runner.

2|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/jupes/agent-forge-harness --skill add-unit-tests-jupes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-unit-tests
Source: https://github.com/jupes/agent-forge-harness/tree/main/.claude/skills/add-unit-tests
Command: npx skills add https://github.com/jupes/agent-forge-harness --skill add-unit-tests-jupes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a structured approach to add focused unit tests, ensuring critical paths, invariants, and failure modes are robust and reliable.

Core Features & Use Cases

  • Targeted Testing: Focus on mission-critical functions, edge cases, and error handling.
  • Testing Guidelines: Offers detailed principles for writing deterministic and colocated tests.
  • Integration: Complements existing test practices without duplicating effort.

Quick Start

Create a new test for the 'parseEnvelope' function in the 'envelope.ts' module using Bun's test runner and run it with bun test.

Frequently Asked Questions about add-unit-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add unit tests for mission-critical code paths and edge cases?

To add unit tests for mission-critical code, you target critical paths, invariants, and failure modes with focused tests. This ensures stateful machines, error mapping, and security-sensitive branches are robust and reliable.

How do I write a unit test for a specific function using the Bun test runner?

You write a unit test for a specific function by creating a colocated, deterministic test file and running it with the Bun test runner. Execute the test suite using the `bun test` command to validate your module's behavior.

What are the guidelines for writing deterministic and colocated unit tests?

Deterministic and colocated unit tests follow structured principles to ensure consistent results and maintainability. They focus on targeted testing for edge cases and error handling without duplicating existing test efforts.

Does this unit testing approach work with existing test practices?

Yes, this unit testing approach complements existing test practices without duplicating effort. It integrates seamlessly by focusing specifically on mission-critical functions, edge cases, and error mapping.

What is the best way to ensure stateful machines and security-sensitive branches are covered by tests?

The best way to ensure stateful machines and security-sensitive branches are covered is by applying targeted unit tests to critical paths. This structured approach validates invariants and failure modes for mission-critical applications.