Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/studioKjm/ai-harness-templatenpx agentmods add commands/studiokjm/ai-harness-template/strangler-routeWrote 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/studiokjm/ai-harness-template/strangler-route)<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/strangler-route"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/strangler-route/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.
<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/strangler-route"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/strangler-route.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00021 | $0.00918 |
| Opus 5 | $0.00010 | $0.00459 |
| Sonnet 5 | $0.00004 | $0.00184 |
| Haiku 4.5 | $0.00002 | $0.00092 |
Grade A, and why
strangler-route 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/strangler-route — Manage Routing Rules
Decide which endpoints/patterns flow to legacy vs new module.
When to use
- After
/strangler new— register the first patterns to route - During coexist phase — flip patterns from legacy to new as new module catches up
- When discovering an unrouted endpoint (gate warned about it)
Usage
/strangler-route add <plan-id> --pattern "PAT" --target legacy|new [--reason "..."] [--rule-id ID]
/strangler-route remove <plan-id> --rule-id <id>
Prerequisites
- Plan exists (created via
/strangler new) - For
add:--patternand--targetrequired
Instructions
Step 1 — Run the script
# Add rule
python3 .harness/methodologies/strangler-fig/scripts/sf.py route add \
sf-2026-04-30-billing-rewrite \
--pattern "POST /api/refunds" \
--target new \
--reason "validated 2 weeks in coexist, no incidents"
# Remove rule
python3 .harness/methodologies/strangler-fig/scripts/sf.py route remove \
sf-2026-04-30-billing-rewrite \
--rule-id rule-3
Step 2 — Pattern formats supported
The pattern is a free-form string. Common conventions:
| Pattern style | Example | Use case |
|---|---|---|
| HTTP route | POST /api/refunds |
REST API |
| HTTP wildcard | GET /api/refunds/* |
URL family |
| Function symbol | BillingService.calculate |
Direct function call routing |
| Queue topic | events:refund.processed |
Async/event-driven |
| Feature flag | flag:new-billing-enabled |
Flag-gated routing |
The facade implementation (in <plan>.facade.path) interprets these patterns. The methodology doesn't enforce a specific format.
Step 3 — Coverage auto-recompute
Adding/removing rules triggers _recompute_coverage:
coverage.routed_countupdatescoverage.unroutedlist refreshescoverage.percentrecomputes
If coverage.legacy_endpoints is empty, coverage stays at 0% even with many rules. Run /strangler show to verify endpoint list, or use --scan-endpoints to populate it from the codebase.
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.
- 10d ago First seen · 102 lines · 21 tokens per session scan A 8cddf0619a6e
strangler-route is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 918 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-30.
Other commands, from other repositories
new-config
Scaffold strongly-typed configuration with IOptions , validation, and environment-specific overrides.
new-entity
Scaffold a new database entity end-to-end: migration SQL, repository, service, DTO, controller, and tests.
new-error-types
Scaffold custom exception types with HTTP status mapping, problem details, and a global exception handler.
new-event-handler
Scaffold domain event types, handlers, and a MediatR-based publish/subscribe pipeline.
new-graphql-resolver
Scaffold a Hot Chocolate GraphQL resolver with query, mutation, subscription, and DataLoader patterns.
new-middleware
Scaffold ASP.NET Core middleware with request/response pipeline, DI support, structured logging, and proper ordering.