Test Writer logo

Test Writer

Community
hex
test-writer

The task is to add or extend tests for existing behaviour that has a spec, a documented contract, or a confirmed expected output.

Overview

Publisherhex
Repositoryclaude-council
Skill nametest-writer
Stars
866
Forks
106
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by hex on GitHub. Read the source before you install it.

Installation

Install the Test Writer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hex/claude-council/tree/main/mods/council-pane/specialists/test-writer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hex/claude-council.git /tmp/claude-council
mkdir -p .claude/skills
cp -r /tmp/claude-council/mods/council-pane/specialists/test-writer .claude/skills/test-writer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Test Writer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Test Writer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Test Writer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Test Writer

Add tests that protect behaviour a user or caller relies on. Every test must be able to fail for a real regression, and every expected value must come from somewhere other than the code under test.

Authoring gate

Before writing any test, answer these four questions in your notes. If one has no answer, do not write that test; list it in the report instead.

  1. What observable behaviour, invariant or contract does it protect? Observable means a caller can see it: a return value, output, file, HTTP response, error message, state change.
  2. What credible regression would make it fail? Name the plausible bug.
  3. Why does existing coverage not catch that already? Each contract should have one primary test at the strongest boundary that owns it. Another layer needs a distinct risk that the owner cannot reach. Prefer adding a case to an existing table or fixture over a near-duplicate test.
  4. Does it need a production seam that no production caller needs, such as an extra export, a flag or an injection hook? If yes, test at the real boundary instead.

Where expected values come from

In order of preference:

  • the spec, API docs, RFC or file-format definition;
  • a worked example in the docs or the task;
  • a known-good literal confirmed by the task author;
  • a real recorded output that a human has confirmed is correct.

Never compute the expected value with the function under test, a helper it uses, or the same algorithm restated. expect(add(a, b)).toBe(a + b) proves nothing. If the only source for a value is the current code, say so in the report and do not assert it as correct.

Reject these patterns

  • tests with no assertion, or assertions that cannot fail;
  • a value compared with itself or with a copy made by the code under test;
  • copied fixtures, inventories or export lists that just mirror the source;
  • asserting source text, import paths or private function names;
  • private helper tests that duplicate a test at the public boundary;
  • the same contract invoked twice in different files;
  • mocks that implement the behaviour being asserted;
  • negative tests that pass for an unrelated reason, such as a different validation rejecting the input first;
  • names that promise more than the test checks.

A test that would break under a behaviour-preserving refactor is asserting implementation, not behaviour. Rewrite it at the owning boundary.

Prefer real boundaries

  • Test through the public interface the caller uses: CLI, HTTP handler, library entry point, file reader.
  • Use real dependencies where they are cheap and deterministic, such as a temp directory, in-memory database or local server. Fake only what is slow, paid or non-deterministic, and never fake the thing being tested.
  • Follow the repository's existing test layout, helpers, naming and runner. Do not add a new test framework.

Write and check each test

For each test, one at a time:

  1. Write it.
  2. Run it and see it pass.
  3. Prove it can fail. Temporarily break the behaviour it protects, for example by returning a wrong value or removing a branch, and confirm the test fails with a message that points at the problem. Then restore the code exactly. A test you have never seen fail proves nothing.
  4. If the test fails on the unmodified code, you may have found a bug. Do not change the expected value to match the code. Record the input, expected and actual, and the source of the expected value, and report it.

Change production code only when a test cannot be written otherwise, and explain why in the report.

Evidence to record

  • For each test: the four gate answers, the source of each expected value, and the mutation you used to see it fail.
  • The test command and its full result.
  • Tests considered and rejected, and which gate question failed.

Stop conditions

Stop and report when the expected behaviour has no independent source, when the test would need a production seam, or when the code appears to contradict its own spec.

Handoff

Report the tests added or extended, with the contract each protects; the proof that each can fail; suspected bugs found; rejected candidates; and any production change with its reason.

Authoring gate and junk patterns adapted from openclaw's test-audit skill (MIT, OpenClaw Foundation); see ../LICENSE-openclaw.

Frequently asked questions

What does the Test Writer AI skill do?

The task is to add or extend tests for existing behaviour that has a spec, a documented contract, or a confirmed expected output.

Why use Test Writer on TypingMind?

Because you install it once and use it with any model. Test Writer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Test Writer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hex/claude-council/tree/main/mods/council-pane/specialists/test-writer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Test Writer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Test Writer?

As many as you like. As long as a model supports skills, you can use Test Writer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Test Writer AI skill free?

Yes. It is published on GitHub by hex under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇