cursorrules

A set of Cursor rules that routes each request into an execution profile before code changes, research, or audits begin. It can apply stricter handling to configured high-risk files and folders.

In plain words
What is it for?
Use it to govern coding-agent work, inspect project-specific risk settings, and enforce a forensic profile for database, persistence, transport, gateway, security, credential, or core-instruction files.
Why use it?
It makes the agent classify work consistently and adds extra review requirements when sensitive project areas may be changed.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/johnnymaconny/mighty-router/cursorrules
Clone the repo
git clone --depth 1 https://github.com/JOHNNYMACONNY/mighty-router

Made for: Cursor.

Per session 742 This file is loaded in full into every session.
When invoked 742 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00742 $0.00742
Opus 5 $0.00371 $0.00371
Sonnet 5 $0.00148 $0.00148
Haiku 4.5 $0.00074 $0.00074

Measured yesterday against content hash 0bf3c08be70e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules 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 yesterday.

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.

templates/.cursorrules · 61 lines

How it starts

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

Mighty Router — Cursor AI Configuration

You are running with the Mighty Router rules enabled. Before proceeding with any code modification, research, or audit, you must classify the request and apply the corresponding execution profile rules.


1. Automatic Escalation Rules

Regardless of self-classification, you MUST use the MIGHTY-FORENSIC profile if the task involves modifying any files or directories matching project-specific or default high-risk paths.

Dynamic Configuration

Check if .mightyrc or .mighty.json exists in the workspace root. If it does:

  1. Read the file and locate the high_risk_paths array.
  2. If any file about to be modified matches any pattern or folder name in high_risk_paths, automatically escalate the task to the MIGHTY-FORENSIC profile.

Fallback/Default Paths

If no project-specific configuration is found, automatically escalate if any target path matches:

  • /gateway/ or /transports/
  • /persistence/, /db/, or database schemas
  • SOUL.md or core agent instructions/prompts
  • Security-critical settings or credentials

2. Profile Selection

Classify the task into exactly ONE of the following profiles:

[Profile 1] MIGHTY-LIGHT

  • Use Case: General queries, explanations, code walkthroughs, or simple questions.
  • Rules:
    1. Do not use XML tags.
    2. Keep responses brief, direct, and telegraphic.
    3. Do not run commands or modify files.

[Profile 2] MIGHTY-VERIFY

  • Use Case: Verification tasks, UAT checks, checking if tests passed, auditing logs/artifacts.
  • Rules:
    1. Verify expected artifacts exist on disk (do not assume).
    2. Differentiate clearly between: Passed / Failed / Not Checked / Not Provable.
    3. Present a concise bulleted summary of checked evidence. Do not modify files.

[Profile 3] MIGHTY-STANDARD

  • Use Case: Routine, low-risk code edits, refactors, or new minor files.
  • Rules:
    1. No XML tags (to save output tokens).
    2. Check first: Verify target files exist and read them before editing.
    3. Plan: State a 1-3 sentence plan in plain text.
    4. Act: Apply changes using the minimum necessary edit footprint.
    5. Verify: Run tests or compile the code to confirm success.

Read the full file on GitHub · 61 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. yesterday First seen · 61 lines · 742 tokens per session scan A 0bf3c08be70e

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository JOHNNYMACONNY/mighty-router (1 stars, last pushed 3mo ago), licensed MIT. It adds 742 tokens to every session, about $0.0037 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-31.