git-github-workflow
Skill1 starsChanged 15 days agoApache-2.0View on GitHub
Maintain local Git hygiene and GitHub collaboration with approval-gated branches, atomic commits, PR and issue hygiene, and release safety. Use when creating branches, committing, pushing, opening or reviewing pull requests, triaging issues, or changing repository GitHub settings.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- TidalPaladin/skillstheir own version, first seen Nov 8, 2026
- d-o-hub/github-template-ai-agentstheir own version, first seen Nov 3, 2026
- Flairstech-AIMY/coolify-skillstheir own version, first seen Sep 19, 2026
- yiweiwan/skillstheir own version, first seen May 12, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- d-o-hub/github-template-ai-agents★ 2same name
- TidalPaladin/skills★ 1same name
- yiweiwan/skills★ 1same name
- Flairstech-AIMY/coolify-skills★ 0same name
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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-pr-reviewSkill
- ai-slop-detectorSkill
- architecture-reviewSkill
- codebase-orientationSkill
- code-reviewSkill
- dependency-upgradeSkill
- documentation-reviewSkill
- frontend-quality-reviewSkill
- harness-adaptationSkill
- implementation-planningSkill
- parallel-multi-agentSkill
- quality-hardeningSkill
- reduce-code-sizeSkill
- repository-guidance-authoringSkill
- requirements-and-designSkill
- review-feedback-resolutionSkill
- rules-and-skills-auditSkill
- security-reviewSkill
- skill-authoringSkill
- skill-discoverySkill
- skill-optimizerSkill
- skill-reviewerSkill
- systematic-debuggingSkill
- threat-modelingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 11 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
13
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 12
Keep Git history readable and GitHub collaboration safe with explicit approval gates.
- Very specific: line 25
Side effects: read-only until approval; afterward only git branch, commit, push, and gh/API calls the user explicitly authorized.
- Distinctive: line 30
Establish state and authority: Read git status --porcelain, git branch --show-current, git log --oneline -5, remote, and protection rules.
- Distinctive: line 38
Run git status --porcelain to identify untracked, modified, and staged files.
- Distinctive: line 39
If uncommitted changes exist that do not belong to the current task:
- Distinctive: line 40
Ask the user whether to commit, stash (git stash -u to include untracked files), or discard.
- Distinctive: line 41
Never run destructive commands (git checkout -- ., git clean -fd, git reset --hard) without explicit approval.
- Very specific: line 43
Plan the branch and commits: Use the repository's established branch naming from the resolved base.
- Very specific: line 53
If identity is unconfigured or misconfigured, propose the appropriate local config command (git config user.name "..." && git config …
- Very specific: line 54
Draft the change: Keep PRs small, describe user-visible change, motivation, scope/safety checklist, and verification (the project's gate, …
- Very specific: line 59
Improve existing prompts when useful: If the target has weak AGENTS.md, CLAUDE.md, .cursor/rules, or copilot instructions, propose …
- Very specific: line 64
Verify hygiene and target-local gates: Check git diff --stat, relative links, no secrets or personal paths (using the target's documented …
- Very specific: line 106
Never run git add . or git add -A from repository root.
- Distinctive: line 107
Check git diff --cached before committing to verify zero unintended files, debug logs, or credentials are staged.
- Very specific: line 108
Use explicit issue closing keywords in PR bodies (Fixes #123, Closes #456) rather than vague issue references.
- Very specific: line 109
Do not push --force, use push --force-with-lease on the resolved base or protected default branch, or rewrite published history without …
- Distinctive: line 112
Do not use a quick or skipped variant of the gate as the pre-commit or pre-push check.
- Very specific: line 115
Before any authorized push --force-with-lease on a non-base branch or other history rewrite, create an explicit backup branch (git branch …
- Very specific: line 119
Before opening or updating a PR, fetch and reconcile the resolved base, then freeze and report the exact BASE_SHA...HEAD_SHA range that …
- Very specific: line 122
Do not commit secrets, .env, id_rsa, *.pem, or personal filesystem paths.
- Very specific: line 124
Do not create a remote, tag, or release (git tag/gh release) without separate explicit authorization per the project's release …
- Distinctive: line 126
When local policy requires adversarial review, do not push a branch intended to open or update a PR without a completed fresh-context …
- Distinctive: line 129
Prefer AGENTS.md hierarchy over adding duplicate harness entrypoints.
- Distinctive: line 130
Keep commits focused: one logical change per commit, no bundled refactors.
“Common” is measured: kept by at least 6 in 10 of the 4 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 GitHub Workflow
Keep Git history readable and GitHub collaboration safe with explicit approval gates. The agent proposes branches, commits, and PRs; it does not rewrite history or publish without authority.
Contract
- Input: intent (branch/commit/PR/issue/release), current
git status, target base,.github/*templates, and applicable local guidance. - Output: branch plan, atomic commit set, PR/issue draft, settings change proposal, and verification evidence — or a blocked report.
- Owner: local Git hygiene and GitHub collaboration workflow.
- Non-goals: architecture decisions, code review of diff content, or provider/model selection.
- Side effects: read-only until approval; afterward only
git branch,commit,push, andgh/APIcalls the user explicitly authorized.
Workflow
Establish state and authority. Read
git status --porcelain,git branch --show-current,git log --oneline -5, remote, and protection rules. Resolve the canonical base from repository policy, existing PR metadata, the remote default, or an explicit user instruction, and determine whether a clean worktree is required. Confirm the user has authorized anypush,publish, orPRcreation; otherwise stop after the draft.Worktree safety and pre-flight checklist:
- Run
git status --porcelainto identify untracked, modified, and staged files. - If uncommitted changes exist that do not belong to the current task:
- Ask the user whether to commit, stash (
git stash -uto include untracked files), or discard. - Never run destructive commands (
git checkout -- .,git clean -fd,git reset --hard) without explicit approval.
- Ask the user whether to commit, stash (
- Confirm the target branch does not already exist locally or remotely (
git branch --list <name>,git ls-remote --heads origin <name>).
- Run
Plan the branch and commits. Use the repository's established branch naming from the resolved base; when no convention exists, propose a concise purpose-based name. Keep commits atomic and conventional (
feat:,fix:,docs:,chore:). Never usereset --hard,filter-branch,rebase --force, or history rewriting on shared branches without explicit approval.Author identity verification:
- Inspect
git config user.nameandgit config user.email(orgit var GIT_AUTHOR_IDENT). - Confirm the email matches the user's intended public identity or GitHub privacy email (e.g.
<id>+<username>@users.noreply.github.com). - If identity is unconfigured or misconfigured, propose the appropriate local config command (
git config user.name "..." && git config user.email "...") and wait for confirmation. Never commit with an auto-generated local hostname email.
- Inspect
- Draft the change. Keep PRs small, describe user-visible change,
motivation, scope/safety checklist, and verification (the project's gate, such as
make test,gh pr checks). Use.github/pull_request_template.mdandISSUE_TEMPLATE/*when present. Link issues, updateCHANGELOG.mdwhen user-visible. - Improve existing prompts when useful. If the target has weak
AGENTS.md,CLAUDE.md,.cursor/rules, or copilot instructions, propose paste-ready text-level improvements derived from catalog decision procedures rather than copying a parallel skill. Keep always-loaded files concise viaskill-optimizer. Verify hygiene and target-local gates. Check
git diff --stat, relative links, no secrets or personal paths (using the target's documented hygiene check when one exists), and that the branch does not expose ignored runtime state such as.kiloor.idea. Discover the target repository's own documented format, lint, test, build, and coverage commands from its local guidance and build files, then run the smallest complete relevant gate. A project's own verification command (for example amaketarget) is an example, not a universal commands: never assume a helper, path, language toolchain, or quality threshold from the source project or from another repository. If no complete gate is available, report the exact checks that were run and the limitation rather than inventing or importing one.- Run the target's complete gate before commit and push: Run the target
repository's full local verification gate (for example a
maketarget or CI command) or its equivalent) before committing and again before pushing. The gate typically runs Markdown/guidance lint, structural validation, and secret scans. Treat a failing or skipped gate as a blocker: resolve the findings (or, for a genuine false positive, record the exact reason) before commit/push. Never commit or push with the gate red or skipped.
- Run the target's complete gate before commit and push: Run the target
repository's full local verification gate (for example a
- Reconcile, verify, and freeze the publish candidate. Fetch the resolved
base from the approved remote and reconcile before the final gate or review.
Record the reconciled
BASE_SHAand candidateHEAD_SHA, then run the full repository gate against that exact state. Inspect local policy (for exampleAGENTS.mdorCONTRIBUTING.md) and, when it requiresadversarial-pr-review, invoke it on the exactBASE_SHA...HEAD_SHAdiff before the initial push and every later update push. Require a completed fresh-context verdict and convergence evidence. Any later commit, amend, merge, rebase, conflict resolution, generated-file change, or other diff mutation invalidates the final gate and review and returns the workflow to this step. The review mechanics are owned by adversarial-pr-review; this gate does not replace separate authorization to push. - Publish only the frozen candidate with approval. Confirm that HEAD still
equals the recorded
HEAD_SHAand that the current remote base tip still equalsBASE_SHA; if either moved, return to step 6. Do not open or update a PR while a required gate is red, skipped, stale, or blocked. Push to the approved remote and branch, set upstream only when requested, and open the PR withgh pr createusing the approved body. Report branch, commit, remote, reconciled base SHA, reviewed diff range, and checks.
Boundaries and gotchas
- Never run
git add .orgit add -Afrom repository root. Explicitly stage only the files owned by the task (git add path/to/file1 path/to/file2). - Check
git diff --cachedbefore committing to verify zero unintended files, debug logs, or credentials are staged. - Use explicit issue closing keywords in PR bodies (
Fixes #123,Closes #456) rather than vague issue references. - Do not
push --force, usepush --force-with-leaseon the resolved base or protected default branch, or rewrite published history without explicit approval and a backup branch. - Do not use a quick or skipped variant of the gate as the pre-commit or pre-push check; run the full gate and confirm it passes before committing or pushing. Skipping lint or structural validation is where guidance edits most often fail.
- Before any authorized
push --force-with-leaseon a non-base branch or other history rewrite, create an explicit backup branch (git branch backup/<branch>-<date>) and name it in the report; never rely on the reflog alone. - Before opening or updating a PR, fetch and reconcile the resolved base, then
freeze and report the exact
BASE_SHA...HEAD_SHArange that passed the final gate and any required review. - Do not commit secrets,
.env,id_rsa,*.pem, or personal filesystem paths. Redact examples. - Do not create a remote, tag, or release (
git tag/gh release) without separate explicit authorization per the project's release documentation (for exampledocs/release.mdwhen present). - When local policy requires adversarial review, do not push a branch intended to open or update a PR without a completed fresh-context review of its final diff and convergence evidence; a prior review does not cover later changes.
- Prefer
AGENTS.mdhierarchy over adding duplicate harness entrypoints. - Keep commits focused: one logical change per commit, no bundled refactors.
Report and stop condition
Report: branch/base, commit list, PR/issue draft, files changed, hygiene results, exact commands run, and what was not run. Stop and ask when the worktree is dirty in a way that would be lost, the base has diverged, an approval is missing for a destructive or publishing action, or the next step requires credentials. Do not claim a PR is ready merely because a draft exists.
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.

