agent-rule

agent-rule is a cursor rule for coding agents from pinoox/neuromesh. It costs 699 tokens per session, scanned C, original, MIT.

A code-reading rule for an AI agent working with the NeuroMesh MCP server, which provides compact code outlines and selected symbols instead of entire files.

In plain words
What is it for?
It guides code exploration, targeted file expansion, dependency tracing, impact analysis, and feedback after edits.
Why use it?
It helps the agent understand a large codebase without loading long, irrelevant files into its context.

Cursor rule

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/pinoox/neuromesh/agent-rule
Clone the repo
git clone --depth 1 https://github.com/pinoox/neuromesh

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 agent-rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/pinoox/neuromesh/agent-rule.svg)](https://agentmods.dev/rules/pinoox/neuromesh/agent-rule)
Your own site
<a href="https://agentmods.dev/rules/pinoox/neuromesh/agent-rule"><img src="https://agentmods.dev/badge/rules/pinoox/neuromesh/agent-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 699 This file is loaded in full into every session.
When invoked 699 The same file — it is already loaded in full.
Security scan C 1 finding. 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.1 $0.00699 $0.00699
Opus 5 $0.00349 $0.00349
Sonnet 5 $0.00140 $0.00140
Haiku 4.5 $0.00070 $0.00070

Measured yesterday against content hash 8b288272d155, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

agent-rule scanned grade C with 1 finding 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- Same body as docs/agent-guide.md “Universal instructions”. Install help: docs/agent-guide.md -->
docs/agent-rule.mdc · 52 lines

How it starts

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

NeuroMesh context

This workspace has the NeuroMesh MCP server. Prefer it for reading and exploring code so the agent gets folded skeletons and targeted symbols instead of multi-thousand-line files.

Default loop (v0.9.0 — zero-embed fast engine)

Default: retrieval.engine: fast — graph index + query-side lexical expansion. No ONNX at index or MCP startup. Pass the task as written only — no keywords / expansion.

  1. get_context_packet with query / task_description / prompt / task as written. Optional: path_hints / entity_types.
  2. Check retrieval.resolution_tier — expect lexical_primary or graph-assisted seeds on NL prompts (not embedding_primary unless repo owner set engine: hybrid).
  3. If coverage.claim is partial, no_seed_resolved, or no_confident_match, follow packet_gaps / nextneuromesh_expand_gap or neuromesh_search_symbols before broad Grep.
  4. Expand only what you need: neuromesh_expand_fold with a fold_id (or neuromesh_get_file_skeleton / neuromesh_expand_gap).
  5. Use neuromesh_trace / neuromesh_get_dependencies / neuromesh_analyze_impact for callers and blast radius.
  6. After a successful edit: neuromesh_record_feedback with task_success and nodes touched.
  7. If the packet should have changed but files[] did not, call neuromesh_explain_packet.

Do not treat a utility fallback file as the answer when coverage says seeds missed or packet_gaps is non-empty.

Engine presets (opt-in via nm.config.json)

engine When Agent
fast (default) Zero-embed; instant index Prompt only
hybrid MiniLM sidecar + graph (Phase A Int8) Prompt only
deep Max quality + dedup + centroids Prompt only
CBM proxy graph_backend: auto / proxy_cbm Conservative proxy claim; native graph for trace/fold

Read the full file on GitHub · 52 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 Changed · +17 lines · +139 tokens per session 8b288272d155
  2. 6d ago First seen · 35 lines · 560 tokens per session scan C 922012c05fca

Subscribe to this mod's changes

agent-rule is a cursor rule published in the GitHub repository pinoox/neuromesh (83 stars, last pushed 5d ago), licensed MIT. It adds 699 tokens to every session, about $0.0035 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.