Логотип Git Discipline

Git Discipline

Спільнота
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.

Огляд

ВидавецьUnpaidAttention
Репозиторійfable5-methodology
Назва навичкиgit-discipline
Зірки
94
Форки
21
Файли в пакеті
Лише інструкції
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: UnpaidAttention. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Git Discipline у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/git-discipline
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Git Discipline в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Git Discipline, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Git Discipline не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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.

Поширені запитання

Що робить навичка ШІ 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...

Навіщо використовувати Git Discipline у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Git Discipline — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Git Discipline у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/git-discipline. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Git Discipline?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Git Discipline?

Зі скількома забажаєте. У TypingMind ви можете використовувати Git Discipline із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Git Discipline?

На GitHub цю навичку публікує UnpaidAttention. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇