unit-test

unit-test is a skill for Claude Code, Codex from DongDuong2001/pudo-code-system. It costs 11 tokens per session (180 once invoked), scanned A, original, MIT.

A guide to testing individual functions, methods, or classes in isolation, using assertions and replacements for outside dependencies.

In plain words
What is it for?
Use it for utility functions, algorithms, or standalone classes with tools such as Jest, pytest, JUnit, or xUnit, including mocks for dependencies.
Why use it?
It makes tests fast and predictable by keeping them away from real databases, networks, file systems, and other changing systems.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/dongduong2001/pudo-code-system/unit-test
Any agent
npx skills add DongDuong2001/pudo-code-system --skill unit-test
Clone the repo
git clone --depth 1 https://github.com/DongDuong2001/pudo-code-system

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dongduong2001/pudo-code-system/unit-test.svg)](https://agentmods.dev/skills/dongduong2001/pudo-code-system/unit-test)
Your own site
<a href="https://agentmods.dev/skills/dongduong2001/pudo-code-system/unit-test"><img src="https://agentmods.dev/badge/skills/dongduong2001/pudo-code-system/unit-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.00180
Opus 5 $0.00005 $0.00090
Sonnet 5 $0.00002 $0.00036
Haiku 4.5 $0.00001 $0.00018

Measured 4d ago against content hash f75523aa4813, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

unit-test 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 4d 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/test/unit-test/SKILL.md · 20 lines

What it actually says

Unit Test Skill

This skill focuses on writing fast, isolated tests for individual units of code (functions, methods, classes).

When to use this skill

  • When writing tests for utility functions, algorithms, or standalone classes.
  • When using tools like Jest, pytest, JUnit, or xUnit.
  • When needing to mock out dependencies (databases, APIs, file systems).

Guidelines

  • Isolation: A unit test should not rely on an external database or network. Use mocks or stubs instead.
  • Naming: Use clear, descriptive names (e.g., calculateTotal_withValidInput_returnsCorrectSum).
  • Structure: Use the Arrange-Act-Assert (AAA) pattern.
  • Speed: Unit tests must be fast so developers can run them frequently.
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. 4d ago First seen · 20 lines · 11 tokens per session scan A f75523aa4813

Subscribe to this mod's changes

unit-test is a skill published in the GitHub repository DongDuong2001/pudo-code-system (5 stars, last pushed 28d ago), licensed MIT. It adds 11 tokens to every session and 180 once invoked, about $0.0001 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

tests

Write clear, maintainable Vitest and Playwright tests with precise assertions, consistent structure, and strong behavioral coverage.

scalar/scalar · 25 tokens

mobile-testing

Write and run mobile tests including widget tests, integration tests, and golden tests. Use when implementing test strategies for Flutter or React Native apps.

ihatesea69/kiro-kit · 31 tokens

scale-to-millions

Use this skill whenever the user is designing, reviewing, debugging, or answering interview questions about system/software architecture and scalability — e.g. "scale my app", "how do I handle more traffic", "design a URL shortener / news feed / chat system", "my API is slow under load", "should I shard my database"…

Rudra-narayan-muduli-001/Scale-to-Millions · 130 tokens

131-java-testing-unit-testing

Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions…

jabrena/cursor-rules-examples · 113 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. Part of the skills-for-java project.

jabrena/cursor-rules-examples · 52 tokens

321-frameworks-spring-boot-testing-unit-tests

Use when you need to write unit tests for Spring Boot applications — including pure unit tests with @ExtendWith(MockitoExtension.class) for @Service/@Component, slice tests with @WebMvcTest and @MockBean for controllers, @JsonTest for JSON serialization. For framework-agnostic Java use @131-java-testing-unit-testing.…

jabrena/cursor-rules-examples · 84 tokens