write-scrut-tests

write-scrut-tests is a skill for Claude Code from cboone/agent-harness-plugins. It costs 53 tokens per session (778 once invoked), scanned A, original, MIT.

A style guide for Scrut test files used to check command-line programs and Zsh plugins. Scrut is a tool that runs documented command examples and compares their output with expected results.

In plain words
What is it for?
Writing or reviewing tests for command-line binaries and sourced Zsh plugins, including success cases, edge cases, and errors.
Why use it?
It gives tests a consistent structure and makes failures easier to locate and maintain.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the write-scrut-tests plugin — 1 skill shipped together

Good fit Writing or reviewing tests for command-line binaries and sourced Zsh plugins, including success cases, edge cases, and errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cboone/agent-harness-plugins/write-scrut-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.

Any agent
npx skills add cboone/agent-harness-plugins --skill write-scrut-tests
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code.

Or install write-scrut-tests, the plugin that ships this one along with the rest of its 1 skill.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-scrut-tests/github.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/write-scrut-tests)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-scrut-tests"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-scrut-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 write-scrut-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-scrut-tests"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-scrut-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 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.00053 $0.00778
Opus 5.5 $0.00021 $0.00311
Sonnet 5.5 $0.00011 $0.00156
Haiku 4.5 $0.00005 $0.00078

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

Security

Grade A, and why

write-scrut-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 8d 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.

plugins/write-scrut-tests/skills/write-scrut-tests/SKILL.md · 84 lines

How it starts

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

Scrut Test Style Guide

Apply the scrut test conventions from ./references/SCRUT.md when creating or editing scrut CLI test files.

Key Conventions

Read ./references/SCRUT.md for the complete guide. Summary:

File Organization

  • Place tests in tests/scrut/ at the repository root
  • One file per behavior group (help.md, error-handling.md, flag-validation.md)
  • Use kebab-case.md file names describing the behavior tested

Test Structure

  • One logical assertion per scrut block for precise failure locations
  • Use > continuation prefix to split long &&-chained commands across lines
  • Order blocks: happy path first, then common variations, then edge cases, then errors
  • Level-1 heading for the test group, level-2 headings for individual test cases

Binary Invocation

  • Always reference the binary via "${TOOL_BIN}" environment variable, never by path
  • Use NO_COLOR=1 for commands that may produce colored output
  • Use $(mktemp -d "${TMPDIR:-/tmp}/scrut.XXXXXX") for commands that create files

Assertion Selection

  • Exact match (default) for stable, deterministic output like help text
  • (glob) for dynamic values: versions, timestamps, commit hashes, paths
  • (glob+) for variable-length sections you want to acknowledge but not pin
  • (regex) only when glob patterns are insufficient
  • Prefer NO_COLOR=1 over (escaped) matching for colored output

Error Testing

  • Always include the expected exit code: [1]
  • Redirect stderr to stdout: 2>&1
  • Pipe through head -1 for long error output with usage text
  • Use {output_stream: stderr} attribute as an alternative to redirection

Maintainability

  • Pin help text and error messages exactly (catches regressions in user-facing text)
  • Use glob for values that change between builds (versions, hashes, timestamps)
  • Review diffs after make test-scrut-update to ensure glob/regex patterns were not replaced with literals

Zsh Plugin and Library Testing

For testing zsh plugins and sourced library code with scrut, read ./references/zsh-plugin-testing.md. Key points:

Read the full file on GitHub · 84 lines

Files

What ships with it

3 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. 8d ago Changed · +1 lines · +10 tokens per session 8e9bb10bcebb
  2. 25d ago Changed · +4 lines aa13b2e35710
  3. 26d ago Changed · -3 lines · -44 tokens per session 6229984125ff
  4. 1mo ago First seen · 82 lines · 87 tokens per session scan A 0a0a041b515b

Subscribe to this mod's changes

write-scrut-tests is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 778 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-09-03.

Related

Other skills, from other repositories

verify-ui-change-in-cloud

Verifies user-facing Warp client changes by spawning a cloud agent with computer use to test Warp. Use only when the user explicitly requested computer-use verification or accepted an offer to run it, and ONLY in non-sandboxed environments and local environments. Triggers a cloud agent that runs the test-warp-ui skill.

warpdotdev/warp · 69 tokens

test-warp-ui

Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computeruse tool is available to the agent. Covers launching Warp and verifying UI behavior.

warpdotdev/warp · 55 tokens

walkthrough

Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.

joshukraine/dotfiles · 33 tokens

browser-qa

Use to exercise the running app in a real browser — after UI changes, before ship, or when the user asks to QA the site, smoke-test a branch, or check "does it actually work". Drives affected routes headlessly via Playwright, captures console errors, failed requests, and screenshots, and produces a report with a…

AbdurRafay2004/handoff · 85 tokens

validate-with-recording

Validate that a web application actually works by recording the browser while driving it, then judging the recording against a rubric. Use when asked to check, verify, test, or QA a web app's behaviour in a real browser — especially for anything involving loading states, animations, timing, flicker, layout shift, or…

ShubhenduVaid/flipbook · 81 tokens

end-to-end

Use when the agent must execute or directly observe decisive live software acceptance through a real user-visible or runtime surface, including browser, Emacs, terminal display, async/network delivery, persistence, or scheduler behavior. Automation may drive the actual surface. Do not use solely to give manual test…

benthamite/dotfiles · 93 tokens