agentleFS
takleb3rrytakleb3rry/claude-global-appbuilding-skills/skills/commit-phase/SKILL.md

commit-phase

Skill6 starsChanged 8 months agoMITView on GitHub

Complete git workflow for a phase - branch, commit, merge, cleanup

  • Commits and pushes

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
  1. Distinctive:

    Run the following checks before committing.

    line 13
  2. Very specific:

    If naming_conventions.md exists in project root:

    line 23
  3. Distinctive:

    Use judgment about which conventions apply to which file types

    line 29
  4. Distinctive:

    If issues found, ask: "Fix now or proceed anyway?"

    line 33
  5. Distinctive:

    If proceeding with issues, append to commit message: "Note: Convention issues deferred - see harmonize-report.md"

    line 34
  6. Very specific:

    If staged files touch src/lib/db/schema/ or drizzle/migrations/:

    line 39
  7. Distinctive:

    PASS: All expected tables found — report the count and proceed

    line 45
  8. Distinctive:

    If BLOCKING issues found, ask: "Apply pending migrations first, or proceed anyway?"

    line 46
  9. Distinctive:

    If proceeding with issues, note it in the commit message

    line 47
  10. Very specific:

    Check current branch: If on main or staging, create feature branch: git checkout -b phase-$ARGUMENTS-implementation

    line 51
  11. Distinctive:

    Commit with message: "Phase $ARGUMENTS: [brief description of phase deliverables]"

    line 54
  12. Very specific:

    Check if a staging branch exists: git branch -a | grep staging

    line 57
  13. Distinctive:

    If staging exists, ask: "Merge to staging (preview/test) or main (production)?"

    line 58
  14. Distinctive:

    If no staging branch exists, merge to main (current behavior)

    line 59
  15. Distinctive:

    Use implementation_plan.md to reference what this phase delivered for the commit message.

    line 65
  16. Very specific:

    After merge is complete, delete phase{$ARGUMENTS}_plan.md if it exists.

    line 69

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Identify the project's primary language/framework from project files
  2. Get changed source files relevant to that stack: git diff --name-only HEAD
  3. 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
  4. Report findings:
    • BLOCKING: Issues that will likely break tests or cause runtime errors
    • WARNING: Inconsistencies that deviate from documented conventions
  5. If issues found, ask: "Fix now or proceed anyway?"
  6. 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/:

  1. Run: npx vitest run src/lib/db/integration.test.ts
  2. 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
  3. If BLOCKING issues found, ask: "Apply pending migrations first, or proceed anyway?"
  4. If proceeding with issues, note it in the commit message

Steps 1-5: Git Workflow

  1. Check current branch: If on main or staging, create feature branch: git checkout -b phase-$ARGUMENTS-implementation
  2. Stage all changes: git add .
  3. Commit with message: "Phase $ARGUMENTS: [brief description of phase deliverables]"
  4. Push branch: git push -u origin phase-$ARGUMENTS-implementation
  5. Merge target — ask user before merging:
    • Check if a staging branch 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
    • Return to the feature branch after merge: git checkout phase-$ARGUMENTS-implementation

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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.