sw-eval

sw-eval is a command for Claude Code from Obsidian-Owl/specwright. It costs 22 tokens per session (882 once invoked), scanned C, original, MIT.

A command that runs the Specwright evaluation suite by starting subagents in test workspaces and grading their results. An evaluation suite is a set of repeatable tests for checking agent behavior.

In plain words
What is it for?
Running all skill evaluations, one selected case, integration evaluations, or a dry run that only lists available cases.
Why use it?
It helps measure whether skills and integrations produce the expected results before relying on them.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

Good fit Running all skill evaluations, one selected case, integration evaluations, or a dry run that only lists available cases.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/obsidian-owl/specwright/sw-eval
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/Obsidian-Owl/specwright

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 sw-eval

README.md
[![agentmods](https://agentmods.dev/badge/commands/obsidian-owl/specwright/sw-eval/github.svg)](https://agentmods.dev/commands/obsidian-owl/specwright/sw-eval)
Your own site
<a href="https://agentmods.dev/commands/obsidian-owl/specwright/sw-eval"><img src="https://agentmods.dev/badge/commands/obsidian-owl/specwright/sw-eval/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 sw-eval

Your own site · 80×15
<a href="https://agentmods.dev/commands/obsidian-owl/specwright/sw-eval"><img src="https://agentmods.dev/badge/commands/obsidian-owl/specwright/sw-eval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 882 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00022 $0.00882
Opus 5.5 $0.00009 $0.00353
Sonnet 5.5 $0.00004 $0.00176
Haiku 4.5 $0.00002 $0.00088

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

Security

Grade C, and why

sw-eval scanned grade C with 1 finding 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 3mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf <WORKDIR>
.claude/commands/sw-eval.md · 128 lines

How it starts

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

Specwright Eval Runner

Run eval cases by spawning subagents for skill invocation, then grading the results.

Usage

/sw-eval --suite skill                    # Run all skill evals
/sw-eval --suite skill --case sw-init-fresh-ts  # Run one case
/sw-eval --suite skill --dry-run          # List cases without running
/sw-eval --suite integration              # Run integration evals

Instructions

Parse the arguments from the command input. The arguments follow the patterns above.

Step 1: Load the eval suite

Run this to load and validate the eval suite (output goes to stderr):

python -m evals --suite <SUITE_NAME> --dry-run 2>&1

This prints each eval case ID and its fixture path. If --dry-run was requested, stop here and show the output.

If --case was specified, filter to only that case from the output.

Step 1b: Create results directory

Create a timestamped results directory:

python -c "
import os
from datetime import datetime, timezone
ts = datetime.now(timezone.utc).strftime('%Y%m%dT%H%M%S')
results_dir = os.path.join('evals', 'results', f'run-{ts}')
os.makedirs(results_dir, exist_ok=True)
print(results_dir)
"

Save this as RESULTS_DIR for all subsequent steps.

Step 2: For each eval case

For each eval case (from the dry-run output), do the following:

2a. Setup fixture

Copy the fixture to a temp working directory using Bash:

python -c "
import shutil, tempfile, os
fixture_path = os.path.join(os.path.dirname(os.path.abspath('evals/__init__.py')), 'evals', '<FIXTURE_PATH_FROM_DRY_RUN>')
workdir = tempfile.mkdtemp(prefix='eval-')
shutil.copytree(fixture_path, workdir, dirs_exist_ok=True)
print(workdir)
"

Save the workdir path for the next steps.

2b. Run the skill via subagent

Spawn a subagent using the Agent tool:

Agent(
  prompt="<THE EVAL PROMPT - resolve from evals.json prompt_template + prompt_args>

Work in this directory: <WORKDIR>
Change to this directory first, then perform the task.
Accept all defaults. Do not ask clarifying questions.",
  subagent_type="general-purpose",
  description="Eval: <EVAL_ID>"
)

Read the full file on GitHub · 128 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. 3mo ago First seen · 128 lines · 22 tokens per session scan C e40fa13a3f0a

Subscribe to this mod's changes

sw-eval is a command published in the GitHub repository Obsidian-Owl/specwright (10 stars, last pushed 7mo ago), licensed MIT. It adds 22 tokens to every session and 882 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

sw-eval compared with commands from other repositories

sw-eval next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sw-evalObsidian-Owl/specwrightCommand107mo agoMITC22Claude Code
orchestrateegorfedorov/claude-context-optimizerCommand1366d agoMITA0Claude Code
initazrtydxb/procoderCommand21221d agoApache-2.0A16Claude Code
simplifyazrtydxb/procoderCommand21221d agoApache-2.0A39Claude Code
gitazrtydxb/procoderCommand21221d agoApache-2.0A20Claude Code
testazrtydxb/procoderCommand21221d agoApache-2.0A20Claude Code
initlgbarn/shipyardCommand671mo agoMITA8Claude Code