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.
npx agentmods add rules/emmahyde/thinking-patterns/mcp_agent_rulesgit clone --depth 1 https://github.com/emmahyde/thinking-patternsWhat 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 | $0.00873 | $0.00873 |
| Opus 5 | $0.00436 | $0.00436 |
| Sonnet 5 | $0.00175 | $0.00175 |
| Haiku 4.5 | $0.00087 | $0.00087 |
Grade A, and why
MCP_AGENT_RULES 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 2d 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.
What it actually says
3.0 Standard Operating Procedure (SOP)
For any user request, follow this procedure:
- Deconstruct the Request: Use
sequential_thinkingto break down the user's prompt into its core components and objectives. State your interpretation of the goal. - Formulate a Plan: Use
problem_decompositionto create a step-by-step plan. Each step should map to a specific thinking-pattern tool. Present this high-level plan to the user. - MANDATORY PRE-FLIGHT CHECK: Before executing a complex tool call (any tool with nested objects), explicitly perform the
⚡ PRE-FLIGHT CHECKLISTbelow. State your confidence in the call's validity. This is a cognitive forcing function to prevent assumption-based errors. - Execute the Plan: Execute the steps by calling the appropriate tools as defined in your plan.
- Synthesize Results: Combine the outputs from various tools into a coherent narrative or solution. Do not simply present raw tool outputs.
- Self-Critique: Before presenting the final answer, use
critical_thinkingon your own synthesized result. Identify potential flaws, invalid assumptions, or edge cases in your reasoning. Refine your answer based on this critique.
4.0 Tool-Specific Directives
// ... existing code ...
- element.type: [node, edge, container, annotation, shape, text, image, connector]
OBJECTS:
- elements: [{id, type, properties{}}] (label, source, target, contains[], connectedTo[] optional)
## ⚡ PRE-FLIGHT CHECKLIST
**MANDATORY FOR ALL COMPLEX TOOL CALLS**
1. ✅ **All Required Parameters?** Check every top-level required field.
2. ✅ **Correct Enums?** Verify case-sensitive enum values against the reference.
3. ✅ **Full Object Structure?** Ensure nested objects are fully formed and not just strings.
4. ✅ **Correct Array Types?** Check that arrays contain the correct item type (e.g., `string[]` vs. `object[]`).
5. ✅ **Accurate Primitives?** Numbers are numbers (`123`), not strings (`"123"`). Booleans are booleans (`true`), not strings (`"true"`).
6. ✅ **No `undefined`/`null`?** Confirm no required fields are null or undefined.
7. ⚠️ **DEEP NESTING VALIDATION?** For objects with multiple levels of nesting (e.g., `sequential_thinking.previousSteps`), manually trace the structure and required fields for at least two levels deep. **DO NOT ASSUME NESTED, NON-CRITICAL-PATH FIELDS ARE UNVALIDATED.**
## 5.0 Post-Mortem Error Protocol
If a tool call fails, execution HALTS. The primary objective becomes understanding the failure to prevent recurrence.
1. **LOG THE FAILURE**: State the exact tool call and the full error message received.
2. **ROOT CAUSE ANALYSIS (RCA)**: Perform a self-assessment.
* **IDENTIFY MISMATCH**: Compare the failed call against the `⚡ PRE-FLIGHT CHECKLIST`. Where did the process break down?
* **STATE THE FLAW**: Explicitly state the incorrect assumption or oversight (e.g., "I assumed `previousSteps` was not validated" or "I misspelled the enum `problem-definition`").
* **INVOKE METACOGNITION**: Use `metacognitive_monitoring` to formally analyze the reasoning error.
3. **CORRECT & RETRY**: Formulate the corrected tool call, explaining what was fixed.
4. **ESCALATE & REFINE**: If the error persists after **one** corrected attempt, do not try again.
* Inform the user that the tool may be unavailable.
* Propose an update to these rules (`MCP_AGENT_RULES.mdc`) to prevent this class of error in the future.
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.
- 2d ago First seen · 49 lines · 873 tokens per session scan A 69bfc9ec6d23
MCP_AGENT_RULES is a cursor rule published in the GitHub repository emmahyde/thinking-patterns (19 stars, last pushed 1y ago), licensed MIT. It adds 873 tokens to every session, about $0.0044 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
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.