code-discipline

code-discipline is a skill for Claude Code, Codex from eliranpv11/code-discipline-skills. It costs 116 tokens per session (1,926 once invoked), scanned A, original, MIT.

A set of coding practices for software that needs to stay correct and maintainable over time.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring production code.
Why use it?
It helps prevent fragile changes, hidden assumptions, and unnecessary complexity by requiring risks, alternatives, affected parts, and success checks to be considered before coding.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the code-discipline plugin — 1 skill shipped together

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 skills/eliranpv11/code-discipline-skills/code-discipline
Any agent
npx skills add eliranpv11/code-discipline-skills --skill code-discipline
Clone the repo
git clone --depth 1 https://github.com/eliranpv11/code-discipline-skills

Made for: Claude Code, Codex.

Or install code-discipline, the plugin that ships this one along with the rest of its 1 skill.

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 code-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/eliranpv11/code-discipline-skills/code-discipline.svg)](https://agentmods.dev/skills/eliranpv11/code-discipline-skills/code-discipline)
Your own site
<a href="https://agentmods.dev/skills/eliranpv11/code-discipline-skills/code-discipline"><img src="https://agentmods.dev/badge/skills/eliranpv11/code-discipline-skills/code-discipline.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,926 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00116 $0.01926
Opus 5 $0.00058 $0.00963
Sonnet 5 $0.00023 $0.00385
Haiku 4.5 $0.00012 $0.00193

Measured 5d ago against content hash f0abddac40d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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 5d 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.

skills/code-discipline/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 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:

  1. Stability
  2. Reliability
  3. Readability
  4. Maintainability
  5. Scalability
  6. Performance
  7. 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:

  1. Working assumptions — what are you assuming to be true?
  2. Constraints and risks — what could go wrong?
  3. Multiple valid solutions? — if yes, stop and present options; do not choose independently
  4. 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.

Read the full file on GitHub · 198 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 198 lines · 116 tokens per session scan A f0abddac40d9

Subscribe to this mod's changes

code-discipline is a skill published in the GitHub repository eliranpv11/code-discipline-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 116 tokens to every session and 1,926 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

procoder

Work like a senior developer in a repository governed by procoder: run the commit gate before calling anything done, format and lint through the binary, and drive the spec, plan, todo, backlog, and sprint chain in .procoder/. Use this skill when the repository contains a .procoder/ directory or an AGENTS.md naming…

azrtydxb/procoder · 101 tokens

lov-maintain-partners

Maintain the Skill Publisher website's partners section AND align partner logo rows on event posters / hero strips: reuse lov-find-logo for brand logo discovery, normalize collected logos to a 240px-tall content canvas (retina-ready), rasterize SVGs via rsvg-convert before normalizing (so SVG viewBox padding gets…

lovstudio/skills · 294 tokens

lov-article-creator

统一创建、改写、品牌化或忠实转载微信公众号文章包:正文写作调用唯一文风与作者性能力,离线完成结构、品牌、封面、4:3 首图、来源与质量验收。Use when asked to write, brand, audit, or faithfully repost a WeChat article package.

lovstudio/skills · 75 tokens

dsh-plugin-publisher

Publish a validated DSH plugin package (@deepseek-ai/dsh- or @lovstudio/dsh-) to npm, git, or tarball channels and verify it loads in the DeepSeek Harness. Use when the user asks to publish, release, or ship a plugin. 触发:发布插件 / 上架插件 / release dsh 插件。.

lovstudio/skills · 82 tokens

lov-publish-event-onto-hdx

诊断并修改活动行已发布活动:核查分类页可见性与排名、替换详情正文配图,并守住 后台保存会清空分类这一平台陷阱。Trigger: 活动行分类找不到、活动行分类没了、 活动行排名、活动行曝光、活动行换海报、hdx category not showing, hdx category reset。.

lovstudio/skills · 92 tokens

lov-skill-pricing

为一个或多个 Agent Skill 生成可解释的 Skill Pricing Card:结合创作者时间与维护成本、用户价值、稀缺性、购买信心和生态潜力,输出建议价、价格区间、渠道策略及证据缺口;触发语包括“给这个 Skill 定价”和 “price this Skill”。.

lovstudio/skills · 78 tokens