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.
npx agentmods add commands/circuit-synth/kicad-sch-api/run-testsgit clone --depth 1 https://github.com/circuit-synth/kicad-sch-apiWrote 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.
[](https://agentmods.dev/commands/circuit-synth/kicad-sch-api/run-tests)<a href="https://agentmods.dev/commands/circuit-synth/kicad-sch-api/run-tests"><img src="https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/run-tests.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01733 |
| Opus 5 | $0.00000 | $0.00866 |
| Sonnet 5 | $0.00000 | $0.00347 |
| Haiku 4.5 | $0.00000 | $0.00173 |
Grade C, and why
run-tests 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 4d 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 test_outputs/ .pytest_cache/ .coverage htmlcov/ 2>/dev/null || true How it starts
The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Runner Command - kicad-sch-api
Usage
/run-tests [options]
Description
Orchestrates comprehensive testing for kicad-sch-api using uv and pytest, covering all functionality areas with professional test reporting.
Options
--suite=standard- Test suite:quick,standard,full,coverage(default: standard)--skip-install- Skip dependency reinstallation (faster for development)--keep-outputs- Don't delete generated test files--verbose- Show detailed output--format=true- Auto-format code before testing (default: true)--fail-fast=false- Stop on first failure (default: false)
Test Suites
🚀 Quick Suite (~10 seconds)
Fast development testing:
uv run pytest tests/test_component_management.py tests/test_sexpr_parsing.py -q
📋 Standard Suite - Default (~30 seconds)
Comprehensive core functionality:
# Auto-format if requested
uv run black kicad_sch_api/ tests/ --quiet
uv run isort kicad_sch_api/ tests/ --quiet
# Run core tests
uv run pytest tests/ -v --tb=short
🔬 Full Suite (~2 minutes)
Complete validation including MCP server:
# Python library tests
uv run pytest tests/ -v --cov=kicad_sch_api --cov-report=html
# MCP server tests
cd mcp-server && npm test
# Format preservation tests
uv run pytest tests/test_format_preservation.py -v
# Reference schematic tests
uv run pytest tests/reference_kicad_projects/ -v
📊 Coverage Suite (~1 minute)
Detailed coverage analysis:
uv run pytest tests/ --cov=kicad_sch_api --cov-report=term-missing --cov-report=html --cov-fail-under=80
Implementation
#!/bin/bash
# Parse arguments
SUITE="standard"
SKIP_INSTALL=false
KEEP_OUTPUTS=false
VERBOSE=false
FORMAT=true
FAIL_FAST=false
while [[ $# -gt 0 ]]; do
case $1 in
--suite=*)
SUITE="${1#*=}"
shift
;;
--skip-install)
SKIP_INSTALL=true
shift
;;
--verbose)
VERBOSE=true
shift
;;
--format=*)
FORMAT="${1#*=}"
shift
;;
--fail-fast)
FAIL_FAST=true
shift
;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
done
# Ensure we're in Python directory
cd python || { echo "❌ Must run from kicad-sch-api root"; exit 1; }
# Install dependencies if needed
if [[ "$SKIP_INSTALL" == "false" ]]; then
echo "📦 Installing dependencies..."
uv pip install -e .[dev] --quiet
fi
# Pre-test formatting
if [[ "$FORMAT" == "true" ]]; then
echo "🎨 Auto-formatting code..."
uv run black kicad_sch_api/ tests/ --quiet
uv run isort kicad_sch_api/ tests/ --quiet
echo "✅ Code formatted"
fi
# Build pytest arguments
PYTEST_ARGS=""
[[ "$VERBOSE" == "true" ]] && PYTEST_ARGS="$PYTEST_ARGS -v"
[[ "$FAIL_FAST" == "true" ]] && PYTEST_ARGS="$PYTEST_ARGS -x"
# Execute test suite
case $SUITE in
quick)
echo "🚀 Running quick test suite..."
uv run pytest tests/test_component_management.py tests/test_sexpr_parsing.py -q $PYTEST_ARGS
;;
standard)
echo "📋 Running standard test suite..."
uv run pytest tests/ --tb=short $PYTEST_ARGS
;;
full)
echo "🔬 Running full test suite..."
# Python library tests with coverage
uv run pytest tests/ --cov=kicad_sch_api --cov-report=term-missing $PYTEST_ARGS || exit 1
# MCP server tests
if [[ -d "../mcp-server" ]]; then
echo "🤖 Testing MCP server..."
cd ../mcp-server
if [[ -f "package.json" ]]; then
npm test || echo "⚠️ MCP server tests failed"
fi
cd ../python
fi
# Reference schematic tests
if [[ -d "tests/reference_kicad_projects" ]]; then
echo "📋 Testing reference schematics..."
uv run pytest tests/reference_kicad_projects/ -v $PYTEST_ARGS
fi
;;
coverage)
echo "📊 Running coverage analysis..."
uv run pytest tests/ --cov=kicad_sch_api --cov-report=term-missing --cov-report=html --cov-fail-under=70 $PYTEST_ARGS
echo "📊 Coverage report: htmlcov/index.html"
;;
*)
echo "❌ Unknown suite: $SUITE"
echo "Available suites: quick, standard, full, coverage"
exit 1
;;
esac
# Cleanup if requested
if [[ "$KEEP_OUTPUTS" == "false" ]]; then
echo "🧹 Cleaning up test outputs..."
rm -rf test_outputs/ .pytest_cache/ .coverage htmlcov/ 2>/dev/null || true
fi
echo "✅ Test suite completed"
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.
- 4d ago First seen · 267 lines · 0 tokens per session scan C c0bd7f841099
run-tests is a command published in the GitHub repository circuit-synth/kicad-sch-api (52 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,733 tokens. 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-30.
Other commands, from other repositories
review-branch
Purpose: Comprehensive branch analysis for code quality, security, performance, and risk assessment before merging to main. Specialized for circuit-synth development workflows.
dead-code-analysis
Command "dead-code-analysis" from circuit-synth/circuit-synth, covering dead code analysis command, usage, description, parameters and output files.
bug
Debug and fix issues with log-driven iterative approach.
make-test
Wrap manual test into automated pytest test.
review-prompt
Review prompts for best practices and clarity.
test-ref
Create reference material for testing and development.