Skip to content
Back to skills

Write Test

ASecurity

Write one test that states a Capability the app has and goes red when the app stops doing it: real types in the starting state, the call the app makes, an expected value written by hand. TRIGGER before writing or editing a test. DO NOT TRIGGER to decide which tests a change needs; use /plan-tests.

  • 22 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 23, 2026
businessgo

Security analysis

A100/100

Scanned September 30, 2026

npx -y skills add heyJordanParker/dotfiles --skill write-test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write Test?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Write Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/heyjordanparker-write-test/badge)](https://www.skillsdirectory.com/skills/heyjordanparker-write-test)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: write-test
description: Write one test that states a Capability the app has and goes red when the app stops doing it: real types in the starting state, the call the app makes, an expected value written by hand. TRIGGER before writing or editing a test. DO NOT TRIGGER to decide which tests a change needs; use /plan-tests.
---

# Write Test

- A test states one Capability the app has, and fails when the app stops doing it.

## 1. Read what the test will call
Run `trace callers` on the code under test and `trace read` on one caller, to see the call the app makes. Read the test file beside it for the setup it already uses.

IF the code does not exist yet:
### Write the test against the call and expected result the change requires
That is the contract until the code exists.

IF the code is what is broken:
### Fix the code
A test is not a fix for a defect.

IF an existing test states the opposite:
### Treat that test as wrong
It records what the code did, not what the app must do.

## 2. Create the starting state
Build it from the real types, through the project's factories, seeds, or harness, in the shape production stores. Every part starts in its before state.

### Reuse the setup the neighbouring tests use
Never: a type invented for the test, a method added to production code for the test to call.

## 3. Make the call
Make the call the app makes, in this process.

### Exercise the whole path the app takes
Never: a private method, one step inside a mechanism, a subprocess where a direct call runs the same code.

## 4. Check the result
Write the expected value by hand.

### Check a value that changes when the app stops doing what the test says
Never: a value the code under test produced, a check weakened until it passes.

IF the expected result is a set the system enumerates:
### Check the rule over the real set
Never: a copy of that set kept by hand in the test.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.