Skip to content
cccskills
FreePublished on GitHub

test-writer

Create or improve tests, fixtures, scripts, and evaluation helpers for requested behavior using the repository’s existing test setup. Run the narrowest relevant checks, repair defects in test-owned code, and report any product behavior that the tests show is failing.

OriginalShow the original description

Write and improve test-owned code: tests, test scripts, fixtures, evals, and test-only helpers. Use whenever Codex is asked to create or change test code. Its only job is to produce the strongest practical tests in the repository's existing harness, run them, and fix defects in the test code.

sno-ai/sno-station-skills884 stars(GitHub 884 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding a test for a requested behavior
  • Improving fixtures or test-only helpers
  • Writing a focused integration or end-to-end test
  • Running changed tests and reporting failures

Files included (3)

  • SKILL.md5.6 KB
  • references/eval-sim-patterns.md8.5 KB
  • scripts/selftest/run-selftest.sh874 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Test Writer

Write the best test code for the requested behavior. Start with the repository and the behavior.

Test scope

  • Run tests only for the changed behavior and its directly affected callers or integrations.
  • Do not run full evaluation, unit, integration, repository, site, or all-module suites unless the owner explicitly requests them.
  • A skill, PRD, reviewer, repository document, or default package script does not grant that permission.
  • After a failure, rerun the failing case first. Once it passes, run only directly affected cases; do not expand by default.
  • Build artifacts required for a requested deployment are not permission to run unrelated tests.
  • Every development task has a finite budget including setup, execution, and reporting; before each run, estimate duration from available timings and name the changed behavior it verifies, using a stated estimate when timings are unknown rather than building a timing system or running a preliminary suite.
  • Remove checks and repeated runs that neither establish the requested main function nor expose its defects; select the smallest useful test that fits the remaining development budget, never spend it on reassurance.

Single responsibility

Own only test code:

  • tests and test scripts
  • fixtures and test-only helpers
  • eval and simulation code
  • test harness configuration required by those files

The output of this skill is test-owned code and the result of running it. Return product defects to the caller; do not edit production/runtime source.

Core principles

  1. Everything should be real. Exercise the real code path, real parser, real filesystem, real database, real API, or real service whenever the repository can provide it.
  2. We hate mocking. A mock easily proves that the mock behaves like its setup while the product remains broken. Never mock the system under test. Use a substitute only when a truly external dependency cannot be run, and keep the substitute narrower than the behavior being proved.
  3. Assert observable results. Check returned content, persisted state, emitted files, external effects, cleanup, and errors. Do not assert call counts when a real effect can be observed.
  4. A test must catch a real defect. Every assertion must be able to fail when the product behavior is wrong. Do not add tests for quotas, coverage theater, or speculative cases.
  5. Use realistic data. Match production formats, sizes, identifiers, timestamps, and sequences closely enough to expose real failures.
  6. Keep tests deterministic and isolated. Use unique test identities, clean up created state, avoid shared-order assumptions, and make failures reproducible.

Test ownership

Use this skill when changing test-owned files. Keep the test independent of the production fix and report real failures. Do not enforce ownership through an edit-blocking hook or require an edit lease before writing a test.

Write the code

  1. Read the requested behavior or acceptance criteria.
  2. Read the implementation boundary, its immediate callers, nearby tests, test configuration, and the repository's normal test command.
  3. Reuse the existing language, framework, fixtures, and directory layout. Ask only when a new framework, dependency, credential, or external environment is genuinely required.
  4. Choose the smallest test boundary that proves the real behavior:
    • unit for pure deterministic logic;
    • integration for filesystem, database, API, cache, queue, or component interaction;
    • end-to-end for a complete user or service journey;
    • eval or simulation for non-deterministic model or agent behavior.
  5. Write the test code. Prefer one strong journey over several weaker duplicates.
  6. Run the narrowest command that executes the changed test. Fix syntax, fixtures, cleanup, flakiness, and other defects in test-owned code.
  7. Report the changed test files, the command run, and the observed result. If the test exposes a product defect, name the failing behavior and evidence.

Test quality

  • Test public behavior rather than private implementation details.
  • Verify positive behavior and the important failure that could silently corrupt or lose data.
  • Check both the primary result and its meaningful side effect when both are part of the contract.
  • For E2E work, exercise the changed primary flow through its ordinary entry to destination read-back. Reproduce the actual bug for a fix; do not plant extra defects in every new feature merely to complete a proof pattern. The harness may prepare inputs and environment and observe results; if it supplies a missing product step, return a product or contract defect.
  • Keep setup shorter than the behavior it proves. If setup dominates, find a more direct real boundary or a reusable real fixture.
  • Never weaken, skip, or delete an assertion just to make a failing test pass.
  • Do not add a second proof layer unless it can catch a materially different defect.
  • Use the task's agreed time limits for long calls; do not add an arbitrary timeout that kills useful work or hides its output.

Optional code references

  • For eval and simulation implementations, read references/eval-sim-patterns.md.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Estimate wall-clock time for AI-agent work using measured progress, remaining tasks, and reference data. It can also report user-facing clock times through a dedicated command, while keeping estimates focused on agent work rather than human developer effort.

  • Estimating the remaining time for a running agent task
  • Pricing a new task from its named deliverables and checks
  • Reporting a deadline or current time in the user's local zone
sno-ai/sno-station-skills884Updated Oct 29, 2026

Use this method when a run reports success but may have done nothing. Trace the code path from entry to downstream effect, identify a narrow observable at each important hop, and report concrete evidence such as changed rows or sent requests that a no-op could not produce.

  • Checking whether a successful job changed the intended records
  • Tracing an output from a stage to its downstream consumer
  • Verifying that model or API requests were actually sent
sno-ai/sno-station-skills884Updated Oct 29, 2026

away-brief

FreeSummary

Summarize recorded work completed, blocked items, questions awaiting the owner, and quota readings in a page of up to 60 lines. Use it after time away or a long work stretch to see what changed, what needs attention, and where the status came from.

  • Catching up after sleep or a meeting
  • Reviewing unfinished work and missing checks
  • Seeing questions waiting for your decision
sno-ai/sno-station-skills884Updated Oct 29, 2026

catch-report

FreeSummary

Compare problems found by peer review with errors agents recognized in their own conversations. The skill summarizes existing review records and uses each agent’s own model to judge sampled self-check moments over a chosen period.

  • Comparing peer review and self-check results
  • Reviewing the past week’s findings
  • Seeing what a second model caught
sno-ai/sno-station-skills884Updated Oct 29, 2026

charter

FreeSummary

Create, revise, or review a project charter that states the deliverable, boundaries, settled owner decisions, and observable pass-or-fail success checks. Use it to brief an executor before work begins or to identify concrete mismatches in an existing charter and related work.

  • Writing a brief before delegating project work
  • Updating a charter after a scope change
  • Reviewing a charter against the work it describes
sno-ai/sno-station-skills884Updated Oct 29, 2026

codex-coder

FreeSummary

Dispatch a production coding request from Claude Code to a direct Codex run. Route the work to Shell, TypeScript, Python, or Rust guidance based on the requested changes, and return Codex’s implementation report after the run completes.

  • Handing a TypeScript feature implementation to Codex
  • Routing a Python or Rust language migration
  • Assigning mixed Shell and TypeScript work in one request
sno-ai/sno-station-skills884Updated Oct 29, 2026

See all skills by sno-ai

Report a problem with this skill