add-test

add-test is a skill for Claude Code, Codex from hamakyo/okf-skills. It costs 52 tokens per session (532 once invoked), scanned A, original, MIT.

A workflow for adding tests around behavior that already exists. It follows the project's current test style and covers normal cases, errors, and relevant edge cases.

In plain words
What is it for?
Use it for regression tests, missing coverage, edge cases, invalid inputs, or tests added before a safe refactor.
Why use it?
It reduces the risk of regressions—new changes accidentally breaking behavior that previously worked—and makes uncovered failure cases explicit.

Skill for Claude CodeCodex

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

Good fit Use it for regression tests, missing coverage, edge cases, invalid inputs, or tests added before a safe refactor.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamakyo/okf-skills/add-test"><img src="https://agentmods.dev/badge/skills/hamakyo/okf-skills/add-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 532 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.00052 $0.00532
Opus 5 $0.00026 $0.00266
Sonnet 5 $0.00010 $0.00106
Haiku 4.5 $0.00005 $0.00053

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

Security

Grade A, and why

add-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 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/add-test/SKILL.md · 77 lines

How it starts

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

Add Test

When to use

Use this Skill when:

  • Existing behavior needs test coverage.
  • A regression needs a failing test.
  • Edge cases or error paths need explicit coverage.
  • A refactor needs safety tests before code changes.

Do not use this Skill when:

  • The expected behavior is unclear.
  • The requested work requires implementation before tests can be meaningful.
  • The task is primarily documentation or OKF maintenance.

Inputs

  • Target behavior, file, bug, or coverage gap.
  • Expected behavior.
  • Existing test command or framework, if known.
  • Related OKF documents when behavior is domain-specific.

Required context

Before editing tests, read:

  • Existing tests near the target area.
  • Test helpers, fixtures, factories, and naming conventions.
  • Relevant implementation only enough to understand test boundaries.
  • Relevant OKF documents when they define expected behavior.

Workflow

  1. Identify the expected behavior and source of truth.
  2. Inspect nearby tests to match style, structure, naming, and helpers.
  3. Choose the right test level: unit, integration, end-to-end, or snapshot.
  4. Add focused tests for useful cases:
    • Normal path.
    • Error or invalid input path.
    • Boundary values or edge cases.
  5. Prefer stable assertions over brittle implementation details.
  6. Run the new test directly.
  7. Run related test files or suites when risk warrants it.
  8. If tests expose a defect, stop and report it unless the user asked to fix it.

Guardrails

  • Do not change production behavior unless explicitly asked.
  • Do not rewrite the test framework or large fixtures for a narrow test request.
  • Do not add tests that only assert mocks were called unless that is the meaningful contract.
  • Do not hide flaky tests by weakening assertions without explanation.
  • Do not add secrets, credentials, private URLs, or personal data to fixtures.

Completion checklist

  • Existing test style was followed.
  • Test scope matches the behavior.
  • Normal, error, and boundary cases were considered.
  • New tests were run directly where possible.
  • Any failing behavior is clearly reported.

Read the full file on GitHub · 77 lines

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 · 77 lines · 52 tokens per session scan A 3936fe44d18e

Subscribe to this mod's changes

add-test is a skill published in the GitHub repository hamakyo/okf-skills (2 stars, last pushed 19d ago), licensed MIT. It adds 52 tokens to every session and 532 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-08-31.