git-workflow-lifecycle
Skill2 starsChanged 17 days agoApache-2.0View on GitHub
Automate the end-to-end lifecycle of a feature branch, from submission (commit, push, PR) to cleanup (merge check, sync main, delete branch). Use when you have finished work on a branch or when a PR has been merged and you need to clean up.
- Commits and pushes
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- github-issue-managerSkill
- release-managerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this when you have finished implementation on a branch and are ready for review.
- Distinctive: line 22
Use this after your Pull Request has been merged on GitHub.
- Very specific: line 30
Ensure gh CLI is authenticated.
- Very specific: line 45
Analyze Report: Read results in .gemini/skills/git-workflow-lifecycle/evals/reports/latest_submit_results.json.
- Very specific: line 46
Self-Correction: If the PR is missing or not linked, attempt to fix the PR body using gh pr edit.
- Distinctive: line 52
Self-Correction: If branches remain, manually delete them (git branch -D or git push origin --delete) and ensure you are on main.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Workflow Lifecycle
This skill manages the transition of code from a local development branch to GitHub and the subsequent cleanup once the work is merged.
Workflows
1. Submit Work
Use this when you have finished implementation on a branch and are ready for review.
- Action: Stages all changes, commits with a message, pushes to origin, and creates a GitHub Pull Request.
- Linkage: Automatically adds "Closes #XX" if an issue number is detected in the branch name.
python3 .gemini/skills/git-workflow-lifecycle/scripts/submit_work.py --message "feat: description of work"2. Cleanup Branch
Use this after your Pull Request has been merged on GitHub.
- Action: Verifies the PR is merged, switches to
main, pulls latest updates, and deletes both local and remote branches.
python3 .gemini/skills/git-workflow-lifecycle/scripts/cleanup_branch.pyInstructions
- Ensure
ghCLI is authenticated. - The
submit_work.pyscript will prompt for a commit message if--messageis omitted. - The
cleanup_branch.pyscript will warn you if the PR is not yet merged before proceeding with deletion.
Scripts
scripts/submit_work.pyscripts/cleanup_branch.py
Self-Evaluation & Correction
You MUST autonomously verify every git workflow task:
1. Verify Submission
Immediately after running submit_work.py:
- Run Evaluation Suite:
python3 .gemini/skills/git-workflow-lifecycle/evals/runner.py submit <branch_name> - Analyze Report: Read results in
.gemini/skills/git-workflow-lifecycle/evals/reports/latest_submit_results.json. - Self-Correction: If the PR is missing or not linked, attempt to fix the PR body using
gh pr edit.
2. Verify Cleanup
Immediately after running cleanup_branch.py:
- Run Evaluation Suite:
python3 .gemini/skills/git-workflow-lifecycle/evals/runner.py cleanup <branch_name> - Analyze Report: Read results in
.gemini/skills/git-workflow-lifecycle/evals/reports/latest_cleanup_results.json. - Self-Correction: If branches remain, manually delete them (
git branch -Dorgit push origin --delete) and ensure you are onmain.
<AVAILABLE_RESOURCES>
- Evaluation Runner:
.gemini/skills/git-workflow-lifecycle/evals/runner.py</AVAILABLE_RESOURCES>
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.

