ai-coding-discipline

Apply coding-discipline rules to writing, editing, reviewing, and testing code.

170|11|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/luoling8192/ai-coding-discipline-skill --skill ai-coding-discipline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-coding-discipline
Source: https://github.com/luoling8192/ai-coding-discipline-skill/tree/main/ai-coding-discipline
Command: npx skills add https://github.com/luoling8192/ai-coding-discipline-skill --skill ai-coding-discipline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

These mandatory rules codify best practices for coding tasks and prevent common AI-generated code anti-patterns by ensuring fail-fast behavior, proper error propagation, and disciplined debugging workflows.

Core Features & Use Cases

  • Enforces no silent fallbacks (avoid masking missing data)
  • Prohibits catch-all try/catch in business logic, promotes boundary-level error handling
  • Ensures tests fail when core logic breaks, promoting meaningful assertions
  • Discourages hardcoded lookup tables in favor of real logic
  • Encourages TDD and retention of debug logs until the fix is verified
  • Provides a clear, repeatable checklist for code changes across writing, editing, reviewing, and debugging

Quick Start

Apply these rules to a code change by outlining how you would avoid silent fallbacks, preserve error propagation, and verify behavior with failure-focused tests.

Frequently Asked Questions about ai-coding-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent silent fallbacks and error masking in AI-generated code?

To prevent silent fallbacks in AI-generated code, apply coding-discipline rules that enforce fail-fast behavior and prohibit catch-all try/catch blocks in business logic, ensuring missing data is not masked.

What is the best way to enforce error propagation in business logic?

The best way to enforce error propagation is to prohibit catch-all try/catch blocks within business logic and mandate boundary-level error handling, ensuring failures surface immediately rather than being swallowed.

How do I write meaningful tests that fail when core logic breaks?

To write meaningful tests that fail when core logic breaks, apply test-driven development principles and ensure your testing strategy focuses on failure-focused assertions rather than superficial coverage.

Why should debug logs be retained during the bug fixing workflow?

Debug logs should be retained during the bug fixing workflow until the fix is verified, because disciplined debugging workflows require continuous validation to ensure the error propagation has been genuinely resolved.

Does coding discipline prohibit hardcoded lookup tables in favor of real logic?

Yes, coding discipline discourages hardcoded lookup tables in favor of real logic, preventing common AI-generated code anti-patterns and ensuring that business rules are executed through dynamic implementation.

Can I apply coding discipline rules to code reviewing and editing tasks?

Yes, you can apply coding discipline rules to code reviewing and editing tasks, as the rules provide a clear, repeatable checklist for code changes across writing, reviewing, and debugging workflows.