Communitygithub.com

최소 코드 규율

YAGNI-사다리 방식의 코딩 규율로 변경 사항을 작성합니다 — 존재 우선, 재사용 우선, 의존성 사다리, 가장 짧고 올바른 diff, 결코 최소화되어서는 안 되는 비협상 항목이 포함됩니다.

최소 코드 규율란 무엇인가요?

이 스킬은 코드 변경을 계획하고 작성할 때 최소 코드(YAGNI-사다리) 규율을 적용하여, diff를 작고 명백히 올바르게 유지하면서 사용자 안전을 지키는 검사를 희생하지 않도록 돕습니다. 이 스킬은 `ai-slop-cleaner`를 보완합니다. 전자는 슬롭이 코드에 반영된 후 정리하는 반면, 후자는 애초에 슬롭이 작성되지 않도록 방지합니다. 사용자가 최소한의 구현, YAGNI, 또는 가장 작은 diff를 요청하거나, 계획이나 진행 중인 변경이 요청 범위를 벗어날 때 유용합니다. 또한 범위 확장, 재발명된 헬퍼, 투기적 일반화가 발생하기 쉬운 새로운 코드를 작성할 때, 또는 구현 전 제안된 diff의 크기를 검토할 때 사용합니다. 규율은 존재 우선, 재사용 우선, 의존성 사다리(표준 라이브러리 → 플랫폼 네이티브 → 기존 의존성 → 직접 작성), 이해 후 최소화, 지루하지만 올바른 코드 선호, 한계 표시, 근본 원인 해결을 포함합니다. 신뢰 경계를 넘는 검증, 데이터 손실을 방지하는 오류 처리, 보안 제어, 접근성 기본 요소, 사용자가 명시적으로 요청한 범위는 결코 최소화하지 않아야 하는 비협상 항목입니다. 완료 전에는 모든 추가된 줄이 정당하고, diff가 올바르며, 비협상 항목이 유지되고, 테스트가 통과하는지 확인합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/minimal-code-discipline

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

최소 코드 규율은(는) 무엇을 하나요?

이 스킬을 사용하여 코드 변경을 계획하고 작성하는 동안 최소 코드(YAGNI-사다리) 규율을 적용하세요. 사용자 안전을 지키는 검사를 희생하지 않으면서 diff를 작고 명백히 올바르게 유지합니다.

이 스킬은 ai-slop-cleaner를 보완합니다. 전자는 슬롭이 코드에 반영된 후 정리하는 반면, 이 스킬은 애초에 슬롭이 작성되지 않도록 방지합니다.

사용 시기

다음과 같은 경우 이 스킬을 사용하세요:

  • 사용자가 최소화된, 간결한, YAGNI, 또는 가능한 가장 작은 diff 구현을 요청할 때
  • 계획이나 진행 중인 변경이 명시된 요청을 넘어 확장될 때
  • 범위 확장, 재발명된 헬퍼, 또는 투기적 일반화가 발생하기 쉬운 새로운 코드를 작성할 때
  • 구현 전 제안된 diff의 크기를 검토할 때

사용하지 말아야 할 때

다음과 같은 경우 이 스킬을 사용하지 마세요:

  • 사용자가 명시적으로 광범위하거나, 기능이 풍부하거나, 미래 지향적인 빌드를 요청할 때 (명시된 범위가 우선합니다)
  • 작업이 사용자가 임시용으로 표시한 탐색적 스캐폴딩일 때
  • 최소화 압력이 보호된 동작에 영향을 미칠 때 (비협상 항목 참조)

규율

존재 우선. 변경이 존재해야 하는지 먼저 묻고, 투기적 미래 필요만을 위한 작업은 건너뛰세요.

재사용 우선. 새로운 것을 작성하기 전에 코드베이스에서 기존 헬퍼, 타입, 또는 패턴을 검색하세요. 몇 파일 떨어진 곳에 이미 존재하는 헬퍼를 절대 복사하지 말고, 재사용하거나 한 공유 위치로 추출하세요.

의존성 사다리. 먼저 표준 라이브러리를, 그다음 플랫폼 네이티브 기능을, 그다음 이미 설치된 의존성을 사용하세요. 직접 작성한 코드는 최후의 수단입니다. 사용자가 명시적으로 요청하거나 승인하지 않은 한, 몇 줄의 코드로 충분할 때 새로운 의존성을 도입하지 마세요.

최소화하기 전에 이해하세요. 먼저 영향을 받는 코드를 읽고 실행 경로를 따라가세요. 문제를 이해한 후 가장 짧고 올바른 diff를 제출하세요. 작성하지 않은 코드는 절대 깨지지 않습니다.

영리함보다 지루함. 영리한 코드보다 지루하고 명백히 올바른 코드를 선호하세요.

한계를 표시하세요. 인정된 한계와 이를 대체할 근거를 명명하는 짧은 주석으로 의도적인 단순화를 기록하세요.

증상이 아닌 근본 원인. 각 보고된 증상에 대해 별도의 패치를 적용하지 말고, 모든 호출자가 공유하는 근본 원인에서 버그를 수정하세요.

비협상 항목

다음은 결코 최소화하지 마세요:

  • 신뢰 경계가 교차되는 곳의 검증
  • 데이터 손실을 방지하는 오류 처리
  • 보안 제어
  • 접근성 기본 요소
  • 사용자가 명시적으로 요청한 범위

검증

완료를 보고하기 전에 다음을 확인하세요:

  • 추가된 모든 줄이 정당함 (투기적 일반화, 중복 헬퍼 없음)
  • diff가 명시된 문제를 올바르게 해결하는 가장 짧은 diff임
  • 비협상 항목이 유지됨
  • 테스트가 여전히 통과하고 요청된 대로를 제외하고 동작이 변경되지 않음

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

agent-doc-discipline

Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly

ask-navigator

Shipyard

autopilot

Full autonomous execution from idea to working code

autoresearch

Stateful single-mission improvement loop with strict evaluator contract, markdown decision logs, and max-runtime stop behavior

cancel

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

debug

Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction

deepinit

Deep codebase initialization with hierarchical AGENTS.md documentation

deep-interview

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

drydock

Lay the keel of the shipyard harness in any repo — the 4-pillar shared environment (Context, Rules, Tools, Standards) across 5 surfaces (CLAUDE.md, skills, design-system, mcp/cli, shared context) so that every human and agent inherits the same design language and anyone can ship. Run once per repo; re-run with --check to audit drift.

execute

Carry an approved task through to working, verified code

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup

graph

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

harbor

Harbor intake for external work — the captain only handles unresolved decisions. Sweeps incoming issues and PRs, verifies every claim before disposition, reuses every decision already made, and hands the maintainer a docket whose pending items each carry one question with options, recommendation, impact and evidence. Agent-autonomous for facts and for actions covered by standing authorization; signed for every new judgment. Never merges.

hud

Configure HUD display options (layout, presets, display elements)

launch

Shipyard

loft

Loft the shape before cutting steel — answer a design question that prose cannot settle by building a throwaway artifact: a pure logic module in a clickable shell, or structurally different UI variants behind one route. The captain reacts to the artifact; the answer folds into the decision; the artifact never docks. Use when a design question stalls in words, when a navigator map carries a loft ticket, or when a spec discussion reaches

omc-doctor

Diagnose and fix oh-my-claudecode installation issues

관련 스킬