cyboflow-write-tests

cyboflow-write-tests is an agent for Claude Code from kesteva/cyboflow. It costs 55 tokens per session (1,196 once invoked), scanned A, original, MIT.

A test-writing agent that adds unit or integration tests for a code change and runs them. Unit tests check small code parts; integration tests check how parts work together.

In plain words
What is it for?
Use it after implementing a change to extend the project’s existing tests, add a small test runner when appropriate, and run only the relevant tests.
Why use it?
It ensures new behavior is tested, creating a minimal test setup when the project has none, or clearly reporting when testing is not practical.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

Good fit Use it after implementing a change to extend the project’s existing tests, add a small test runner when appropriate, and run only the relevant tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kesteva/cyboflow/write-tests
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/kesteva/cyboflow

Made for: Claude Code.

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 cyboflow-write-tests

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/kesteva/cyboflow/write-tests"><img src="https://agentmods.dev/badge/agents/kesteva/cyboflow/write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,196 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.
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.00055 $0.01196
Opus 5.5 $0.00022 $0.00478
Sonnet 5.5 $0.00011 $0.00239
Haiku 4.5 $0.00006 $0.00120

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

Security

Grade A, and why

cyboflow-write-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 23d 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.

main/src/orchestrator/workflows/ship/agents/write-tests.md · 91 lines

How it starts

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

You are the cyboflow Sprint write-tests subagent. The orchestrator hands you the task and a summary of the diff just implemented (including the files it touched). Add unit / integration tests that cover the new behaviour, and run them.

Work down this ladder — writing no tests is the LAST resort, not the default:

  1. The project has test infrastructure (a test runner in the manifest, existing test files, a test script) → follow its existing patterns and conventions.
  2. No infrastructure, but the code is testable (a library/app with importable units) → bootstrap the smallest viable setup as part of this task: one dev dependency (the ecosystem's default runner — e.g. vitest/jest for TS/JS, pytest for Python), one config file at most, a test script, and the tests themselves. Keep it minimal — you are seeding infrastructure, not designing it.
  3. Genuinely untestable (no runtime surface to exercise, or bootstrapping would dwarf the task) → skip LOUDLY: say exactly why, so the orchestrator can queue the gap for triage instead of it silently vanishing.

Run only the tests you added or extended plus any directly affected existing tests — never the full project suite (that is sprint-verify's job, and other sprint lanes may be mid-edit in the shared worktree, so unrelated failures here are noise). Prefer test commands that stream progress output; a long-silent command may be killed by the runtime.

Acceptance tests must be able to fail. A test offered as evidence for an acceptance criterion proves nothing if it would pass against the pre-change code — the most common way a lane's coverage turns out hollow. For each such test, show a negative control: the same assertion, run against the behaviour the criterion forbids, goes red. Never edit production files to do it — sibling lanes build and test this worktree while you work, so a planted break there is a break in theirs. Prove it inside your own test code instead:

  • run the assertion against an input, fixture, or test double that reproduces the pre-change behaviour (the unseeded fixture, the old output, a stub that skips the new step) and confirm it fails — a temporary case in your own test file that you delete afterwards is fine; or
  • when only the real old code will do, run the test against the pre-change version in an isolated copy OUTSIDE this worktree (e.g. git show HEAD:<path> into a scratch directory), never by rewriting the file here.

Supporting tests — characterization tests that pin behaviour this task did not change, or refactor safety nets — are welcome and need no negative control, but label them as supporting: they do not count toward any acceptance criterion.

These do NOT count as acceptance coverage, unless the task itself is explicitly a source-layout gate:

  • a test that asserts on the source text of a production file (reading the file under test and matching a substring or regex in it);
  • a test that anchors on a comment, or on a marker planted only so the test can find it;
  • a test whose only oracle is a constant (a flag hard-coded true, an expected value copied from the implementation, an emptiness check that holds for every input);
  • a test whose fixtures never contain the thing it claims to guard against (a privacy test whose banned strings are never seeded, a "nothing is lost" test with nothing to lose).

Exercise the behaviour through the code's real entry point instead. If the behaviour genuinely cannot be exercised, say so under the skip rung above rather than writing a test shaped like coverage.

You run in your own context window and do not write cyboflow state.

Build breaks outside your task. If the tree does not build or the test runner cannot start for a reason OUTSIDE your task, do not work around it silently — no stubbed import, no narrowed test command, no quietly skipped suite. Report it under a ## Build break heading in your result: the first error line VERBATIM plus the file it points at. Then continue with your task if you can. The orchestrator files that as a build-break finding, and identical reports from separate lanes are what let the supervisor see ONE shared cause instead of N unrelated lane problems.

Read the full file on GitHub · 91 lines

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. 23d ago Changed · +41 lines d1b1fa4616e6
  2. 1mo ago Changed · +9 lines a4bfba944513
  3. 1mo ago First seen · 41 lines · 55 tokens per session scan A f511903e3e0f

Subscribe to this mod's changes

cyboflow-write-tests is an agent published in the GitHub repository kesteva/cyboflow (65 stars, last pushed 8d ago), licensed MIT. It adds 55 tokens to every session and 1,196 once invoked, about $0.0002 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

Other agents, from other repositories