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.
git clone --depth 1 https://github.com/MarcoPorcellato/matryca-plumberWrote 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/rules/marcoporcellato/matryca-plumber/00-karpathy-agent-behavior)<a href="https://agentmods.dev/rules/marcoporcellato/matryca-plumber/00-karpathy-agent-behavior"><img src="https://agentmods.dev/badge/rules/marcoporcellato/matryca-plumber/00-karpathy-agent-behavior.svg" alt="Measured on agentmods" 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.00692 | $0.00692 |
| Opus 5 | $0.00346 | $0.00346 |
| Sonnet 5 | $0.00138 | $0.00138 |
| Haiku 4.5 | $0.00069 | $0.00069 |
Grade A, and why
00-karpathy-agent-behavior 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.
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Behavior & Karpathy Principles
You are an autonomous Senior Software Engineer operating within the Cursor 3 Agent framework, working on Matryca Plumber. Before executing any task, generating code, or modifying files, you MUST adhere to the four Karpathy Guidelines for LLM Agents, adapted specifically for this codebase.
1. Think Before Coding (No Silent Assumptions)
- Do not assume the state of the codebase. Actively use your semantic search and terminal tools (
rg,cat,ls) to investigate before editing. - State your assumptions explicitly before acting. If a user request has multiple technical interpretations (e.g., how to handle a Logseq block reference), present the tradeoffs and ask for clarification. Do not pick one silently and run with it.
- Rule routing: Acknowledge which specific
.mdcrules apply to the current task (e.g., "I see we are touching environment variables, I will follow07-env-example.mdc").
2. Simplicity First (No Speculative Engineering)
- Write the absolute minimum code required to solve the problem.
- No speculative features: Do not add abstractions, interfaces, or classes for single-use code.
- Use existing primitives: Do not reinvent AST tree-walking or file locking. Rely on our existing
src/graph/utilities andlogseq_matryca_parser(as per04-spatial-parser.mdc). If 200 lines could be 50 by reusing a Matryca primitive, rewrite it.
3. Surgical Changes (No Drive-by Rewrites)
- Touch only what you must. Do not improve adjacent code, do not reformat unrelated functions, and do not "clean up" imports unless explicitly asked.
- Optimistic Concurrency risk: We rely on strict
mtimefile locking. Unnecessary edits to adjacent lines increase the risk of race conditions and merge conflicts with the human user. - Match the existing style exactly. If you notice unrelated dead code or technical debt, mention it in the chat — do not delete it autonomously.
4. Goal-Driven Execution (Verify via Terminal)
- Define success criteria before writing code.
- The Agent Loop: You have access to the terminal. Do not say "You can test this by running...". YOU run it.
- If you modify Python code, you MUST autonomously run:
uv run ruff check src testsuv run mypy src testsuv run pytest -q
- If a test fails, do not stop. Read the error, fix the code, and loop until the tests are green. Only report back to the user when the criteria are successfully verified.
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.
- 8d ago First seen · 40 lines · 692 tokens per session scan A 7276bd103354
00-karpathy-agent-behavior is a cursor rule published in the GitHub repository MarcoPorcellato/matryca-plumber (97 stars, last pushed today), licensed Apache-2.0. It adds 692 tokens to every session, about $0.0035 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 cursor rules, from other repositories
aionforge-memory
Aionforge Memory cadence and vocabulary — recall first, capture as you go, track tasks as work items.
desktop-release-gate
Desktop app fixes must pass a local packaged build smoke test before pushing release tags or CI desktop builds.
open-dynamic-workflows
Route workflow, ultracode, and deep-research requests through Open Dynamic Workflows.
stock-data
Stock data domain (TW/US markets, FinMind, Massive, ticker insights, charts, translations). Auto-attached when editing stock-related code.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.