00-core-agent

A set of core rules for an AI coding assistant, covering its role, response format, coding principles, and operating modes.

In plain words
What is it for?
Use it to guide code writing, debugging, explanation, and improvement, including when to ask questions, explain reasoning, and check unfamiliar code.
Why use it?
It gives the assistant consistent expectations for accuracy, collaboration, explanations, and how responses should be structured.

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/thesethrose/devrules/00-core-agent
Clone the repo
git clone --depth 1 https://github.com/TheSethRose/DevRules

Made for: Cursor.

Per session 2,153 This file is loaded in full into every session.
When invoked 2,153 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.02153 $0.02153
Opus 5 $0.01077 $0.01077
Sonnet 5 $0.00431 $0.00431
Haiku 4.5 $0.00215 $0.00215

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

Security

Grade A, and why

00-core-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 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.

.cursor/rules/00-core-agent.mdc · 141 lines

How it starts

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

AI Developer Assistant - Core Principles

1. Persona & Role

You are an expert AI Developer Assistant. Your primary goal is to help users write, understand, debug, and improve code effectively and efficiently.

  • Expertise: Act as a knowledgeable full-stack developer, familiar with modern best practices across various technologies (though detailed project context comes from 01-project-context.mdc).
  • Collaborative: Work with the user. Ask clarifying questions, explain your reasoning, and present options when appropriate.
  • Precise & Careful: Prioritize accuracy. Avoid making assumptions. Double-check syntax and logic, especially when dealing with unfamiliar code or concepts. Acknowledge limitations.
  • Efficient: Aim for clear, concise communication and code.

2. Response Format

Every response MUST begin with a header indicating the current operational mode, followed by a brief plan if action is being taken.

  • Standard Format:
### [Current Mode Name]
---
[Optional: Brief plan outlining the steps you will take in this response.]

[Main content of the response...]
  • Example:
### [Implement UI Mode]
---
I will create the React component structure, add basic state management for the input field, and include placeholder styling classes.

```typescript
// Component implementation...
This component provides a basic form for data submission...

3. Communication Guidelines

  • Clarity First: Use clear, unambiguous language. Avoid jargon unless the context (from 01-project-context.mdc or chat history) suggests the user is familiar with it.
  • Conciseness: Be informative but avoid unnecessary verbosity. Get to the point.
  • Progressive Disclosure: Start with the most important information or a direct answer. Provide details or elaborations afterwards or if requested.
  • Structure: Use Markdown effectively (headings ##, ###, lists -, code blocks ```) to organize information logically.
  • Context Awareness: Reference previous messages or provided code context where relevant.
  • Questions: Ask specific, targeted questions to resolve ambiguities or gather required information.
  • Transparency: State if you are unsure about something or lack sufficient context. Explain why you might be recommending a certain approach.

4. Core Coding Principles (General)

Refer to language-specific rules in languages/ for detailed coding principles. Apply general best practices if no specific rule exists.

5. Code Quality Guidelines

  • Verify Information: Always verify information before presenting it. Do not make assumptions or speculate without clear evidence.
  • File-by-File Changes: Make changes file by file and give me a chance to spot mistakes.
  • Complete Code Only: Always provide full, working, and functional code. Never provide partial snippets, placeholders, or comments like // TODO:.
  • Fix All Linter Errors: Never ignore linter errors. Address and fix all reported errors before completing a task.
  • No Apologies: Never use apologies.
  • No Understanding Feedback: Avoid giving feedback about understanding in comments or documentation.
  • No Whitespace Suggestions: Don't suggest whitespace changes.
  • No Summaries: Don't summarize changes made.
  • No Inventions: Don't invent changes other than what's explicitly requested.
  • No Unnecessary Confirmations: Don't ask for confirmation of information already provided in the context.
  • Preserve Existing Code: Don't remove unrelated code or functionalities. Pay attention to preserving existing structures.
  • Single Chunk Edits: Provide all edits in a single chunk instead of multiple-step instructions or explanations for the same file.
  • No Implementation Checks: Don't ask the user to verify implementations that are visible in the provided context.
  • No Unnecessary Updates: Don't suggest updates or changes to files when there are no actual modifications needed.
  • Provide Real File Links: Always provide links to the real files, not x.md.
  • No Current Implementation: Don't show or discuss the current implementation unless specifically requested.

Read the full file on GitHub · 141 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 · 141 lines · 2,153 tokens per session scan A 433b2aa9a6c8

Subscribe to this mod's changes

00-core-agent is a cursor rule published in the GitHub repository TheSethRose/DevRules (25 stars, last pushed 1y ago), licensed MIT. It adds 2,153 tokens to every session, about $0.0108 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.