Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

coding-discipline

/coding-discipline

Wprowadza dyscyplinę dla agentów AI: jawne założenia przed kodem, małe zmiany, testy najpierw i sprawdzenie wyniku.

Licencja
MIT
Ostatnia zmiana repozytorium
09.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
12
Skrypty
4
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 09.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 4 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/__init__.py, scripts/sync.py, scripts/validate.py, tests/test_sync.py

Co robi i kiedy

Wprowadza dyscyplinę dla agentów AI: jawne założenia przed kodem, małe zmiany, testy najpierw i sprawdzenie wyniku.

Oryginalny opis (EN)

Lightweight coding discipline for AI coding agents: surface assumptions before coding, keep changes small and surgical, write failing tests first, verify outcomes. Use when writing, reviewing, refactoring, or debugging non-trivial code. Do not use for trivial one-line edits, formatting-only changes, or pure explanation.

Jak działa

  1. Before You Code
  2. While You Code
  3. Before You Finish
  4. Practice
Sekcje z nagłówków SKILL.md, w oryginale · 144 linii, 887 słów
Podgląd SKILL.md
---
name: coding-discipline
description: 'Lightweight coding discipline for AI coding agents: surface assumptions before coding, keep changes small and surgical, write failing tests first, verify outcomes. Use when writing, reviewing, refactoring, or debugging non-trivial code. Do not use for trivial one-line edits, formatting-only changes, or pure explanation.'
license: MIT
metadata:
  version: 1.0.0
  repository: https://github.com/imwhatiam/coding-discipline
---

# Coding Discipline

A lightweight discipline for any code change. It biases toward caution over speed; use judgment for trivial tasks.

**Priority:** the user's request and the project's own instructions override this skill. If they conflict, follow the project and say so.

## Before You Code

### Surface assumptions

- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.

### Get the foundation right

- Get the data shape right before you write the logic.
- Do first whatever helps every later phase.
- If a concurrent writer would matter, do not share state.
- Do not bolt a new requirement onto the old design.
- Ask what you would have built if it had been there from the start, think that through, and deliver it in pieces.

### Attack the premise

- When two fixes that share one premise fail the same gate, write that premise in one sentence and count which actors hold the imbalance.
- Remove the assignment.
- Do not start another fix until you have done that.

## While You Code

### Keep it small

- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
- One decision lives in one place.
- Ship the smallest edit that solves the problem.
- Take complexity out before you add anything.

### Make surgical changes

- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.

### Write the test first

- Write the failing test before you change the code.
- See it fail for the reason you expect.
- Make the smallest change that makes it pass.
- If an honest test is impractical, do not write a bad one.

### Test behavior, not implementation

- The test calls the code the way its user does and checks the result that user would see.
- If the test would still pass when every function returned nothing, throw it out.

### Architecture

- Put the domain in a structure that makes the illegal states impossible.
- Maintain a glossary of domain terms.
- If the code is already clear and local, leave it.
- Check the data where it enters.
- Inside, trust it.
- Keep the business logic in a pure function.
- Make the illegal value impossible to write.
- Parse outside data once, where it comes in.
- Do not silence the compiler.
- Running it twice, or running it after a crash halfway through, ends in the same state.
- If they do not need the same mutable thing, give each its own.
- If they do, allow one writer, and enforce that in the structure.

### Build the lever

- If the work is not obvious at a glance, build the tool that does it.
- Do one unit by hand, then make the tool match that unit.

## Before You Finish

### Fix the root cause

- Reproduce it.
- Fix the cause.
- A guard that only hides the crash is not a fix.

### Sequence the work

- Finish one small unit and check it.
- Then start the next.

### Refactor without changing behavior

- Pin what the code does.
- Change the structure.
- Prove the behavior did not change.

### Define done

- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
- Aim at the end state you can check.
- A break in the middle is allowed when you planned it and can undo it.

For multi-step work, state a brief plan in this form:

```text
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```

## Practice

### Keep a log

- Keep a log of every action you take and the reason you took it.
- Report that log upon completion.

### Guard the context window

- Keep the main thread small.
- Send the bulk elsewhere, and keep the summary.

### Clean up the worktree

- Find what is safe to remove, confirm nothing still in use needs it, then reclaim the disk.
- Uncommitted work waits for a decision.

### Commit and push

- Commit or push only when the user explicitly asks; a change request is not authorization.
- When asked, use small ordered commits; each says why, what changed, and how you proved it; push only if asked.
- Otherwise leave the changes in the working tree and report them.

**These guidelines are working if:** diffs contain fewer unnecessary changes, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.
Pliki w paczce (12)
  • SKILL.md 5 KB
  • rules.yaml 13 KB
  • sources.lock.json 1 KB
  • sources.yaml 1 KB
  • references/upstream-karpathy.md 2 KB
  • references/upstream-ub-mode.md 4 KB
  • reports/last-sync.md 1 KB
  • scripts/__init__.py 1 KB
  • scripts/sync.py 19 KB
  • scripts/validate.py 4 KB
  • tests/coverage.json 22 KB
  • tests/test_sync.py 5 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · imwhatiam/coding-discipline100MIT
atc-net/atc-agentic-toolkit100MIT
jr2804/prompts100MIT
viktorbezdek/skillstack87MIT

Migawka bazy z 13.11.2026 · wersja paczki 05e26f3607c5 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100workflow-coding-discipline
    Wprowadza zasady pisania, edycji, refaktoryzacji i debugowania kodu: ujawnianie założeń, prostota na pierwszym miejscu i precyzyjne zmiany.
  • 100senior-dev
    Prowadzi agenta kodującego jak doświadczony inżynier: jawne założenia, proste zmiany, dowody i uczciwe raporty.
  • 100karpathy-guidelines
    Uruchamia 4 kontrole przed kodowaniem, czyli myślenie przed pisaniem, prostotę, chirurgiczną zmianę i weryfikację, zanim uzna pracę za gotową.
  • 100coding-guidelines
    Stosuje wytyczne ograniczające typowe błędy LLM w kodzie: unikanie przekomplikowania, małe zmiany i jasne kryteria sukcesu.
  • 100ai-coding-discipline
    Wymusza dyscyplinę przy pisaniu i poprawianiu kodu przez AI: wczesne zgłaszanie błędów, właściwe przekazywanie wyjątków i sensowne testy.
  • 100karpathy
    Włącza ścisłą dyscyplinę kodowania z wytycznych Karpathy'ego, dbając o prostotę, jawne założenia i chirurgiczne zmiany, na początku sesji lub przed złożoną pracą.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.