Langsung ke konten
Skillpedia
Pemrograman umum41k · #7010

minimal-code-discipline

Fungsinya

Skill ini memandu agent menjaga perubahan kode sekecil mungkin sambil tetap benar. Skill ini untuk orang yang menginginkan perubahan yang fokus tanpa bobot berlebih atau tambahan spekulatif.

Kapan dipakai

  • ✓Saat Anda meminta perubahan yang minimal, ramping, atau sekecil mungkin.
  • ✓Saat sebuah rencana atau perubahan tumbuh melebihi apa yang diminta.
  • ✓Saat Anda ingin perubahan yang diusulkan ditinjau apakah ukurannya tidak perlu sebelum dibangun.

Link skill

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/minimal-code-discipline/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/minimal-code-discipline/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Tambahkan tombol ekspor sederhana di halaman laporan. Buat perubahannya sekecil mungkin dan pakai ulang yang sudah kita punya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent pertama-tama menanyakan apakah perubahan itu memang diperlukan, memeriksa basis kode untuk helper yang sudah ada, dan memilih alat paling sederhana yang bisa mengerjakan tugas. Agent menjaga perubahan tetap pendek sambil mempertahankan pemeriksaan keamanan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Minimal Code Discipline

Use this skill to apply a minimal-code (YAGNI-ladder) discipline while planning and writing code changes. It keeps diffs small and obviously correct without sacrificing the checks that keep users safe.

This skill complements ai-slop-cleaner: that skill cleans slop after it lands; this one keeps it from being written.

When to Use

Use this skill when:

  • the user asks for a minimal, lean, YAGNI, or smallest-possible-diff implementation
  • a plan or in-flight change is growing beyond the stated request
  • writing new code where scope creep, reinvented helpers, or speculative generality are likely
  • reviewing a proposed diff for size before implementation

When Not to Use

Do not use this skill when:

  • the user explicitly asks for a broad, feature-rich, or future-proofed build (their explicit scope wins)
  • the task is exploratory scaffolding the user has marked as throwaway
  • minimization pressure would touch protected behavior (see Non-Negotiables)

The Discipline

Existence first. Ask whether the change needs to exist at all; skip work that serves only a speculative future need.

Reuse before writing. Search the codebase for an existing helper, type, or pattern before writing anything new. Never copy a helper that already lives a few files away — reuse it or extract it to one shared location.

Dependency ladder. Reach for the standard library first, then platform-native capability, then an already-installed dependency. Hand-written code is the last resort. Do not introduce a new dependency when a few lines of code suffice, unless the user explicitly requested or approved it.

Understand before minimizing. Read the affected code and follow its execution path first. Ship the shortest correct diff once the problem is understood — code you never write never breaks.

Boring over clever. Prefer boring, obviously-correct code over clever code.

Mark the ceiling. Record deliberate simplifications with a short comment naming the accepted limit and what would justify replacing it.

Root cause, not symptoms. Fix bugs at the root cause shared by every caller, not with a separate patch for each reported symptom.

Non-Negotiables

Never minimize away:

  • validation wherever a trust boundary is crossed
  • error handling that guards against data loss
  • security controls
  • accessibility fundamentals
  • scope the user explicitly requested

Verification

Before reporting completion, confirm:

  • every added line earns its place (no speculative generality, no duplicate helpers)
  • the diff is the shortest one that correctly solves the stated problem
  • non-negotiables are intact
  • tests still pass and behavior is unchanged except as requested
Pertanyaan umum

Apakah ia akan menghapus pemeriksaan keamanan agar kodenya kecil?

Tidak. Perilaku yang dilindungi dan pemeriksaan keamanan tidak pernah dipotong hanya untuk menghemat baris.

Apakah ia menimpa permintaan untuk fitur besar?

Tidak. Jika Anda secara eksplisit meminta pembangunan yang luas atau siap masa depan, lingkup Anda yang berlaku.

Apa bedanya dengan skill pembersihan?

Skill ini mencegah kode tambahan ditulis, sedangkan skill pembersihan merapikan kode setelah ditambahkan.

Detail

Deskripsi asli dari pembuat

YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away

repo: Yeachan-Heo/oh-my-claudecode

Popularitas

Bintang GitHub
41k
Peringkat
#7010
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa