run-reference-tests

run-reference-tests is a command for Claude Code from circuit-synth/mcp-kicad-sch-api. It costs 0 tokens per session (2,194 once invoked), scanned A, a copy of run-reference-tests, MIT.

A command for running tests against reference KiCad schematic projects. KiCad is an electronics design tool, and schematics are diagrams that describe circuit components and connections.

In plain words
What is it for?
Use it to test a selected reference project, create missing test files, validate formatting, or include performance benchmarks.
Why use it?
It checks whether schematic parsing, editing, formatting, and related behavior continue to work across different example projects.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is cd ../../.. # Back to python directory.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 run-reference-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/circuit-synth/mcp-kicad-sch-api/run-reference-tests.svg)](https://agentmods.dev/commands/circuit-synth/mcp-kicad-sch-api/run-reference-tests)
Your own site
<a href="https://agentmods.dev/commands/circuit-synth/mcp-kicad-sch-api/run-reference-tests"><img src="https://agentmods.dev/badge/commands/circuit-synth/mcp-kicad-sch-api/run-reference-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00000 $0.02194
Opus 5 $0.00000 $0.01097
Sonnet 5 $0.00000 $0.00439
Haiku 4.5 $0.00000 $0.00219

Measured 6d ago against content hash 3d76154799af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

run-reference-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 6d 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.

Origin

This is a copy

100% identical to run-reference-tests — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/test/run-reference-tests.md · 303 lines

How it starts

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

Reference Schematic Tests Command - kicad-sch-api

Usage

/run-reference-tests [project-name]

Description

Runs comprehensive tests against reference KiCAD schematic projects to validate parsing, manipulation, and format preservation across all schematic element types.

Parameters

  • project-name (optional): Specific reference project to test (e.g., "02_multiple_passive_components")
  • --create-missing: Create test files for reference projects that don't have tests yet
  • --format-validation: Focus on format preservation testing
  • --performance: Include performance benchmarking

Reference Project Structure

tests/reference_kicad_projects/
├── README.md                           # Project checklist and status
├── 01_simple_resistor/                 # ✅ Basic component
│   ├── simple_resistor.kicad_sch
│   └── test_simple_resistor.py
├── 02_multiple_passive_components/     # 🔲 Component variety  
│   ├── multiple_passives.kicad_sch
│   └── test_multiple_passives.py
├── 04_label_types/                     # 🔲 All label types
│   ├── label_types.kicad_sch
│   └── test_label_types.py
└── [... 25 more reference projects]

Implementation

#!/bin/bash

# Parse arguments
PROJECT_NAME=""
CREATE_MISSING=false
FORMAT_VALIDATION=false
PERFORMANCE=false

while [[ $# -gt 0 ]]; do
    case $1 in
        --create-missing)
            CREATE_MISSING=true
            shift
            ;;
        --format-validation)
            FORMAT_VALIDATION=true
            shift
            ;;
        --performance)
            PERFORMANCE=true
            shift
            ;;
        -*)
            echo "Unknown option: $1"
            exit 1
            ;;
        *)
            PROJECT_NAME="$1"
            shift
            ;;
    esac
done

# Ensure we're in correct directory
cd python/tests/reference_kicad_projects || {
    echo "❌ Must run from kicad-sch-api root"
    exit 1
}

if [[ -n "$PROJECT_NAME" ]]; then
    # Test specific project
    if [[ ! -d "$PROJECT_NAME" ]]; then
        echo "❌ Reference project not found: $PROJECT_NAME"
        echo "Available projects:"
        ls -1 | grep -E '^[0-9]+_' | head -10
        exit 1
    fi
    
    echo "🧪 Testing reference project: $PROJECT_NAME"
    
    # Run project-specific tests
    if [[ -f "$PROJECT_NAME/test_${PROJECT_NAME}.py" ]]; then
        cd ../../..  # Back to python directory
        uv run pytest "tests/reference_kicad_projects/$PROJECT_NAME/" -v
    else
        echo "⚠️ No test file found for $PROJECT_NAME"
        if [[ "$CREATE_MISSING" == "true" ]]; then
            echo "🔧 Creating test template..."
            # Create test template (implementation below)
        fi
    fi
else
    # Test all reference projects
    echo "🧪 Testing all reference schematic projects..."
    
    cd ../../..  # Back to python directory
    
    # Run all reference tests
    if [[ "$FORMAT_VALIDATION" == "true" ]]; then
        uv run pytest tests/reference_kicad_projects/ -v -k "format_preservation"
    elif [[ "$PERFORMANCE" == "true" ]]; then
        uv run pytest tests/reference_kicad_projects/ -v -k "performance"
    else
        uv run pytest tests/reference_kicad_projects/ -v
    fi
fi

Read the full file on GitHub · 303 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. 6d ago First seen · 303 lines · 0 tokens per session scan A 3d76154799af

Subscribe to this mod's changes

run-reference-tests is a command published in the GitHub repository circuit-synth/mcp-kicad-sch-api (20 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,194 tokens. A static security scan graded it A with 0 findings. It is 100% identical to run-reference-tests, differing in 0 lines, and is treated as a copy.