unit-test-writer

unit-test-writer is a skill for Claude Code, Codex from dayvisonassis/sdd-skills. It costs 103 tokens per session (3,268 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 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,268 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.00103 $0.03268
Opus 5.5 $0.00041 $0.01307
Sonnet 5.5 $0.00021 $0.00654
Haiku 4.5 $0.00010 $0.00327

Measured 16d ago against content hash 741b8cced238, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 16d 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 · 137 lines

How it starts

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

Unit Test Writer

Plan and implement fast, isolated unit tests: one unit, with everything that crosses the system boundary replaced. Never modifies production code — if a test fails, only the test is adjusted.

The project defines the facts; this skill defines the discipline. All hard rules (project profile, boundary, structure, isolation, assertions, speed, cleanup, the checklist, execution) are in references/unit-rules.md — read it before writing. Its first section tells you what to read from the project's GATES.md: suites, runner, commands, and the path of the project's own rules, which are binding. The suite's language has its own file, references/languages/<language>.md: the same rules in that language's idiom, plus its anti-patterns. Read the one that applies, and only that one (unit-rules.md, "Language"). Background on the SDD flow, not needed to run this skill: https://github.com/dayvisonassis/sdd-skills/blob/main/docs/GUIA_DO_WORKFLOW.md.

Scope: the unit suites the project profile names.

INPUT

  • target_file (required) — the source file to test.
  • feature (optional) — the feature folder's id (F14); decides where the checklist goes. That folder's spec.md and contract.md, when it has them, are "the spec" the rules refer to.
  • mode (optional) — interactive (default when a user calls) or autonomous (set by implement-feature/evaluator/qa-preflight).
  • language (optional) — the suite's language (javascript, python, …). When given, it wins over what the profile and the repository say.
  • test_file_path (optional) / focus_areas (optional — the behaviors, criteria or values to cover: when given, the run writes only those) / batch_size (optional; default 8, from 5 to 10; a remainder smaller than 5 joins the last batch).
  • evaluation_report (optional) — its kind: test entry selects the mode: an existing testFile → correction mode; none → write only the tests its message names for targetFile.

Read the full file on GitHub · 137 lines

Files

What ships with it

2 files 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. 16d ago Changed · +27 lines 741b8cced238
  2. 18d ago Changed · +1 lines · -35 tokens per session 6f9afaa3a617
  3. 2mo 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 (3 stars, last pushed 16d ago), licensed MIT. It adds 103 tokens to every session and 3,268 once invoked, about $0.0004 per session on Opus 5.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

test-master

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…

Jeffallan/claude-skills · 104 tokens

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 keeping the render as the final version (videoreview) — blocking a render whose generated audio mis-voices a word (e.g. the approved…

gooseworks-ai/goose-skills · 201 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

r-testthat

Best practices for writing R package tests with testthat version 3+. Use this skill when writing or organizing tests for an R package or when improving existing tests that use testthat. It covers test structure and expectations, self-sufficient test design, proper cleanup with withr, fixtures, mocking external…

posit-dev/skills · 77 tokens

vitest

Set up Vitest testing in any project — detects type (Cloudflare Workers, React, Node, library), generates vitest.config.ts, test setup, utilities, and a sample test. Covers mocking patterns, coverage config, workspace setup, Jest migration. Use whenever the user mentions adding tests, setting up Vitest, configuring…

jezweb/claude-skills · 87 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