rule-generating-agent

rule-generating-agent is a cursor rule for Cursor from mikeysrecipes/mcp-openvision. It costs 27 tokens per session (1,012 once invoked), scanned A, a copy of rule-generating-agent, MIT.

A rule-writing guide for Cursor, a coding editor with agent instructions. It describes how to organize rules files and decide when they should apply.

In plain words
What is it for?
For creating or changing Cursor rules, including rules for testing, tools, global behavior, and personal project preferences.
Why use it?
It helps keep instructions consistent when someone asks the agent to add a rule or remember a standing preference.

Cursor rule for Cursor

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/mikeysrecipes/mcp-openvision/rule-generating-agent
Clone the repo
git clone --depth 1 https://github.com/mikeysrecipes/mcp-openvision

Made for: 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 rule-generating-agent

README.md
[![agentmods](https://agentmods.dev/badge/rules/mikeysrecipes/mcp-openvision/rule-generating-agent.svg)](https://agentmods.dev/rules/mikeysrecipes/mcp-openvision/rule-generating-agent)
Your own site
<a href="https://agentmods.dev/rules/mikeysrecipes/mcp-openvision/rule-generating-agent"><img src="https://agentmods.dev/badge/rules/mikeysrecipes/mcp-openvision/rule-generating-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,012 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00027 $0.01012
Opus 5 $0.00014 $0.00506
Sonnet 5 $0.00005 $0.00202
Haiku 4.5 $0.00003 $0.00101

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

Security

Grade A, and why

rule-generating-agent 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 4d 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.

Origin

This is a copy

100% identical to rule-generating-agent — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/core-rules/rule-generating-agent.mdc · 86 lines

How it starts

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

Cursor Rules Format

Template Structure for Rules Files

---
description: `Explicit concise description to ensure the agent knows when to apply the rule` OR blank
globs: .cursor/rules/**/*.mdc OR blank
alwaysApply: {true or false}
---

# Rule Title

## Context

- When to apply this rule
- Prerequisites or conditions
- Why the rule was added or is needed

## Critical Rules

- Concise, bulleted list of actionable rules the agent MUST follow

## Examples

<example>
{valid rule application}
</example>

<example type="invalid">
{invalid rule application}
<example>

Organizational Folders (Create if non existent)

All rules files will be under an organizational folder:

  • .cursor/rules/core-rules - rules related to cursor agent behavior or rule generation specifically
  • .cursor/rules/my-rules - gitignore in a shared repo, rules specifically for ME only
  • .cursor/rules/global-rules - these will be rules that are ALWAYS applied to every chat and cmd/ctrl-k context
  • .cursor/rules/testing-rules - rules about testing
  • .cursor/rules/tool-rules - rules specific to different tools, such as git, linux commands, direction of usage of MCP tools
  • .cursor/rules/ts-rules - typescript language specific rules
  • .cursor/rules/py-rules - python specific rules
  • .cursor/rules/ui-rules - rules about html, css, react
  • create new folders under .cursor/rules/ as needed following similar grouping conventions,
    • for example .cursor/rules/cs-rules if we started using c# in a project

Glob Pattern Examples

Common glob patterns for different rule types:

  • Core standards: .cursor/rules/*.mdc
  • Language rules: *.cs, *.cpp
  • Testing standards: *.test.ts, *.test.js
  • React components: src/components/**/*.tsx
  • Documentation: docs/**/*.md, *.md
  • Configuration files: *.config.js
  • Build artifacts: dist/**/*
  • Multiple extensions: *.js, *.ts, *.tsx
  • Multiple patterns: dist//., docs//.md, test.

Critical Rules

  • Rule files will be located and named ALWAYS as: .cursor/rules/{organizational-folder}/rule-name-{auto|agent|manual|always}.mdc
  • FrontMatter Rules Types:
    • The front matter section must always start the file and include all 3 fields, even if the field value will be blank - the types are:
      • Manual Rule: IF a Manual rule is requested - description and globs MUST be blank and alwaysApply: false and filename ends with -manual.mdc.
      • Auto Rule: IF a rule is requested that should apply always to certain glob patterns (example all typescript files or all markdown files) - description must be blank, and alwaysApply: false and filename ends with -auto.mdc.
      • Always Rule: Global Rule applies to every chat and cmd/ctrl-k - description and globs blank, and alwaysApply: true and filename ends with -always.mdc.
      • Agent Select Rule: The rule does not need to be loaded into every chat thread, it serves a specific purpose. The agent can see the descriptions, and choose to load the full rule in to context on its own - description is critical, globs blank, and alwaysApply:false and filename ends with -agent.mdc
  • For the Rule Context and Bullets - do not repeat yourself and do not be overly explanatory
  • When a rule will only be used sometimes (useAlways: false) it is CRITICAL that the description describes when the AI will load the full rule into its context
  • Use Concise Markdown Tailored to Agent Context Window usage
  • Always indent content within XML Example section with 2 spaces
  • Emojis and Mermaid diagrams are allowed and encouraged if it is not redundant and better explains the rule for the AI comprehension.
  • TRY to keep the total rule line count under 50 lines, better under 25 lines
  • Always include a valid and invalid example
  • NEVER use quotes around glob patterns, NEVER group glob extensions with {}
  • If the request for a rule or a future behavior change includes context of a mistake is made, this would be great to use in the example for the rule
  • After rule is created or updated, Respond with the following:
    • AutoRuleGen Success: path/rule-name.mdc
    • Rule Type: {Rule Type}
    • Short summary of what the rule will do

Read the full file on GitHub · 86 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. 4d ago First seen · 86 lines · 27 tokens per session scan A 47b97616f030

Subscribe to this mod's changes

rule-generating-agent is a cursor rule published in the GitHub repository mikeysrecipes/mcp-openvision (1 stars, last pushed 1y ago), licensed MIT. It adds 27 tokens to every session and 1,012 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to rule-generating-agent, differing in 0 lines, and is treated as a copy.