Skip to content
Back to skills

Coding Discipline

ASecurity

Karpathy-inspired coding discipline — think before coding, simplicity first, surgical changes, goal-driven execution — with real-world wrong/right examples. Use when implementing, reviewing, or fixing code that shows hidden assumptions, overcomplication, scope creep, or vague success criteria.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 4, 2026
ai-agentsgorailsgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add rbhattarai/se-harness --skill coding-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding Discipline?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coding Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rbhattarai-coding-discipline/badge)](https://www.skillsdirectory.com/skills/rbhattarai-coding-discipline)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: coding-discipline
description: Karpathy-inspired coding discipline — think before coding, simplicity first, surgical changes, goal-driven execution — with real-world wrong/right examples. Use when implementing, reviewing, or fixing code that shows hidden assumptions, overcomplication, scope creep, or vague success criteria.
---

# Coding Discipline

Behavioral guardrails against common LLM coding mistakes. Source:
https://github.com/multica-ai/andrej-karpathy-skills (derived from Karpathy's
observations on LLM coding pitfalls). Full wrong/right examples: `EXAMPLES.md`
in this directory.

## The four principles

1. **Think before coding** — state assumptions explicitly; present multiple
   interpretations instead of picking silently; push back when a simpler approach
   exists; stop and ask when confused.
2. **Simplicity first** — minimum code that solves the problem; no speculative
   features, single-use abstractions, unrequested configurability, or
   impossible-scenario handling. Test: would a senior engineer call this
   overcomplicated?
3. **Surgical changes** — touch only what the task requires; don't "improve"
   adjacent code, comments, or formatting; match existing style; mention unrelated
   dead code, don't delete it; clean up only orphans your changes created. Test:
   every changed line traces to the request.
4. **Goal-driven execution** — turn tasks into verifiable goals ("fix bug X" →
   "write a failing test for X, then make it pass"); for multi-step work state each
   step with its verification; loop until verified.

**Tradeoff:** these bias toward caution over speed. For trivial tasks, use judgment.

## When to open EXAMPLES.md

Open it when you catch yourself (or a diff under review) doing any of: assuming
scope/format/fields the user didn't state; reaching for an abstraction before the
second use case; reformatting or "improving" lines outside the task; starting work
with no test or check that would prove it done.

Files in this skill

  • EXAMPLES.md14.4 KB
  • SKILL.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.