write-tests

write-tests is a skill for Claude Code from uhop/console-toolkit. It costs 31 tokens per session (670 once invoked), scanned A, original, BSD-3-Clause.

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 Code

Written for Claude Code: installed under .claude/.

Good fit 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.

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

Made for: Claude Code.

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 write-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/uhop/console-toolkit/write-tests/github.svg)](https://agentmods.dev/skills/uhop/console-toolkit/write-tests)
Your own site
<a href="https://agentmods.dev/skills/uhop/console-toolkit/write-tests"><img src="https://agentmods.dev/badge/skills/uhop/console-toolkit/write-tests/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 write-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/uhop/console-toolkit/write-tests"><img src="https://agentmods.dev/badge/skills/uhop/console-toolkit/write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 670 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.00031 $0.00670
Opus 5.5 $0.00012 $0.00268
Sonnet 5.5 $0.00006 $0.00134
Haiku 4.5 $0.00003 $0.00067

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

How it starts

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

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.
    • When a contract must hold for every input (a width, a bound, an order), add a property test in tests/test-props-<area>.js: import 'tape-six-fast-check', then await t.prop([arbitraries], predicate, msg), or await t.scheduler(async s => …, msg) for async interleavings (release scheduled work with await s.waitFor(promise)). Return false or throw inside the predicate; never call t.* there. Pin every counterexample it finds as an example test.
  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.

Read the full file on GitHub · 35 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. 21d ago Changed · +1 lines 0d9fdca64796
  2. 1mo 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 3d ago), licensed BSD-3-Clause. It adds 31 tokens to every session and 670 once invoked, about $0.0001 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

chart-defaults

Find the actual runtime default value of any AG Charts configuration option, and keep JSDoc Default: markers accurate. Use when documenting a default, verifying a change has not altered one, writing tests against default behaviour, or auditing whether a TypeScript comment matches the theme template.

ag-grid/ag-charts · 60 tokens

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

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

dotnet/skills · 149 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

dart-test

DART Test: unit tests, integration tests, CI validation, and debugging.

dartsim/dart · 18 tokens

principle-test-behavior-not-implementation

Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.

michael-denyer/pstack-claude · 50 tokens