meta-enforcement

meta-enforcement is a cursor rule for Claude Code, Cursor from KimYx0207/Meta_Kim. It costs 1,135 tokens per session, scanned A, original, Apache-2.0.

A set of Cursor rules and hooks that restrict meta-agents to governance work, such as checking permissions and execution boundaries. Meta-agents are agents that supervise or design rules for other agents rather than directly changing code.

In plain words
What is it for?
Use it to enforce agent-dispatch boundaries in Cursor and keep a declarative backup when the enforcement hook cannot run.
Why use it?
It stops governance agents from writing code, running tests, or performing other direct execution tasks. A fail-closed hook denies tool calls when enforcement is unavailable or misconfigured.

Cursor rule for Claude CodeCursor

Written for Claude Code and Cursor: PreToolUse hook event, but also a Cursor rule (.mdc). Also seen: mentions Claude Code; mentions AGENTS.md.

Good fit Use it to enforce agent-dispatch boundaries in Cursor and keep a declarative backup when the enforcement hook cannot run.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kimyx0207/meta_kim/meta-enforcement
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/KimYx0207/Meta_Kim

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 meta-enforcement

README.md
[![agentmods](https://agentmods.dev/badge/rules/kimyx0207/meta_kim/meta-enforcement.svg)](https://agentmods.dev/rules/kimyx0207/meta_kim/meta-enforcement)
Your own site
<a href="https://agentmods.dev/rules/kimyx0207/meta_kim/meta-enforcement"><img src="https://agentmods.dev/badge/rules/kimyx0207/meta_kim/meta-enforcement.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,135 This file is loaded in full into every session.
When invoked 1,135 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.01135 $0.01135
Opus 5 $0.00567 $0.00567
Sonnet 5 $0.00227 $0.00227
Haiku 4.5 $0.00113 $0.00113

Measured 8d ago against content hash 2bb67b35d757, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

meta-enforcement 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 8d 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.

canonical/runtime-assets/cursor/rules/meta-enforcement.mdc · 104 lines

How it starts

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

Meta-Agent Execution Boundary (Cursor Declarative Backup)

Cursor's official Hooks surface does expose a real tool-call deny protocol via preToolUse hooks, equivalent in effect to Claude Code's hookSpecificOutput.permissionDecision: "deny". A hook can deny a tool call by either:

  • exiting with code 2 and writing a deny reason to stderr, or
  • emitting stdout JSON {"permission": "deny", "user_message": "...", "agent_message": "..."}

When combined with failClosed: true, hook crashes default to deny rather than allow. The canonical mechanical enforcement now lives in .cursor/hooks/enforce-agent-dispatch.mjs (synced from canonical/runtime-assets/cursor/hooks/). See Cursor Hooks docs for the wire protocol.

This MDC rule is the declarative backup. It applies on every prompt (alwaysApply: true) and keeps the meta-agent boundary intact when the hook is misconfigured, disabled, unavailable in the active host, or otherwise unavailable. Hook-first, MDC-as-safety-net.

Hard rules (apply at every turn)

  1. The nine meta-agents are governance-only. Names: meta-warden, meta-conductor, meta-genesis, meta-artisan, meta-sentinel, meta-librarian, meta-prism, meta-scout, meta-chrysalis. Each one carries executionBlock=true in its canonical definition.

  2. Meta-agents do NOT touch execution tools. If the user requests a meta-agent to write code, run tests, edit files, debug, build, or perform any direct execution task, refuse and instead:

    • state which meta-agent boundary the request violates
    • recommend the correct execution-layer agent (or open a capabilityGapPacket if no owner exists)
    • hand the actual work to that agent via Cursor's native agent invocation

Read the full file on GitHub · 104 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. 8d ago First seen · 104 lines · 1,135 tokens per session scan A 2bb67b35d757

Subscribe to this mod's changes

meta-enforcement is a cursor rule published in the GitHub repository KimYx0207/Meta_Kim (270 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,135 tokens to every session, about $0.0057 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.