cursor-rules

cursor-rules is a cursor rule for Cursor from chickensintrees/ai-coding-rules. It costs 823 tokens per session, scanned A, original, MIT.

A set of rules for safer AI-assisted coding work, including saving progress, reading files before editing, and checking that changes were saved.

In plain words
What is it for?
Use it to guide coding agents during edits, refactoring, and other project changes. It covers checkpoints, approvals before deletion, file inspection, verification, and following the project specification.
Why use it?
It reduces the risk of losing work, deleting code by mistake, duplicating files, or claiming a change worked without verifying it.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to guide coding agents during edits, refactoring, and other project changes. It covers checkpoints, approvals before deletion, file inspection, verification, and following the project specification.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/chickensintrees/ai-coding-rules/cursor-rules
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.

Clone the repo
git clone --depth 1 https://github.com/chickensintrees/ai-coding-rules

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 cursor-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/chickensintrees/ai-coding-rules/cursor-rules/github.svg)](https://agentmods.dev/rules/chickensintrees/ai-coding-rules/cursor-rules)
Your own site
<a href="https://agentmods.dev/rules/chickensintrees/ai-coding-rules/cursor-rules"><img src="https://agentmods.dev/badge/rules/chickensintrees/ai-coding-rules/cursor-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursor-rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/chickensintrees/ai-coding-rules/cursor-rules"><img src="https://agentmods.dev/badge/rules/chickensintrees/ai-coding-rules/cursor-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 823 This file is loaded in full into every session.
When invoked 823 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00823 $0.00823
Opus 5.5 $0.00329 $0.00329
Sonnet 5.5 $0.00165 $0.00165
Haiku 4.5 $0.00082 $0.00082

Measured 2mo ago against content hash 4edada53b53b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursor-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 2mo 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.

quickstart/cursor-rules.mdc · 84 lines

How it starts

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

AI Coding Rules

TIER 1 — SURVIVAL

1. Checkpoint

Before making significant changes, commit the current working state with git. After completing any unit of work you'd be upset to lose, commit again. If git is not initialized in this project, initialize it before writing any code.

2. Don't Delete Without Asking

Never remove code, files, or comments without explicit user confirmation. When refactoring, preserve all existing functionality and comments. If you believe something should be removed, explain what and why, then wait for approval. Never strip comments during refactoring.

3. Read Before Write

Before editing any file, read its current contents. Every time — even if you think you know what's in it. Before creating a new file, search for existing files with similar names or purposes to avoid duplicating or overwriting existing work.

TIER 2 — INTEGRITY

4. Save Means Verify

After editing a file, verify the change by reading the file back or searching for a distinctive string from your edit. Do not say "done" or "saved" until you have confirmed the change exists on disk. If verification fails, fix the edit and re-verify.

5. Spec First

The spec is the single source of truth. If a spec file exists (SPEC.md, docs/spec.md, or equivalent), read it before doing any work. When the user requests a change, update the spec first, then update the code to match. When the user gives a correction, the spec changes first -- the code follows. If no spec exists and the project is non-trivial, create one before writing code. Never build from conversation alone when a spec file exists. The spec is the plan the code implements. When spec and code disagree, the spec wins.

6. Search Before Creating

Before creating a new file, function, or component, search the codebase for existing implementations. If something similar exists, decide whether to extend it, fork it (copy and modify independently), or replace it. If changing shared code could break other things, fork it. If a new implementation is genuinely needed, explain why.

Read the full file on GitHub · 84 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. 2mo ago First seen · 84 lines · 823 tokens per session scan A 4edada53b53b

Subscribe to this mod's changes

cursor-rules is a cursor rule published in the GitHub repository chickensintrees/ai-coding-rules (2 stars, last pushed 3mo ago), licensed MIT. It adds 823 tokens to every session, about $0.0033 per session on Opus 5.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.