Commit changes

From J-Pster/Psters_AI_Workflow · View interactive version

Commit changes is an AI agent skill from the GitHub repository J-Pster/Psters_AI_Workflow. Commit uncommitted changes across all workspace repos and tag commits with ticket numbers. Each repo gets its own subagent that analyzes files individually, groups them by ticket, and makes multiple focused commits. Use when the user pastes issue text (with TICKET-XXX) and wants to commit, or says "

How to use this skill

Skill file

Commit Changes Skill

Trigger conditions

Use this skill when the user:

What to do

Follow the workflow in commands/commit-changes.md exactly.

Summary of phases

  1. Parse — extract { id: "TICKET-XXX", title: "..." } for each ticket from the pasted text.
  2. Discover repos — git -C <path> status --short for every workspace path; skip empty or non-git. Collect only the list of repos with changes (no diffs at orchestrator level).
  3. Spawn one subagent per repo (all in parallel) — each subagent (generalPurpose, model: fast) reads skills/commit-changes-repo-worker/SKILL.md, fetches per-file diffs itself, classifies each file to the best ticket, groups files by ticket, and makes multiple targeted commits (one per group). Reports back a JSON result with a commits array.
  4. Summarize — parse JSON results from all subagents, print a results table (one row per commit), show total commit count.

Worker skill

Each per-repo subagent follows skills/commit-changes-repo-worker/SKILL.md.

The main agent passes these inputs to each worker:

The worker fetches its own per-file diffs — no diff text is passed from the orchestrator.

Key difference from single-commit approach

The worker never runs git add -A. Instead, for each ticket group it runs:

git -C <REPO_PATH> add -- <file1> <file2> ...
git -C <REPO_PATH> commit -m "<ticket-specific message>"

This produces clean, reviewable git history with one commit per ticket per repo.

Commit message rules (rules/commits.mdc — always enforced)

[TICKET-XXXX] <emoji> <type>(<scope>): <subject>

| Rule | Detail |

|------|--------|

| Language | English only |

| Ticket prefix | [TICKET-XXXX] when a ticket match exists; omit when NONE |

| Emoji | Always include — 🐛 fix, 🚀 feat, ♻️ refactor, 🎨 style, ⚡ perf, ✅ test, 📝 docs, 🔧 chore, 🔒 security, 🚧 wip |

| Type | One of: fix, feat, refactor, style, perf, test, docs, chore, security, wip |

| Mood | Imperative — "add", not "added" / "adds" |

| Subject length | ≤ 50 characters (not counting the [TICKET-XXX] prefix and emoji+type) |

| Ticket position | Prefix only — never inside the subject line itself |

Examples:

[TICKET-727] 🐛 fix(tasks): move back-to-table btn to right side
[TICKET-726] 🐛 fix(text-input): allow clicking inside widget
[TICKET-734] 🐛 fix(tasks): prevent stale WebSocket reconnect error
[TICKET-729] 🚀 feat(projects): demote lead adds them as contributor
🔧 chore(migrations): add project lead contributor column   ← no ticket when unmatched

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.