Skip to content

Skills / test-write

test-write

Write tests only for the code that changed, using the project's own test framework and conventions, then run them. Use when the user asks to add tests, or after changing logic that has no tests. Do not use to rewrite a whole test suite or to chase coverage numbers.

OfficialRuns scriptsAuditB
Latest
v0.1.0
Aisle
testing
Works with
Claude Code, Codex, Cursor
Stars
2

Install

Install test-write

npx @agentsaisle/cli add test-write

Installs into your project's skills folder. Add --global to install it for every project.

Runs scriptsThis skill includes scripts

Your agent may run these scripts on your machine. A maintainer has read every one in full, and the CLI lists the files when you install. You can read them on GitHub first.

Read the files on GitHub

Audit

B
Critical
0
High
0
Medium
1
Low
0

4 files · audited 2026-10-29 · rules 1.0.0

MediumAA-P02Can write files and run interpreters without disable-model-invocation

SKILL.md:6

Read Write Edit Glob Grep Bash(node *) Bash(git diff *) Bash(npm *) Bash(pnpm *) Bash(npx *) Bash(python *)

Why The agent may load this skill on its own and then write files and run code in one go.

Fix Set disable-model-invocation: true so the user starts it, or narrow the Bash patterns.

What this skill can use

Tools

  • Read
  • Write
  • Edit
  • Glob
  • Grep
  • Bash(node *)
  • Bash(git diff *)
  • Bash(npm *)
  • Bash(pnpm *)
  • Bash(npx *)
  • Bash(python *)

Scripts

  • scripts/changed-files.mjs

Domains mentioned

None

Automated checks found the patterns listed here. An audit reduces risk; it is not a guarantee of safety. How audits work · Read the rules

Show this grade in a README

The badge updates when the registry is rebuilt. Paste this Markdown into the README:

[![aisle audit](https://img.shields.io/endpoint?url=https%3A%2F%2Fagentsaisle-vercel.vercel.app%2Fbadges%2Ftest-write.json)](https://agentsaisle-vercel.vercel.app/skills/test-write)

SKILL.md

Rendered from commit 276ea59

Write tests

Use when

  • Logic was added or changed and nothing tests it.
  • The user asks for tests for a function, module or bug fix.

Don't use when

  • Tests exist and are failing (use test-fix).
  • The goal is a coverage percentage rather than behavior.

Steps

  1. Run node <skill>/scripts/changed-files.mjs. It lists changed source files, which already have tests, the framework and the run command.
  2. Read one existing test file in the project to copy its style: imports, naming, setup, mocks.
  3. For each file marked "needs tests", read only the changed functions. Write tests for behavior: the normal case, edge cases (empty, boundary, invalid input) and the bug being fixed. A bug fix gets a test that fails without the fix.
  4. Keep tests deterministic: no real network, clock or randomness unless controlled.
  5. Run only the new and changed test files with the command the script printed. Fix test mistakes, not the code under test, unless the test found a real bug (then say so).
  6. Do not weaken or delete existing tests.

Budget

  • Search first (grep, glob, symbol search). Read line ranges, not whole files.
  • Read at most 8 files per step. If you need more, write down what you learned and narrow the question.
  • Do not re-read a file you just wrote or edited.
  • Prefer the smallest command output that answers the question: head, tail, quiet flags, filtered lists.
  • Read changed functions and one sample test, not whole modules.

Output

  • Test files written, the run result (pass counts), and any real bug the tests found.

Done when

  • Every changed source file has at least one test that exercises it.
  • The new tests pass, and fail when the behavior is broken.
  • No existing assertion was removed or loosened.

Version history

VersionCommitInstall
0.1.0latest276ea59add test-write

Report this skillAgent Aisle on GitHub