ai-coding-discipline

Enforce fail-fast error handling and meaningful tests during code writing.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/MisLink/agentry --skill ai-coding-discipline-mislink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-coding-discipline
Source: https://github.com/MisLink/agentry/tree/main/agents/.agents/skills/ai-coding-discipline
Command: npx skills add https://github.com/MisLink/agentry --skill ai-coding-discipline-mislink

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill tackles common AI-generated code anti-patterns that hide bugs, swallow errors, and create weak tests, ensuring reliable and maintainable software.

Core Features & Use Cases

  • Fail-Fast Principles: Enforces throwing errors instead of silent fallbacks to expose data issues early.
  • Proper Error Handling: Prohibits catch-all try/catch in business logic, allowing errors to propagate naturally.
  • Strong Testing: Mandates meaningful tests that fail when logic breaks and follows red-green TDD for bug fixes.
  • Use Case: When implementing a new feature like order processing, this Skill ensures no hidden nulls mask missing user data and tests verify exact business outcomes like discount calculations.

Quick Start

Load this skill before writing or editing any code to enforce disciplined practices from the start.

Frequently Asked Questions about ai-coding-discipline

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

FAQPage Schema
How do I stop AI generated code from swallowing errors in try catch blocks?

To stop AI generated code from swallowing errors, enforce proper error handling rules that prohibit catch-all try/catch blocks in business logic, allowing errors to propagate naturally instead of being masked.

What is the fail-fast principle for preventing silent null fallbacks in AI code?

The fail-fast principle for AI coding prevents silent null fallbacks by mandating that code throws errors immediately when encountering invalid data, exposing data issues early rather than hiding them behind default values.

How do I write meaningful tests for bug fixes using red-green TDD?

Writing meaningful tests for bug fixes using red-green TDD requires mandating tests that explicitly fail when logic breaks, ensuring new code accurately satisfies exact business outcomes like discount calculations.

Does this coding discipline skill apply to refactoring and code review tasks?

Yes, this coding discipline skill applies directly to refactoring and code review tasks, enforcing strict rules across writing, editing, debugging, and testing to prevent common AI coding anti-patterns.

What are common AI coding anti-patterns when implementing new features?

Common AI coding anti-patterns when implementing features include hiding bugs with silent fallbacks, swallowing errors with catch-all blocks, and creating weak tests that fail to verify exact business outcomes.

When should I load coding discipline rules for AI-assisted development?

You should load coding discipline rules before writing or editing any code in AI-assisted development, ensuring fail-fast principles, proper error propagation, and strong testing practices are enforced from the start.