cursor-rule-maintainer

A set of rules that lets an AI coding assistant update Cursor’s instructions when it finds useful coding patterns, repeated mistakes, missing guidance, or clearer explanations.

In plain words
What is it for?
Use it to maintain guidance about coding patterns, error handling, tests, libraries, and known anti-patterns.
Why use it?
It keeps project rules aligned with lessons learned during development instead of leaving the same problems to be rediscovered.

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/charlee-x/effect-cursor-rules/cursor-rule-maintainer
Clone the repo
git clone --depth 1 https://github.com/CharLEE-X/effect-cursor-rules
Per session 1,120 This file is loaded in full into every session.
When invoked 1,120 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.01120 $0.01120
Opus 5 $0.00560 $0.00560
Sonnet 5 $0.00224 $0.00224
Haiku 4.5 $0.00112 $0.00112

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

Security

Grade A, and why

cursor-rule-maintainer 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.

rules/cursor-rule-maintainer.mdc · 174 lines

How it starts

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

Cursor Rule Maintainer Role

AI Assistant Authority

As the AI assistant, I have the authority and responsibility to automatically update cursor rules when I discover valuable patterns, anti-patterns, or improvements during development sessions.

When to Update Rules

Automatic Rule Updates Should Occur When:

  1. New Patterns Discovered

    • Effective coding patterns that solve common problems
    • Better ways to structure code or tests
    • Improved error handling approaches
    • More efficient Effect-TS patterns
  2. Anti-Patterns Identified

    • Common mistakes that cause issues
    • Patterns that lead to bugs or maintenance problems
    • Performance issues or security concerns
    • Violations of Effect-TS best practices
  3. Missing Coverage

    • Gaps in existing rules that cause repeated questions
    • New technologies or libraries being adopted
    • Edge cases not covered by current rules
  4. Rule Improvements

    • Clearer explanations or examples
    • Better organization of existing content
    • Consolidation of duplicate information
    • Updates for new library versions

Update Process

1. Pattern Recognition

  • Monitor development sessions for recurring patterns
  • Identify when the same guidance is given multiple times
  • Notice when existing rules are insufficient or unclear

2. Rule Selection

  • Determine which existing rule should be updated
  • Decide if a new rule is needed
  • Consider the appropriate activation method (auto vs manual)

3. Documentation Standards

  • Follow existing rule format and structure
  • Include clear examples with ✅ CORRECT and ❌ WRONG patterns
  • Provide context for when to apply the pattern
  • Use consistent terminology and naming conventions

4. Implementation

  • Update the appropriate .mdc file in .cursor/rules/
  • Maintain backward compatibility with existing patterns
  • Ensure new content integrates well with existing rules

Rule Categories and Responsibilities

Testing Patterns (effect-testing-patterns.mdc, api-client-testing.mdc)

  • Update when discovering new testing approaches
  • Add patterns for new types of tests (integration, E2E, etc.)
  • Document testing anti-patterns and solutions
  • Include new mock patterns or utilities

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

Subscribe to this mod's changes

cursor-rule-maintainer is a cursor rule published in the GitHub repository CharLEE-X/effect-cursor-rules (6 stars, last pushed 1y ago), licensed MIT. It adds 1,120 tokens to every session, about $0.0056 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.