agent-harness-routerlisted
Install: claude install-skill IgorGanapolsky/mac-yolo-safeguards
## Trigger
Any agent task involving model selection, cost optimization, budget enforcement,
discovery capture of AI patterns, or private benchmark validation.
## Usage
```bash
# Route a task to the best model (cost/latency/quality/privacy/balance)
node tools/agent-harness-router.js route '{"requiresTools":true,"category":"coding","preference":"quality"}'
# Check current budget + discovery/benchmark stats
node tools/agent-harness-router.js check --json
# Capture a useful prompt/pattern for reuse
node tools/agent-harness-router.js discover "Write a function to sort arrays" --model zai-org/glm-5.3 --task coding --tags utility,beginner
# Private benchmark: add a task, record results, get portability scores
node tools/agent-harness-router.js benchmark add --name "Sort test" --category coding --prompt "Write sort" --expected "sorted"
node tools/agent-harness-router.js benchmark portability
# List all known models
node tools/agent-harness-router.js registry --json
```
## Health Check
```bash
node tools/agent-harness-router.js check --json
# Exit code 0 = budget not exhausted, storage healthy
# Exit code 1 = budget exhausted (fail-closed)
```
## Architecture
- **MODEL_REGISTRY**: 9 models with cost/latency/quality/privacy metadata
- **routeModel()**: Optimal model for a task based on 5 routing preferences
- **BudgetGuard**: Fail-closed $10/mo spending cap (per Anti-Babysitting + GLM-5.3)
- **DiscoveryCapture**: Captures useful prompt/task patterns with secret rejection + inpu