๐Ÿงช
Quality

AI Coding Discipline

by luoling8192

AI Coding Discipline is a Quality skill for Claude Code, published by luoling8192 in ai-coding-principles.

171 stars11 forkson luoling8192/ai-coding-principlesAdded 2026/09/07Repository updated 2026/03/26
aiclaude-codeddiaskills
Install in seconds
Install AI Coding Discipline
Copy AI Coding Discipline into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/luoling8192/ai-coding-principles/tree/main/ai-coding-discipline ~/.claude/skills/ai-coding-discipline

Requires Node.js. Downloads this skill only โ€” not the rest of the repository โ€” into your Claude Code skills folder.

Without Node.js

git clone https://github.com/luoling8192/ai-coding-principles.git

Clones the whole repository, then copy the skillโ€™s own directory into your skills folder yourself.

In this catalog

Source file
ai-coding-discipline/SKILL.md in luoling8192/ai-coding-principles
Installs to
~/.claude/skills/ai-coding-discipline
Collection
One of 2 skills cataloged from this repository
Category
Quality โ€” 1817 skills

What AI Coding Discipline does

AI Coding Discipline enforces fail-fast coding habits for writing, editing, reviewing, and testing code. It helps prevent silent fallbacks, catch-all error handling, weak tests, and rushed debugging fixes.

AI Coding Discipline is cataloged under Quality on DirSkills. AI Coding Discipline comes from a repository tagged ai, claude-code, ddia and skills.

Documentation

README

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.

// 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

This is the opening of the README. Read the full README on GitHub.

Frequently asked about AI Coding Discipline

  • What else does luoling8192 publish alongside AI Coding Discipline?

    AI Coding Discipline is one of 2 skills that DirSkills catalogs from luoling8192/ai-coding-principles, the repository it ships in. Its siblings there include DDIA Principles. Each one is a separate skill with its own page in this directory, installs the same way AI Coding Discipline does, and is maintained by luoling8192 in that same repository. The rest of the collection is listed on the luoling8192/ai-coding-principles page.

  • How does AI Coding Discipline compare to other Quality skills?

    AI Coding Discipline ranks #1733 by stars among the 1817 Quality skills in this catalog. The most-starred ones next to it are Benchmark, Benchmark Optimization Loop and API Design Patterns. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of AI Coding Discipline against them. Open each page to compare what they document and how they install.