Skip to content
Back to skills

Code Discipline

ASecurity

The four engineering disciplines for planning, writing, and reviewing code (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution). Use when drafting plans, implementing changes, or performing code reviews. Trigger - "/code-discipline", "code discipline", "engineering principles".

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 6, 2026
ai-agentsgo

Works with

  • cli

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add deadeye636/switchboard --skill code-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Discipline?

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

Security grade badge for Code Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/deadeye636-code-discipline/badge)](https://www.skillsdirectory.com/skills/deadeye636-code-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: code-discipline
description: The four engineering disciplines for planning, writing, and reviewing code (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution). Use when drafting plans, implementing changes, or performing code reviews. Trigger - "/code-discipline", "code discipline", "engineering principles".
---

# Code discipline

Every agent that writes, refactors, or reviews code in this project follows these four principles.

## 1. Think before coding

- State assumptions. Never assume silently.
- When a requirement or edge case is ambiguous, lay out the readings and ask instead of guessing
  (a subagent reports `blocked` with `scope_unclear`).
- When a request adds needless complexity or breaks an invariant from `CLAUDE.md`, say so and offer
  the simpler way.
- On unexpected structure, a failing test, or unexplained behaviour: stop and diagnose. No
  speculative workaround.

## 2. Simplicity first

- The least code that solves the problem completely.
- No frameworks, helpers or config hooks for needs nobody asked for.
- No defensive branches for states that cannot occur.
- Would a staff engineer call the diff clever or overbuilt? Then simplify.

## 3. Surgical changes

- Touch only the files and lines the step or fix needs.
- No drive-by reformatting, renaming or reordering of working code outside the task.
- Match the local idiom, naming, indentation and comment density.
- Remove only the debt you created (unused imports, temporary variables); leave unrelated dead code
  alone unless the task names it.

## 4. Goal-driven execution

- Turn each task into a check that can fail: a reproduction test first, then make it pass.
- Work in small increments: implement, verify, check for regressions.
- Iterate toward green within the circuit breaker: after two consecutive failed fix attempts, stop
  and report `blocked` with `iteration_limit` (`output-contract` skill) instead of trying again.
- Green tests are not done. A renderer change is done after the click test (CLAUDE.md reflex 2), and
  a commit follows confirmed behaviour (reflex 1).

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.