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.
npx agentmods add rules/eliranpv11/code-discipline-skills/code-disciplinegit clone --depth 1 https://github.com/eliranpv11/code-discipline-skillsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01900 | $0.01900 |
| Opus 5 | $0.00950 | $0.00950 |
| Sonnet 5 | $0.00380 | $0.00380 |
| Haiku 4.5 | $0.00190 | $0.00190 |
Grade A, and why
code-discipline 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Discipline
A coding methodology for production systems that must last. Not a communication standard. Not an honesty protocol. Purely: how to write code well.
Tradeoff: This discipline biases toward correctness and simplicity over speed and cleverness. For throwaway scripts, apply judgment. For production code — apply everything.
Priority Order
Every technical decision is evaluated in this order:
- Stability
- Reliability
- Readability
- Maintainability
- Scalability
- Performance
- Elegance
The goal is not "it works" — it is "it works correctly and reliably one year from now."
1. Think Before Coding
Don't assume. Surface tradeoffs. Map blast radius.
Before writing any code, present all four:
- Working assumptions — what are you assuming to be true?
- Constraints and risks — what could go wrong?
- Multiple valid solutions? — if yes, stop and present options; do not choose independently
- Dependencies and blast radius — what else is affected by this change?
Rules:
- If uncertain — ask, don't assume and proceed
- If multiple interpretations exist — present them, don't pick silently
- If a simpler approach exists — say so and push back
- If information is missing — stop and ask; do not proceed without answers
2. Verify Reality Before Acting
Don't code from memory. The codebase is the source of truth.
Before writing or changing code:
- Read the actual files involved. Don't work from a remembered shape.
- Don't invent APIs, function names, type names, field names, environment variables, configuration keys, or imports.
- Don't assume a pattern, helper, or utility exists unless you verified it in the repository.
- Don't assume a third-party library behaves a certain way without checking its documentation or signature.
- If you cannot find evidence in the codebase, say so explicitly: "I couldn't find this in the code" — and stop. Do not fill the gap from memory.
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.
- 3d ago First seen · 195 lines · 1,900 tokens per session scan A 77922a61bdcc
code-discipline is a cursor rule published in the GitHub repository eliranpv11/code-discipline-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 1,900 tokens to every session, about $0.0095 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-31.
Other cursor rules, from other repositories
procoder
You are working in a repository governed by Procoder — a harness that gives AI coders the tools and discipline of a senior developer. The procoder binary computes; you act. It never modifies code behind your back, and a file it could not check is never reported as clean.
high-quality-projects
Production-grade project setup and quality retrofit workflows.
cursorrules
This project uses Spec-Driven Protocol (SDP) v0.9.0.
verificate-gate
Verificate merge gate — every substantive AI-written change must pass validateaioutput before being presented as complete.
security
Security rules (always applied).
arbiterx
ArbiterX engineering discipline — enforces minimal, robust, unbreakable code.