ワンクリックで
add-unit-tests
Add focused Bun unit tests for mission-critical behavior and edge cases — not blanket coverage.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Add focused Bun unit tests for mission-critical behavior and edge cases — not blanket coverage.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run red-green-refactor in vertical slices, emphasizing behavior-first tests and harness quality gates.
Break a plan/PRD into independent vertical-slice Beads issues with explicit dependencies.
Synthesize current context into a PRD and file it as a Beads feature/epic issue.
Phase 2 of the Forge pipeline. Turn a research document into an implementation plan that is built around Beads issues and TDD. Reads plans/research/<slug>.md, designs the build, sets up red-green-refactor test strategy using the tdd skill, materializes a Beads epic/feature/tasks with dependencies and priorities, and defines demo/test checkpoints. Use when starting /forge-plan or the plan step of /forgemaster.
Fact-check an implementation plan against the real codebase and first-party documentation, flagging inaccuracies with what / why / evidence and a severity tier. Use when the user wants a plan reviewed or validated for accuracy, runs /review-plan, or wants a plan checked against real code before implementing. Accepts a Beads issue, a filesystem path, or a plan pasted into chat.
Phase 3 of the Forge pipeline. Execute the plan's Beads tasks with red-green-refactor TDD, committing per checkpoint and pausing at each natural stopping point so the user can run a live demo or test and see the work themselves. Use when starting /forge-implement or the implement step of /forgemaster.
| name | add-unit-tests |
| description | Add focused Bun unit tests for mission-critical behavior and edge cases — not blanket coverage. |
Adds high-signal unit tests using the Bun test runner (bun test). Optimize for correctness on critical paths, invariants, and failure modes — not chasing 100% line coverage.
ok / error), idempotency, security-sensitive branches.null/undefined, duplicate keys, unicode, very large strings when the code promises behavior there.mock / injected dependencies.foo.ts → foo.test.ts beside it, or __tests__/foo.test.ts if the repo already does that. Match existing layout in the target package.any without a // justification: comment (harness rules).AGENTS.md and the sub-repo’s AGENTS.md if working under repos/<name>/.package.json scripts and any bunfig.toml / Vitest config — default harness expectation is bun test.List 3–8 behaviors worth locking in (happy path + failures + one boundary each). Skip low-value branches.
Use Bun’s built-in describe / test / expect API (Jest-compatible).
import { describe, expect, test } from "bun:test";
import { parseEnvelope } from "./envelope.ts";
describe("parseEnvelope", () => {
test("accepts valid ok envelope", () => {
const input = JSON.stringify({ ok: true, data: { id: 1 }, error: null });
expect(parseEnvelope(input)).toEqual({ ok: true, data: { id: 1 }, error: null });
});
test("rejects malformed JSON", () => {
expect(() => parseEnvelope("{")).toThrow();
});
});
bun test path/to/module.test.ts
bun test
Fix failures before claiming the task is done.
bun run typecheck
If the repo defines bun run lint, run it too.
worklog: comment).console.log left in committed testsbun test passes; TypeScript strict clean for new coderepos/<name>/)Follow that repo’s test runner and conventions if they differ from Bun. Still apply the same critical-path-first prioritization.
Put long fixtures or golden files in references/ only when it keeps tests readable — prefer small inline data for unit tests.