write-tests

A skill for writing tests with tape-six, a JavaScript and TypeScript testing library. It supports both module styles and can run tests in parallel or one at a time.

In plain words
What is it for?
It creates or updates test files, reads the tape-six testing guide, examines the module’s public API, and writes grouped tests. It supports JavaScript, TypeScript, and CommonJS files.
Why use it?
It gives an agent a defined process for understanding the code under test and adding tests that match the project’s setup. Sequential test execution is available when tests share state or need easier debugging.

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/uhop/console-toolkit/write-tests
Any agent
npx skills add uhop/console-toolkit --skill write-tests
Clone the repo
git clone --depth 1 https://github.com/uhop/console-toolkit

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 549 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.00031 $0.00549
Opus 5 $0.00015 $0.00275
Sonnet 5 $0.00006 $0.00110
Haiku 4.5 $0.00003 $0.00055

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

Security

Grade A, and why

write-tests 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 2d 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.

.claude/skills/write-tests/SKILL.md · 34 lines

What it actually says

Write Tests

Write or update tests using the tape-six testing library.

Notes

  • tape-six supports ES modules (.js, .mjs, .ts, .mts) and CommonJS (.cjs, .cts).
  • TypeScript is supported natively — no transpilation needed (Node 22+, Deno, Bun run .ts files directly).
  • The default tape6 runner uses worker threads for parallel execution. tape6-seq runs sequentially in-process — useful for debugging or when tests share state.

Steps

  1. Read the testing guide at node_modules/tape-six/TESTING.md for API reference and patterns.
  2. Identify the module or feature to test. Read its source code to understand the public API.
  3. Create or update the test file in tests/test-<name>.js (or .ts for TypeScript, .cjs for CommonJS):
    • ESM (.js): import test from 'tape-six' and import the module under test using the project's package name.
    • CJS (.cjs): const {test} = require('tape-six') and const {...} = require('my-package'). If the module under test uses top-level await, require() cannot load it — use await import('my-package') inside async tests instead.
    • Write one top-level test() per logical group.
    • Use embedded await t.test() for sub-cases.
    • Use t.beforeEach/t.afterEach for shared setup/teardown.
    • Cover: normal operation, edge cases, error conditions.
    • Use t.equal for primitives, t.deepEqual for objects/arrays, t.throws for errors, await t.rejects for async errors.
    • All msg arguments are optional but recommended for clarity.
  4. Run the new test file directly to verify: node tests/test-<name>.js
  5. Run the full test suite to check for regressions: npm test
    • If debugging, use npm run test:seq (runs sequentially, easier to trace issues).
    • To see which files are being run, add --flags fo (overrides the default --flags FO).
  6. Report results and any failures.
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. 2d ago First seen · 34 lines · 31 tokens per session scan A 08973a0adf51

Subscribe to this mod's changes

write-tests is a skill published in the GitHub repository uhop/console-toolkit (10 stars, last pushed 1mo ago), licensed BSD-3-Clause. It adds 31 tokens to every session and 549 once invoked, about $0.0002 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.