git-discipline
Skill19 starsChanged 37 days agoMITView on GitHub
Work cleanly with branches, diffs, commits, and PR descriptions without risky git actions. Use when the developer asks for commits, branches, or PR text tied to SDD tasks.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- cobusgreyling/grok-build-arsenaltheir own version, first seen Nov 8, 2026
- curvedinf/dev-skillstheir own version, first seen Oct 20, 2026
- Confidence-huang/agent-git-disciplinetheir own version, first seen Oct 13, 2026
- devpilotX/skillstheir own version, first seen Sep 22, 2026
- AL-JANEF/janef-forgetheir own version, first seen Sep 19, 2026
- AL-JANEF/janefskillstheir own version, first seen Sep 19, 2026
Used with
Projects with it also use security-audit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- annatchijova/SKILLS★ 9same name
- curvedinf/dev-skills★ 7same name
- cobusgreyling/grok-build-arsenal★ 6same name
- radif-ru/ai-multi-agent-system★ 6same name
- dekoza/oh-my-slop★ 4same name
- AL-JANEF/janef-forge★ 1same name
- AL-JANEF/janefskills★ 1same name
- Confidence-huang/agent-git-discipline★ 0same name
- devpilotX/skills★ 0same name
- edrethardo/werkbank-board★ 0same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- broSkill
- closingSkill
- context-auditSkill
- decision-logSkill
- dependency-freshnessSkill
- documentation-updateSkill
- failure-learningSkill
- goblin-modeSkill
- project-mapSkill
- run-and-verifySkill
- spec-from-screenshotSkill
- ui-qaSkill
- sdd-updateSkill
- sdd-workflowSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 63
If a branch is needed, follow the project's naming convention.
- Very specific: line 77
When review.md exists for the task, build the PR description from it instead of re-deriving:
- Distinctive: line 100
Do not commit, push, merge, or open PRs unless asked.
- Distinctive: line 101
Never force-push, rewrite shared history, or skip hooks without explicit approval recorded in the conversation.
- Distinctive: line 103
Never commit secrets; check the diff for credentials before committing.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git discipline
Purpose
Produce clean, traceable git artifacts (branches, commits, PR descriptions, release notes) tied to SDD tasks, while keeping every mutating git action permission-gated. This skill supports the SDD workflow; it never bypasses it — no git text or operation substitutes for spec approval, review, or the documentation phase.
Rules
- Inspect
git status(and the relevant diff) before changes — know what state the working tree is in before touching it. - Never overwrite user changes. Uncommitted developer work is untouchable: no checkout/restore/stash over it, no edits that silently revert it. If it blocks the task, stop and ask.
- Do not commit unless asked.
- Do not push unless asked.
- Do not force-push unless explicitly approved — and document it (what was rewritten, why, and the approval) in the conversation and the task's review notes.
- Do not merge PRs unless explicitly instructed. Merging is a
human decision (see also
reference/autonomy-policy.md— never autonomous). - When commits are requested, reference the task/spec (task ID,
spec slug) in the message, following the project's convention from
AGENTS.md/questions.md§8 answers.
A project may pre-authorize specific operations in its git policy (e.g. "commit after each task"); everything not pre-authorized stays ask-first.
When to use
- The developer asks to commit, branch, or open a PR.
- Writing a commit message, PR description, or release-note entry for completed SDD work.
- Inspecting repository state before starting changes.
When not to use
- As permission to perform git operations the developer did not request.
- For resolving complex history surgery (interactive rebase, force-push recovery) — surface the situation and let the developer drive.
Required inputs
- The task/spec reference the change traces to.
- The project's git policy from
AGENTS.md(branch naming, commit conventions, whether the agent may commit/push at all). - For PR descriptions: the task's
review.md, when it exists.
Procedure
- Inspect
git statusand the diff before any action; never overwrite uncommitted developer changes. - If a branch is needed, follow the project's naming convention; ask if none is defined.
- For commits, fill
templates/commit-message.template: task/spec reference, what changed, why. Check the diff for secrets first. - For PRs, fill
templates/pr-description.md.templatefrom the reviewer's output (see mapping below). - For release notes/changelogs, fill
templates/release-note.md.template— user-visible behavior only, no internal task mechanics. - Confirm before each mutating operation unless the project's git policy explicitly pre-authorizes it.
Reviewer output → PR description
When review.md exists for the task, build the PR description from
it instead of re-deriving:
| PR template field | Source in review.md |
| Summary / what changed | Traceability table + findings resolved |
| Spec reference | The spec slug the review belongs to |
| Checks run | Commands run section |
| Review status | Decision section (+ deferred non-blocking findings) |
| Safety notes | High-risk review record, visual verification, freshness evidence |
A PR description must not claim more than the review supports — if the review is pending, say so rather than implying approval.
Output artifact
Commits, branches, PR descriptions, or release-note entries — only
those explicitly requested — with traceable text generated from the
templates in templates/ (copied from the kit's templates/git/
during onboarding and adapted to the project's conventions).
Safety constraints
- Do not commit, push, merge, or open PRs unless asked.
- Never force-push, rewrite shared history, or skip hooks without explicit approval recorded in the conversation.
- Never commit secrets; check the diff for credentials before committing.
- Respect protected branches and the project's git policy at all times.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

