core

core is a cursor rule for Cursor from kleosr/kleosrules. It costs 866 tokens per session, scanned A, original, MIT.

A set of engineering rules for changing code, checking behavior, and reporting evidence. It covers code structure, naming, errors, scope, and verification.

In plain words
What is it for?
Use it as guidance when implementing, reviewing, or verifying software changes.
Why use it?
It reduces claims based on stale or missing checks and discourages unnecessary abstractions and unrelated changes.

Cursor rule for Cursor

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

Good fit Use it as guidance when implementing, reviewing, or verifying software changes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kleosr/kleosrules/core
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/kleosr/kleosrules

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 core

README.md
[![agentmods](https://agentmods.dev/badge/rules/kleosr/kleosrules/core/github.svg)](https://agentmods.dev/rules/kleosr/kleosrules/core)
Your own site
<a href="https://agentmods.dev/rules/kleosr/kleosrules/core"><img src="https://agentmods.dev/badge/rules/kleosr/kleosrules/core/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 core

Your own site · 80×15
<a href="https://agentmods.dev/rules/kleosr/kleosrules/core"><img src="https://agentmods.dev/badge/rules/kleosr/kleosrules/core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 866 This file is loaded in full into every session.
When invoked 866 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.00866 $0.00866
Opus 5 $0.00433 $0.00433
Sonnet 5 $0.00173 $0.00173
Haiku 4.5 $0.00087 $0.00087

Measured today against content hash 3a744b7c7cb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-14, from the pricing page.

Security

Grade A, and why

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

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.

shared/rules/core.mdc · 44 lines

How it starts

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

Core

Understand the files you will change. Change them. Verify the behavior this change can break. Correct failures. Do not claim done on stale evidence. Cite command + exit (or a driven UI path). A missing or nonzero observation is not success.

Change

State the intended behavior and non-goals when the task leaves them open. Trace callers and contracts before changing a boundary. Preserve unrelated work. If the same check fails twice, stop repeating it: record the evidence, change the hypothesis, or name the missing input. Remove temporary instrumentation when the investigation ends.

Craft

Readable before clever. Explicit before magical. Simple before abstract. Meaningful names. Predictable control flow. Comments explain decisions, not the obvious. Handle errors on purpose — no empty catch, no swallowed exit. Clarity, correctness, and changeability outrank line count. Do not write decorative abstractions, extra wrappers, or “AI-looking” patterns to satisfy a style. Domain-hard complexity is allowed when justified.

Architecture

Own one job per module. Stable public interfaces; change internals before widening the contract. Minimal coupling and duplication. Match 1–2 siblings before Write. A local fix must not silently change ownership, layering, or call direction elsewhere. No speculative infrastructure, dead compatibility layers, or drive-by files. Named exports by default (framework-required default exports win). Remove dead code this task introduced or obsoleted. Cleanup is limited to the task.

Ladder

Lowest sufficient rung when equally suitable. Choose for correctness and fit, not golf.

  1. No implementation change (config, delete, existing API)
  2. Existing repository code (Grep)
  3. Stdlib / platform APIs
  4. Installed dependencies (new dependency needs a one-line why)
  5. Small clear local implementation

Size

Soft ~80 lines is a cohesion preference, not golf. Split when a module holds two jobs — not to hit a count. New hand-written files: hard 300; never 500. Legacy >700: localized fixes; extracted modules ≤300. Generated, vendor, lockfiles, migrations, and declarative config are excluded.

Read the full file on GitHub · 44 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. today Changed · +3 lines · +23 tokens per session 3a744b7c7cb6
  2. yesterday First seen · 41 lines · 843 tokens per session scan A d9bb291a7830

Subscribe to this mod's changes

core is a cursor rule published in the GitHub repository kleosr/kleosrules (0 stars, last pushed today), licensed MIT. It adds 866 tokens to every session, about $0.0043 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-09-13.