Test Writing logo

Test Writing

Community
andreaswasita
test-writing

Writes meaningful tests that actually catch bugs.

Overview

Publisherandreaswasita
Repositorycopilot-agents-dojo
Skill nametest-writing
Stars
54
Forks
15
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 andreaswasita on GitHub. Read the source before you install it.

Installation

Install the Test Writing 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/andreaswasita/copilot-agents-dojo/tree/main/skills/test-writing
  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/andreaswasita/copilot-agents-dojo.git /tmp/copilot-agents-dojo
mkdir -p .claude/skills
cp -r /tmp/copilot-agents-dojo/skills/test-writing .claude/skills/test-writing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Test Writing 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 Writing 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 Writing 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 Writing Skill

Produces tests that fail when the code is wrong — not tests that exist for coverage theatre. Covers happy path, edge cases, error paths, and state transitions. Does NOT chase 100% coverage as a goal; chases meaningful coverage that catches real regressions.

When to Use

  • Writing tests for new code or features.
  • Adding coverage to an untested area before changing it.
  • A bug slipped through that tests should have caught.
  • Practicing test-driven development.
  • The verify-before-done skill flagged missing coverage.
  • NOT when the user explicitly asked for a spike or throwaway script.

Prerequisites

  • A test framework installed for the stack (pytest, vitest, jest, go test, xUnit, JUnit).
  • Ability to run the test suite via the powershell tool.
  • The view, edit, and grep tools to read existing patterns.
  • A baseline run of the existing suite passing.

How to Run

text
1. Read existing tests with `view`/`grep` to copy the project's pattern.
2. List scenarios: happy path, edges, errors, state transitions.
3. Write one test per scenario using Arrange-Act-Assert.
4. Run the suite — confirm new tests pass and nothing else broke.
5. If TDD: write the test first, watch it fail for the right reason, then implement.

Quick Reference

StackFrameworkRun command
TypeScriptVitest / Jestnpm test or npx vitest
Pythonpytestpytest or python -m pytest
JavaJUnit 5mvn test or gradle test
Gotestinggo test ./...
.NETxUnitdotnet test
Scenario typeMust cover
Happy pathValid input → expected output
Edge caseEmpty, null, boundary, maximum size
Error caseInvalid input, dependency failure, timeout
State transitionStateful object moves between valid states

Procedure

Step 1: Read the Existing Pattern

Use grep for test_* or *.spec.* files and view one of them. Match the project's naming, location, fixtures, and assertion style. Do not introduce a second testing dialect.

Step 2: Enumerate Scenarios

For the code under test, list:

  1. Happy path inputs.
  2. Edge cases (empty, null, boundary, max).
  3. Error cases (invalid input, dependency failure).
  4. State transitions, if stateful.

Step 3: Write Arrange-Act-Assert

python
def test_calculate_discount_for_premium_user():
    # Arrange
    user = create_user(tier="premium")
    order = create_order(total=100.00)

    # Act
    discount = calculate_discount(user, order)

    # Assert
    assert discount == 20.00

Name tests as documentation: test_login_with_expired_token_returns_401, not test_login.

Step 4: For Bug Fixes — Test First

  1. Write a test that reproduces the bug.
  2. Run it. Confirm it fails for the right reason.
  3. Implement the fix.
  4. Run it. Confirm it passes.
  5. Run the full suite — no regressions.

Step 5: Run and Record

Run the suite via the powershell tool. Capture pass/fail counts and paste them into the tasks/todo.md Verification Results block (per verify-before-done).

Pitfalls

  • DO NOT write tests that cannot fail (assert user is not None on a freshly constructed object).
  • DO NOT test implementation details (e.g. mocking that quicksort was called). Test the behavior.
  • DO NOT mock the world. Prefer real collaborators where the cost is acceptable.
  • DO NOT ignore a flaky test — fix it or delete it. A flaky test erodes trust in the whole suite.
  • DO NOT chase 100% coverage as a target. Coverage is a metric, not a mission.

Verification

  • Every new test was observed to fail before it passed (TDD) OR a deliberate mutation was introduced to confirm it fails.
  • The full suite is green after the change.
  • Test names describe scenario + expected behavior.
  • Each bug fix has a regression test that would have caught the original bug.

Frequently asked questions

What does the Test Writing AI skill do?

Writes meaningful tests that actually catch bugs.

Why use Test Writing on TypingMind?

Because you install it once and use it with any model. Test Writing 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 Writing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/andreaswasita/copilot-agents-dojo/tree/main/skills/test-writing. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Test Writing?

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 Writing?

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

Is the Test Writing AI skill free?

Yes. It is published on GitHub by andreaswasita 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 👇