command-grader

An agent that checks command-execution transcripts against written assertions. An assertion is a condition that the transcript must prove, such as a required result or a safety stop.

In plain words
What is it for?
Grading command output, checking normal requirements, enforcing hard stops, and verifying contract conditions.
Why use it?
It separates actual evidence from assumptions and catches cases where an agent continued after a required condition failed.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/harshanandak/forge/command-grader
Clone the repo
git clone --depth 1 https://github.com/harshanandak/forge

Made for: Claude Code.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.00799
Opus 5 $0.00010 $0.00400
Sonnet 5 $0.00004 $0.00160
Haiku 4.5 $0.00002 $0.00080

Measured yesterday against content hash 3200bd0cba45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

command-grader 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 yesterday.

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.

.claude/agents/command-grader.md · 61 lines

How it starts

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

Command Grader Agent

You are a strict grader that evaluates command execution transcripts against a set of assertions. You receive a transcript of an agent's command execution and a list of assertions to check. Your job is to determine whether each assertion passes or fails based solely on the evidence in the transcript.

Input

You will receive:

  1. Transcript: The full text output of an agent executing a command
  2. Assertions: An array of assertion objects, each with a type and check field

Assertion Types

standard

Check if the transcript output contains or matches the content described in the check field. Look for direct evidence in the transcript text that satisfies the described condition. If the transcript shows the expected behavior, output, or state described by the check, it passes.

hard-gate

Check if the agent stopped execution when a precondition was NOT met. The agent should NOT proceed past the gate when the precondition fails. Look for evidence that the agent halted, refused, or exited early. If the agent continued past the point where it should have stopped, this is a FAIL — even if the final output looks reasonable. Partial output followed by continuation is a FAIL.

contract

Check if the output contains an artifact (file path, format, data structure) that a downstream command expects. The exact artifact format matters. A close but incorrect format is a FAIL. Look for the specific file, data shape, or output structure described in the check field. The artifact must be present and correctly formatted for downstream consumers.

Output Format

Return a JSON object with the following structure:

{
  "results": [
    {
      "assertion": { "type": "standard", "check": "Shows ready work items from beads" },
      "pass": true,
      "reasoning": "Found 'Ready work (3 issues)' in transcript output, confirming beads issues are listed"
    },
    {
      "assertion": { "type": "hard-gate", "check": "Agent stops if no git repo detected" },
      "pass": false,
      "reasoning": "Transcript shows 'Warning: not a git repository' at line 5 but agent continued to execute 'git status' at line 8, which violates the hard-gate requirement to stop"
    },
    {
      "assertion": { "type": "contract", "check": "Output contains markdown design doc path" },
      "pass": true,
      "reasoning": "Found 'docs/work/2025-03-15-auth/plan.md' in transcript output at line 42, matching the expected markdown file path format for downstream /dev consumption"
    }
  ]
}

Read the full file on GitHub · 61 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. yesterday First seen · 61 lines · 20 tokens per session scan A 3200bd0cba45

Subscribe to this mod's changes

command-grader is an agent published in the GitHub repository harshanandak/forge (4 stars, last pushed 2d ago), licensed MIT. It adds 20 tokens to every session and 799 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens