cursorrules

A set of Cursor rules for generating OpenAPI MCP code, recording important technical decisions, and deciding when an architecture decision record should be written. An architecture decision record is a short document explaining a significant design choice and its reasoning.

In plain words
What is it for?
Use it to create and structure decision records for new features, reorganized code, external integrations, changes to APIs or algorithms, performance trade-offs, and security-related work.
Why use it?
It provides a shared format for documenting architectural changes, integrations, refactoring, security fixes, and other decisions that developers may otherwise forget or record inconsistently.

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/cnoe-io/openapi-mcp-codegen/cursorrules
Clone the repo
git clone --depth 1 https://github.com/cnoe-io/openapi-mcp-codegen

Made for: Cursor.

Per session 1,315 This file is loaded in full into every session.
When invoked 1,315 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.01315 $0.01315
Opus 5 $0.00658 $0.00658
Sonnet 5 $0.00263 $0.00263
Haiku 4.5 $0.00131 $0.00131

Measured yesterday against content hash 6149e1a6e890, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules 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 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.

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.

.cursorrules · 183 lines

How it starts

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

Cursor Rules for OpenAPI MCP Codegen

ADR (Architecture Decision Record) Guidelines

When to Create ADRs

Create an ADR for:

  • ✅ New features that introduce architectural changes
  • ✅ Significant refactoring or code reorganization
  • ✅ Integration with external systems or tools
  • ✅ Changes to core algorithms or processing pipelines
  • ✅ Breaking changes to public APIs or CLI interfaces
  • ✅ Performance optimizations with trade-offs
  • ✅ Security-related changes or fixes
  • ✅ Documentation of important bug fixes that affect architecture

ADR Template Structure

When creating ADRs, use this exact structure:

# ADR-XXX: [Short Descriptive Title]

## Status
**[PROPOSED|ACCEPTED|DEPRECATED|SUPERSEDED]** [✅ *Implemented* | 🚧 *In Progress* | ❌ *Rejected*]

## Context
[Describe the forces at play, including technological, political, social, and project local. These forces are probably in tension, and should be called out as such.]

### Problems Identified:
1. **Problem 1**: Description
2. **Problem 2**: Description
3. **Problem 3**: Description

### User Request (if applicable):
> "Direct quote from user request or issue"

## Decision
[Describe the response to these forces. This is the statement of what we will do.]

### Implementation Strategy:
1. **Step 1**: Detailed approach
2. **Step 2**: Detailed approach
3. **Step 3**: Detailed approach

## Consequences
[Describe the resulting context, after applying the decision. All consequences should be listed here, not just the "positive" ones. A particular decision may have positive, negative, and neutral consequences.]

### Positive:
- ✅ **Benefit 1**: Description
- ✅ **Benefit 2**: Description

### Negative (if any):
- ❌ **Trade-off 1**: Description
- ⚠️ **Risk 1**: Description and mitigation

### Architecture Changes (if applicable):
#### Before:

[Current architecture diagram/description]


#### After:

[New architecture diagram/description]


### Implementation Status
**[PROPOSED|IN PROGRESS|COMPLETED]** [Status emoji]

[Brief summary of implementation status and any remaining work]

Read the full file on GitHub · 183 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 First seen · 183 lines · 1,315 tokens per session scan A 6149e1a6e890

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository cnoe-io/openapi-mcp-codegen (42 stars, last pushed 28d ago), licensed Apache-2.0. It adds 1,315 tokens to every session, about $0.0066 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.