commit-phase
Skill6 starsChanged 8 months agoMITView on GitHub
Complete git workflow for a phase - branch, commit, merge, cleanup
- Commits and pushes
In this repository13 other files it gives its agents.
- ai-governanceSkill
- comprehensive-testSkill
- diagnoseSkill
- execute-phaseSkill
- harmonizeSkill
- ideation-complexSkill
- ideation-researchSkill
- ideation-simpleSkill
- ideation-synthesizeSkill
- kickoffSkill
- plan-phaseSkill
- tech-stackSkill
- verifySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run the following checks before committing.
- Very specific: line 23
If naming_conventions.md exists in project root:
- Distinctive: line 29
Use judgment about which conventions apply to which file types
- Distinctive: line 33
If issues found, ask: "Fix now or proceed anyway?"
- Distinctive: line 34
If proceeding with issues, append to commit message: "Note: Convention issues deferred - see harmonize-report.md"
- Very specific: line 39
If staged files touch src/lib/db/schema/ or drizzle/migrations/:
- Distinctive: line 45
PASS: All expected tables found — report the count and proceed
- Distinctive: line 46
If BLOCKING issues found, ask: "Apply pending migrations first, or proceed anyway?"
- Distinctive: line 47
If proceeding with issues, note it in the commit message
- Very specific: line 51
Check current branch: If on main or staging, create feature branch: git checkout -b phase-$ARGUMENTS-implementation
- Distinctive: line 54
Commit with message: "Phase $ARGUMENTS: [brief description of phase deliverables]"
- Very specific: line 57
Check if a staging branch exists: git branch -a | grep staging
- Distinctive: line 58
If staging exists, ask: "Merge to staging (preview/test) or main (production)?"
- Distinctive: line 59
If no staging branch exists, merge to main (current behavior)
- Distinctive: line 65
Use implementation_plan.md to reference what this phase delivered for the commit message.
- Very specific: line 69
After merge is complete, delete phase{$ARGUMENTS}_plan.md if it exists.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Commit Phase
Complete git workflow for Phase $ARGUMENTS:
Step 0: Pre-Commit Checks
Run the following checks before committing.
If you're thinking... Do this instead "Naming conventions are fine, I followed them during build" That's what the check verifies. If you followed them, it takes 5 seconds. "I'll merge to main, staging is overkill for this" Ask the user. Merge target is their decision, not yours. "The plan file is still useful, I'll keep it" Used plans are noise. Delete it. The implementation plan and git history are the record.
0a: Naming Convention Check
If naming_conventions.md exists in project root:
- Identify the project's primary language/framework from project files
- Get changed source files relevant to that stack:
git diff --name-only HEAD - For each changed file, verify it follows the conventions documented in naming_conventions.md
- Focus on naming consistency, test selectors, and patterns defined in the conventions
- Use judgment about which conventions apply to which file types
- Report findings:
- BLOCKING: Issues that will likely break tests or cause runtime errors
- WARNING: Inconsistencies that deviate from documented conventions
- If issues found, ask: "Fix now or proceed anyway?"
- If proceeding with issues, append to commit message: "Note: Convention issues deferred - see harmonize-report.md"
0b: DB Integration Check
If staged files touch src/lib/db/schema/ or drizzle/migrations/:
- Run:
npx vitest run src/lib/db/integration.test.ts - Report findings:
- BLOCKING: Any table missing from the live DB (migration not applied)
- BLOCKING: DATABASE_URL not set or DB unreachable
- PASS: All expected tables found — report the count and proceed
- If BLOCKING issues found, ask: "Apply pending migrations first, or proceed anyway?"
- If proceeding with issues, note it in the commit message
Steps 1-5: Git Workflow
- Check current branch: If on main or staging, create feature branch:
git checkout -b phase-$ARGUMENTS-implementation - Stage all changes:
git add . - Commit with message: "Phase $ARGUMENTS: [brief description of phase deliverables]"
- Push branch:
git push -u origin phase-$ARGUMENTS-implementation - Merge target — ask user before merging:
- Check if a
stagingbranch exists:git branch -a | grep staging - If staging exists, ask: "Merge to staging (preview/test) or main (production)?"
- If no staging branch exists, merge to main (current behavior)
- Execute:
- If staging:
git checkout staging && git merge phase-$ARGUMENTS-implementation && git push - If main:
git checkout main && git merge phase-$ARGUMENTS-implementation && git push
- If staging:
- Return to the feature branch after merge:
git checkout phase-$ARGUMENTS-implementation
- Check if a
Use implementation_plan.md to reference what this phase delivered for the commit message.
Step 6: Clean Up Plan File
After merge is complete, delete phase{$ARGUMENTS}_plan.md if it exists. Just delete it locally - do NOT commit or push this deletion separately. It will be included in the next phase's commit naturally.
Benefits of This Workflow
- Traceability: Each phase has its own branch in git history
- Rollback capability: Can revert the merge commit if needed
- Clear audit trail: Feature branches document what changed per phase
- Quality gate: Naming conventions checked before merge
When to Use
- Phase implementation is complete and tested
- User says "commit phase X", "finish phase X", "wrap up phase X"
- User says "phase X is done", "let's commit this phase", "finish up phase X"
- Ready to merge completed work to main
When NOT to Use
- Work is incomplete or tests are failing
- Still in the middle of implementing (continue with
/execute-phase) - Just want a regular commit (use git directly)
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.

