writing-tests

writing-tests is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 72 tokens per session (5,045 once invoked), scanned A, original, Apache-2.0.

A guide for writing Kiro Crew backend tests with pytest, a Python testing tool, so they have no lasting side effects and produce repeatable results.

In plain words
What is it for?
Adding, editing, reviewing, or debugging backend tests, especially when temporary files, threads, child processes, or shared configuration are involved.
Why use it?
It helps prevent tests from changing shared files, processes, or settings and causing failures in other tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is [`docs/system-specs/common/testing-conventions.md`](../../../../../docs/system-specs/common/testing-conventions.md)..

Good fit Adding, editing, reviewing, or debugging backend tests, especially when temporary files, threads, child processes, or shared configuration are involved.

Compare 6 skills from other repositories ↓
About the project

Kiro Crew is a persistent development workspace where agents continue multi-step software work across sessions, schedules, and connected interfaces. Developers use it locally or remotely through a desktop app, web dashboard, CLI, Slack, or Discord, with unattended tasks and recurring jobs. The catalogue contains skills and instructions for working with this workspace.

kirodotdev/KiroCrew · 5,242 stars · on GitHub · kiro.dev

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew
agentmods
npx agentmods add skills/kirodotdev/kirocrew/writing-tests

Made for: Claude Code, Codex.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/writing-tests"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/writing-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,045 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 3
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 128
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00072 $0.05045
Opus 5.5 $0.00029 $0.02018
Sonnet 5.5 $0.00014 $0.01009
Haiku 4.5 $0.00007 $0.00505

Measured 11d ago against content hash d30195ef2161, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

writing-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 11d 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.

src/kiro_crew/builtin_skills/kirocrew-dev/writing-tests/SKILL.md · 321 lines

How it starts

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

Writing a Kiro Crew test that does not leak and does not flake

Scope guard: this skill applies ONLY to the Kiro Crew source repository (or a worktree of it). Its rules are conventions of this repo's suite. In any other project, ignore it.

The canonical, longer reference is docs/system-specs/common/testing-conventions.md. If this skill and that document disagree, the document wins. What this skill adds is the decision order — what to check first, and what the failure looks like when you get it wrong.

Where this skill stops, and which sibling takes over

This skill owns authoring a test: isolation, determinism, cross-platform behaviour, diagnosing a residue failure, and suite speed. Three siblings own the neighbouring steps, and none of them restates what is here:

You are doing Skill
Writing, fixing, or speeding up a test this skill
Running the build gate in a worktree, and deciding whether a red is yours kirocrew-worktree-dev
Driving a branch to a review-ready PR and through CI kirocrew-prepare-pr
Polling that PR until it is green babysit

The line that matters most in practice: kirocrew-worktree-dev tells you whether a failure is yours (re-run it on origin/main, mine CI for what is genuinely flaky); once it is yours, the fix is here. Do not fix a flake from a summary of the determinism classes — pick the class from the symptom, in Rule 2.

The two properties, and why they are one problem

A test must be hermetic (no effect that outlives it, anywhere but its own tmp dir) and deterministic (same verdict every run, on every platform, in any order). They are the same problem because the suite runs -n auto --dist loadgroup: a side effect is not just untidy, it is the input to another test on the same worker, and it surfaces as a flake in a file you never touched.

Rule 0 — Know which conftest is under your file BEFORE you isolate anything

Read the full file on GitHub · 321 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago Changed d30195ef2161
  2. 12d ago Changed · -641 lines 3ca7c0e23b7f
  3. 14d ago Changed · +1 lines b4e46ca2f2a1
  4. 15d ago Changed · +1 lines 70a5533f417f
  5. 16d ago Changed · +3 lines 78fa00196b9d
  6. 17d ago Changed · +12 lines 1797afed32a5
  7. 18d ago Changed · +2 lines 0902bd1ff5ee
  8. 19d ago Changed · +62 lines 1649415b2599
  9. 20d ago Changed · +40 lines 9705497522e4
  10. 1mo ago First seen · 841 lines · 72 tokens per session scan A 22ae09d5a2b7

Subscribe to this mod's changes

writing-tests is a skill published in the GitHub repository kirodotdev/KiroCrew (5,242 stars, last pushed today), licensed Apache-2.0. It adds 72 tokens to every session and 5,045 once invoked, about $0.0003 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-30.

Related

writing-tests compared with skills from other repositories

writing-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
writing-testskirodotdev/KiroCrewSkill5.2ktodayApache-2.0A72Claude Code, Codex
cost-efficiency-analyzerawslabs/agentcore-samplesSkill3.6kyesterdayApache-2.0A98Claude Code, Codex
deploying-to-staging-environmentAgentWorkforce/relaySkill1.2ktodayApache-2.0A44Claude Code
writing-relayflowsAgentWorkforce/relaySkill1.2ktodayApache-2.0A184Claude Code, Codex
vigilante-create-issuealiengiraffe/vigilanteSkill4318d agoApache-2.0A25Codex
bmad-specalvin-reyes/better-agentic-ideSkill3817d agoMITA76Claude Code
bmad-ticketalvin-reyes/better-agentic-ideSkill3817d agoMITA91Claude Code