unit-test-engineer

unit-test-engineer is a skill for Claude Code, Codex from lfyxhappy/lfcode. It costs 58 tokens per session (342 once invoked), scanned A, original, MIT.

A guide for writing focused unit tests for a function, module, component, or other small piece of behavior. Unit tests check isolated code with controlled inputs and expected results, errors, and side effects.

In plain words
What is it for?
Creating, reviewing, or repairing deterministic tests for normal cases, invalid inputs, edge cases, and regressions using the project's existing test tools.
Why use it?
It helps tests describe what callers can observe rather than copying implementation details. It also avoids flaky waits, weak assertions, and unnecessary mocks.

Skill for Claude CodeCodex

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

Good fit Creating, reviewing, or repairing deterministic tests for normal cases, invalid inputs, edge cases, and regressions using the project's existing test tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lfyxhappy/lfcode/unit-test-engineer
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 lfyxhappy/lfcode --skill unit-test-engineer
Clone the repo
git clone --depth 1 https://github.com/lfyxhappy/lfcode

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-engineer

README.md
[![agentmods](https://agentmods.dev/badge/skills/lfyxhappy/lfcode/unit-test-engineer/github.svg)](https://agentmods.dev/skills/lfyxhappy/lfcode/unit-test-engineer)
Your own site
<a href="https://agentmods.dev/skills/lfyxhappy/lfcode/unit-test-engineer"><img src="https://agentmods.dev/badge/skills/lfyxhappy/lfcode/unit-test-engineer/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-engineer

Your own site · 80×15
<a href="https://agentmods.dev/skills/lfyxhappy/lfcode/unit-test-engineer"><img src="https://agentmods.dev/badge/skills/lfyxhappy/lfcode/unit-test-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 342 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.00058 $0.00342
Opus 5 $0.00029 $0.00171
Sonnet 5 $0.00012 $0.00068
Haiku 4.5 $0.00006 $0.00034

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

Security

Grade A, and why

unit-test-engineer 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 3d 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.

packages/lfcode/src/skill/lfcode/.bundle/unit-test-engineer/SKILL.md · 29 lines

What it actually says

Unit Test Engineer

Test a small behavioral boundary without copying its implementation.

Workflow

  1. Read repository instructions, the target code, existing nearby tests, package scripts, and relevant recent changes.
  2. State the observable contract: inputs, outputs, errors, side effects, state transitions, and important boundary values.
  3. Select the narrowest public or stable internal seam. Reuse local test helpers and run the package-local test command before introducing a new pattern.
  4. Write deterministic cases for normal behavior, invalid input, edge cases, and regression behavior that the code can actually exercise.
  5. Isolate only nondeterministic or external boundaries. Prefer real values and small fakes over mocks that duplicate implementation details.
  6. Run the focused test, inspect its assertions and cleanup, then expand to affected package checks when shared behavior changed.

Boundaries

  • Keep analysis and a test plan read-only unless the user asks to add or modify tests.
  • Do not test private implementation details when callers cannot observe them.
  • Do not weaken assertions, add arbitrary waits, suppress errors, or change production behavior solely to make a test pass.
  • Do not use production data, credentials, or network calls in a unit test.

Completion Check

Report the behavior covered, cases intentionally excluded, fixture or fake boundaries, changed files if any, and the exact verification commands with their result.

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. 3d ago First seen · 29 lines · 58 tokens per session scan A 188f0fc48e47

Subscribe to this mod's changes

unit-test-engineer is a skill published in the GitHub repository lfyxhappy/lfcode (2 stars, last pushed 6d ago), licensed MIT. It adds 58 tokens to every session and 342 once invoked, about $0.0003 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-09-05.