ai-coding-discipline SKILL.md skillA
ai-coding-discipline from satbirbhbc-ux/ai-coding-principles is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add satbirbhbc-ux/ai-coding-principles/ai-coding-discipline@git:20260322.0720769Pins git:20260322.0720769 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- satbirbhbc-ux/ai-coding-principles
- Path
ai-coding-discipline/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260322.0720769, committed Mar 22, 2026
- Size
- 7,445 bytes
- Repository stars
- 4
- License
- MIT
Mandatory coding discipline rules that prevent common AI coding anti-patterns. MUST be loaded for ALL code writing, editing, reviewing, bug fixing, and testing tasks. Trigger on: writing code, editing code, fixing bugs, writing tests, implementing features, refactoring, code review, creating functions, adding error handling, debugging. This skill enforces fail-fast principles, proper error propagation, meaningful tests, and disciplined debugging workflows. Always active when Claude writes or…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# AI Coding Discipline
> These rules override default AI coding tendencies. Follow them in ALL code you write or modify.
---
## Rule 1: No Silent Fallbacks
**Never use fallback values to mask data that should not be missing.**
```typescript
// FORBIDDEN — hides upstream bugs
const price = product?.price ?? 0;
const userName = user?.name || "Unknown";
// CORRECT — fail fast when data contract is violated
if (product.price == null) {
throw new Error(`Product ${product.id} is missing price`);
}
const price = product.price;
```
**When fallbacks ARE acceptable:**
- User-facing display with explicit design intent (e.g., avatar placeholder)
- Optional configuration with documented defaults
- External input parsing where absence is a valid state
**Checklist before writing `??`, `||`, or `?.`:**
1. Can this value legitimately be null/undefined at this point?
2. If it is null, will the fallback produce a correct result downstream?
3. Would a thrown error help me find a bug faster?
If the answer to #3 is yes, throw instead of falling back.
---
## Rule 2: No Catch-All try/catch in Business Logic
…Read the whole file at its exact version.
How to install
mdr add satbirbhbc-ux/ai-coding-principles/ai-coding-discipline@sha256:616f067df1d05e7eThe line at the top of this page pins the label git:20260322.0720769, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_ym6coihf6nh27etv)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Mar 22, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (7445 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
satbirbhbc-ux/ai-coding-principles · 4 stars · license MIT · pushed 2026-10-14 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_ym6coihf6nh27etv GET https://markdownregistry.com/api/v1/resolve?ref=satbirbhbc-ux/ai-coding-principles/ai-coding-discipline GET https://markdownregistry.com/api/v1/blob/616f067df1d05e7e8f2a763ae8ff7b86fd62c3eafae92e18c1f5b05e59358b0a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.