agentharness-router

agentharness-router is a cursor rule for Claude Code, Cursor from andr-ca/agentharness. It costs 5,154 tokens per session, scanned A, original, MIT.

A generated set of routing rules for an AI coding agent, based on a repository's CLAUDE.md instructions. It tells the agent where to find the full rules and how the generated file must be maintained.

In plain words
What is it for?
Use it to route coding sessions to the right repository instructions, keep Cursor rule files synchronized, and follow the required verification and staging steps before stopping.
Why use it?
It keeps repository-wide agent guidance consistent with its source file and lets the CI check detect manual or outdated changes. It also defines the repository's completion workflow.

Cursor rule for Claude CodeCursor

Written for Claude Code and Cursor: PreToolUse hook event, but also installed under .cursor/. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Use it to route coding sessions to the right repository instructions, keep Cursor rule files synchronized, and follow the required verification and staging steps before stopping.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/andr-ca/agentharness/agentharness-router
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.

Clone the repo
git clone --depth 1 https://github.com/andr-ca/agentharness

Made for: Claude Code, Cursor.

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 agentharness-router

README.md
[![agentmods](https://agentmods.dev/badge/rules/andr-ca/agentharness/agentharness-router/github.svg)](https://agentmods.dev/rules/andr-ca/agentharness/agentharness-router)
Your own site
<a href="https://agentmods.dev/rules/andr-ca/agentharness/agentharness-router"><img src="https://agentmods.dev/badge/rules/andr-ca/agentharness/agentharness-router/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.

agentmods 80×15 button for agentharness-router

Your own site · 80×15
<a href="https://agentmods.dev/rules/andr-ca/agentharness/agentharness-router"><img src="https://agentmods.dev/badge/rules/andr-ca/agentharness/agentharness-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,154 This file is loaded in full into every session.
When invoked 5,154 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.05154 $0.05154
Opus 5.5 $0.02062 $0.02062
Sonnet 5.5 $0.01031 $0.01031
Haiku 4.5 $0.00515 $0.00515

Measured 3mo ago against content hash 4712b4ce44b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agentharness-router 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 3mo 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.

.cursor/rules/agentharness-router.mdc · 394 lines

How it starts

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

Generated from this repo's own CLAUDE.md by tools/generate-cursor-rules.sh (https://github.com/andr-ca/agentharness) — do not hand-edit; regenerate instead (tools/generate-cursor-rules.sh --output-dir .). A CI check keeps this file in sync with its source (see .github/workflows/ci.yml's content-quality job).

This file covers repo-wide routing rules only. Cursor has no confirmed support for the Agent Skills open standard (SKILL.md) — each skill under .claude/skills/ is instead mirrored here as its own .cursor/rules/<skill-name>.mdc, with that skill's own description copied into the rule's frontmatter and no globs set. That makes each rule Agent-Requested: Cursor's agent reads the description and decides whether to pull the full rule body in, the closest native analog to SKILL.md's own progressive disclosure.


agentharness – Agent Router

This file is loaded into every session that touches this repo. Keep it short — everything else is one link away. Full index: MANIFEST.md. Planned-but-not-built: ROADMAP.md.

🤖 Agent Workflow Completion

Default (no publish authority): verify and stage, then stop.

  1. ✅ Run the completion gate — before declaring any work done, run bash tools/check-completion.sh. This script verifies lint, types, tests, coverage, and content quality in one shot and exits non-zero if anything fails. The Stop hook in .github/hooks/completion-gate.json and .claude/settings.json enforces this automatically for Claude Code and GitHub Copilot — the agent cannot stop until all gates pass.
  2. ✅ Create atomic commits locally — one logical unit per commit, clear message explaining WHY
  3. 🛑 Stop before pushing, opening a PR, or auto-implementing recommendations. Present a summary of what's staged and ask the user to confirm before publishing anything.

A local commit is not a durable safe-point in an ephemeral-container execution environment. If you have verified, committed-but-unpushed work and are about to block on AskUserQuestion or other unbounded human input, consider pushing to a remote branch (a scratch/WIP branch is fine) first — committed-but-unpushed work can be lost if the container is reclaimed during the wait, with no error at commit time and no warning until a later git log looks unfamiliar. This is disclosure of an existing risk, not a grant of publish authority: it does not authorize opening a PR or merging, and the default tier above still governs those.

Read the full file on GitHub · 394 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. 3mo ago First seen · 394 lines · 5,154 tokens per session scan A 4712b4ce44b0

Subscribe to this mod's changes

agentharness-router is a cursor rule published in the GitHub repository andr-ca/agentharness (1 stars, last pushed 9d ago), licensed MIT. It adds 5,154 tokens to every session, about $0.0206 per session on Opus 5.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

agentharness-router compared with cursor rules from other repositories

agentharness-router next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentharness-routerandr-ca/agentharnessCursor rule19d agoMITA5,154Claude Code, Cursor
hackhack-dance/hackCursor rule9todayMITA1,486Cursor
dreamd-recallbotzrDev/dreamdCursor rule9todayApache-2.0A135Cursor
implement-task-listopenplanr/OpenPlanrCursor rule7yesterdayMITA12Cursor
create-featuresopenplanr/OpenPlanrCursor rule7yesterdayMITA16Cursor
handoffwardmos/waybillCursor rule853mo agoApache-2.0A15Cursor
lemoncrow.executelemoncrow-lab/lemoncrowCursor rule718d agononeA9Cursor