Logo: Git Discipline

Git Discipline

Communautéit
UnpaidAttention
git-discipline

Rules for commits, branches, diffs, and history when working in a git repository — checkpoint strategy, pre-commit diff review, message format, and the hard prohibitions on destructive operations. Trigger this whenever work happens in a git repo and involves staging, committing, branching, or any history-affecting command; before EVERY commit; and the moment you are tempted to run force-push, reset --hard, clean -fd, rebase, or amend. Do NOT trigger for the edit-test cycle itself (use verification-loop) or for reviewing code quality of a diff (use code-review) — this skill governs version-control mechanics and safety only.

Iwwersiicht

EditeurUnpaidAttention
Repositoryfable5-methodology
Skill-Nummgit-discipline
Stären
94
Forks
21
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    UnpaidAttention huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Git Discipline an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/git-discipline
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnpaidAttention/fable5-methodology.git /tmp/fable5-methodology
mkdir -p .claude/skills
cp -r /tmp/fable5-methodology/skills/git-discipline .claude/skills/git-discipline
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Git Discipline an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Git Discipline automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Git Discipline net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Git Discipline

Git is the safety net and the audit trail. Used carelessly it becomes the accident: history rewritten, work destroyed, secrets published. The rules below are ordered: prohibitions first because they are absolute; craft second.

Hard prohibitions (no exceptions without explicit user instruction)

  1. Never commit or push unless the user asked or their workflow clearly expects it. On a long task, ask ONCE at the start: "checkpoint-commit as I go, or leave everything unstaged?" If no commits are authorized, checkpoint with git stash push -m "checkpoint: <state>" or record known-good SHAs in your notes instead.
  2. No force pushes. No history rewrites of anything pushed (rebase, commit --amend, filter-branch on published commits). To undo a pushed commit, use git revert — it preserves history.
  3. No destructive working-tree operations without explicit confirmation in THIS conversation: reset --hard, checkout -- . over uncommitted work you didn't create, clean -fd, branch deletion with unmerged work. Before asking, run git status and git stash list and report what would be lost.
  4. Never commit on the default branch. Branch first: git checkout -b <type>/<short-slug> (e.g. fix/csv-last-row).
  5. No secrets, ever. Before every commit, scan the staged diff for keys, tokens, passwords, connection strings, and .env content. One match = unstage, move to env/secret manager, and check whether the value was ever committed before (if yes, tell the user it needs rotation — removal from HEAD does not un-leak it).
  6. No generated junk: build artifacts, node_modules/target/__pycache__, editor files, your own WORKING_NOTES.md. If it's generated and not ignored, fix .gitignore in the same commit rather than committing the junk.

Commit craft

  1. Small and coherent: one logical change per commit — a commit you can describe in one sentence without "and also". Mechanical rename and behavior change are two commits, so the reviewer can skim one and scrutinize the other.
  2. Stage by path, never blind: git add src/lib/csv.ts tests/csv.test.ts — never git add . or git add -A, which are how junk, secrets, and unrelated edits get in.
  3. Review the FULL staged diff before every commit: git diff --staged, read every hunk. You are looking for: leftover debug prints, unrelated drive-by edits, secrets, and hunks you can't explain. Any of those = fix before committing. This review is mandatory even when "sure" — especially when sure.
  4. Message format: imperative summary ≤72 chars stating the change (fix: include final row in CSV export); body only when the WHY isn't obvious from the diff — the constraint, the bug mechanism, the rejected alternative. Never narrate the process ("tried X then Y").
  5. Checkpoint rhythm (when commits are authorized): commit at every verified-green unit boundary (see verification-loop). Never commit a known-red state; if you must save a red work-in-progress, use a stash with a descriptive message instead.

Recovery habits

  • Before any risky operation you WERE authorized to run, note the current SHA (git rev-parse HEAD) in your working notes — that's the rollback target.
  • Prefer additive recovery (revert, new commit) over subtractive (reset) whenever the branch may have been seen by anyone else.
  • git reflog is the last-resort undo — remember it exists before declaring work lost.

Worked example

Task: fix a bug; user said "commit as you go" at session start.

  1. git checkout -b fix/csv-last-row (never on main).
  2. Fix + regression test; pnpm test green.
  3. git add src/lib/csv.ts tests/csv.test.ts (by path).
  4. git diff --staged — review finds a console.log(rows) left in. Remove, re-stage, re-test.
  5. Commit: fix: include final row in CSV export when trailing newline absent.
  6. Later, a second improvement to error messages in the same file → separate commit, not squashed in.
  7. Push only because the user asked for a PR; git push -u origin fix/csv-last-row — no force flags.

Done when

Every commit on the branch is one sentence-sized logical change whose full staged diff you read before committing; nothing was committed to the default branch, force-pushed, or history-rewritten; no secret or generated file is in any commit; and every destructive operation that ran had explicit user confirmation from this conversation.

Heefeg gestallte Froen

Wat mécht de KI-Skill Git Discipline?

Rules for commits, branches, diffs, and history when working in a git repository — checkpoint strategy, pre-commit diff review, message format, and the hard prohibitions on destructive operations. Trigger this whenever work happens in a git repo and involves staging, committing, branching, or any history-affecting command; before EVERY commit; and the moment you are tempted to run force-push, reset --hard, clean -fd, rebase, or amend. Do NOT trigger for the edit-test cycle itself (use verification-loop) or for reviewing code quality of a diff (use code-review) — this skill governs version-c...

Firwat Git Discipline op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Git Discipline besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Git Discipline an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/git-discipline an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Git Discipline benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Git Discipline benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Git Discipline domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Git Discipline gratis?

UnpaidAttention huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇