unit-test-writer

unit-test-writer is a skill for Claude Code, Codex from dayvisonassis/sdd-skills. It costs 138 tokens per session (1,509 once invoked), scanned A, original, MIT.

A workflow for planning and writing isolated unit tests for the PABX monorepo, a single repository containing its Angular frontend and Node.js backend. It uses Jest and does not change production code.

In plain words
What is it for?
Use it to add or expand frontend or backend unit tests for a target source file, focusing on selected methods or behaviors.
Why use it?
It helps test application logic without real databases, network requests, or file systems, while following the project's specific test locations and conventions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add or expand frontend or backend unit tests for a target source file, focusing on selected methods or behaviors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dayvisonassis/sdd-skills/unit-test-writer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dayvisonassis/sdd-skills --skill unit-test-writer
Clone the repo
git clone --depth 1 https://github.com/dayvisonassis/sdd-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for unit-test-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/dayvisonassis/sdd-skills/unit-test-writer/github.svg)](https://agentmods.dev/skills/dayvisonassis/sdd-skills/unit-test-writer)
Your own site
<a href="https://agentmods.dev/skills/dayvisonassis/sdd-skills/unit-test-writer"><img src="https://agentmods.dev/badge/skills/dayvisonassis/sdd-skills/unit-test-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for unit-test-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/dayvisonassis/sdd-skills/unit-test-writer"><img src="https://agentmods.dev/badge/skills/dayvisonassis/sdd-skills/unit-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,509 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00138 $0.01509
Opus 5 $0.00069 $0.00754
Sonnet 5 $0.00028 $0.00302
Haiku 4.5 $0.00014 $0.00151

Measured 9d ago against content hash cee55d058261, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

unit-test-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/unit-test-writer/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unit Test Writer (PABX)

Plan and implement fast, isolated, high-quality unit tests for the PABX monorepo. Validates logic without hitting real databases, HTTP, or filesystems. Never modifies production code — if a test fails, only the test is adjusted.

Project scope: this skill assumes the PABX monorepo structure. All the hard, project-specific rules (jQuery/localStorage mock order, Promise.all() mock pattern, file locations, execution commands) are in references/pabx-rules.md — read it before writing. Generic SDD flow docs: https://github.com/dayvisonassis/sdd-skills/blob/main/docs/GUIA_DO_WORKFLOW.md.

Scope:

  • Frontend: apps/frontend/ — Jest + jest-preset-angular, *.spec.ts co-located with the source.
  • Backend: apps/backend/__tests__/unit/ — Jest, *.test.js mirroring src/ (1:1).

INPUT

  • target_file (required) — the source file to test.
  • mode (optional) — interactive (default when a user calls directly) or autonomous (set by implement-feature/evaluator).
  • test_file_path (optional) — existing test file to expand; otherwise created automatically.
  • focus_areas / batch_size (optional) — prioritized methods; tests per batch (default 8, 5–10).
  • test_catalog_path (optional) — a Test Catalog entry to accelerate Phase 1.
  • evaluation_report (optional) — when present, run in correction mode (fix only the failing test named in the report).

OUTPUT

  • New/expanded .spec.ts / .test.js unit tests following the PABX rules, in the correct location.
  • A .unit-test.md checklist (planning may be Portuguese; all test code is English).
  • Per-batch execution confirmation (tests run in milliseconds) and a final coverage summary.
  • No production code is ever modified.

Invocation Modes

Interactive (user-invoked, default): run the full 3-phase process and stop at the Phase 2 checkpoint to get explicit user approval before implementing.

Autonomous (dispatched by implement-feature / evaluator): run the same 3 phases but skip the approval checkpoint — auto-accept the checklist and proceed to batch implementation. Never pause for a human. This mirrors spec-writer's Batch Mode.

Read the full file on GitHub · 109 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 109 lines · 138 tokens per session scan A cee55d058261

Subscribe to this mod's changes

unit-test-writer is a skill published in the GitHub repository dayvisonassis/sdd-skills (1 stars, last pushed 13d ago), licensed MIT. It adds 138 tokens to every session and 1,509 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates setfinalrender — blocking a render whose generated audio mis-voices a word (e.g. the approved "human-vetted" spoken as "human witted"), drops…

gooseworks-ai/goose-skills · 116 tokens

test-generator

A test-writing helper that creates unit or integration tests from the code's actual behavior and contracts. Unit tests check small pieces of code, while integration tests check how real components work together.

laolaoshiren/claude-code-skills-zh · 79 tokens

testing-r-packages

Best practices for writing R package tests using testthat version 3+. Use when writing, organizing, or improving tests for R packages. Covers test structure, expectations, fixtures, snapshots, mocking, and modern testthat 3 patterns including self-sufficient tests, proper cleanup with withr, and snapshot testing.

posit-dev/skills · 67 tokens

r-package-development

R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.

posit-dev/skills · 41 tokens

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens

130-java-testing-strategies

Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…

jabrena/plinth · 96 tokens