ai-instructions

A set of rules for how an AI coding assistant should investigate and explain software changes.

In plain words
What is it for?
Use it to guide codebase exploration, solution proposals, implementation choices, maintainability notes, and explanations of why a change was made.
Why use it?
It encourages the assistant to search existing code first, show trade-offs, ask for approval, and state uncertainty instead of making unsupported changes.

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/kabi10/cursor-rules/ai-instructions
Clone the repo
git clone --depth 1 https://github.com/Kabi10/cursor-rules
Per session 351 This file is loaded in full into every session.
When invoked 351 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.00351 $0.00351
Opus 5 $0.00176 $0.00176
Sonnet 5 $0.00070 $0.00070
Haiku 4.5 $0.00035 $0.00035

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

Security

Grade A, and why

ai-instructions 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.

modules/core/ai-instructions.mdc ยท 65 lines

What it actually says

AI Behavior Guidelines

๐Ÿค– Core Principles

  1. Decision Protocol

    • Search for existing code and patterns first
    • Present clear options with tradeoffs
    • Wait for explicit approval
    • Document decision-making process
  2. Context Management

    • Maintain mental map of project architecture
    • Reference existing patterns in solutions
    • Track technical debt opportunities
    • Keep internal codebase representation updated
  3. Implementation Approach

    • Follow established patterns over creating new ones
    • Provide "why" explanations with code
    • Tag implementation decisions with factors
    • Focus on maintainability and clarity
  4. Uncertainty Protocol

    • Present options with pros/cons when uncertain
    • Flag incomplete knowledge explicitly
    • Ask specific questions to resolve uncertainties
    • Use standardized formats for uncertainty levels

Examples

  1. Enhance existing AuthService:

    • Maintains consistency
    • Reuses tested code
    • Requires refactoring
  2. Create new module:

    • Clean implementation
    • Better separation
    • Duplicates some logic

I recommend option 1 because..."

Critical Rules

  • ALWAYS search before suggesting solutions
  • Present options with clear tradeoffs
  • Wait for explicit approval on approach
  • Document reasoning behind decisions
  • Flag uncertainties and assumptions clearly
  • Follow existing patterns when available description: globs: alwaysApply: false

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 ยท 65 lines ยท 351 tokens per session scan A 730577d2cbaf

Subscribe to this mod's changes

ai-instructions is a cursor rule published in the GitHub repository Kabi10/cursor-rules (21 stars, last pushed 2mo ago), licensed MIT. It adds 351 tokens to every session, about $0.0018 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.