Unified git workflow for branch-first development: status/diff review, security-first commits,
worktrees, and PR creation/review via gh.
Auto-activates on: "commit", "push", "branch", "worktree", "pr", "pull request", "merge", "rebase", "git".
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
If you want a different location (e.g. ../.worktrees or ~/worktrees/<repo>), update WORKTREES_DIR above and follow the same shape in references/worktree-workflow.md.
Resilience Rules (Worktrees)
If multiple worktree root folders are detected (example: both ./.worktrees/ and ../repo-feature-x/ exist), do not delete anything by default.
Prefer consolidating into WORKTREES_DIR using git worktree move (when possible) or a remove+re-add plan.
If stale metadata exists, propose a cleanup plan: git worktree prune + remove/quarantine orphan directories (with confirmation).
Global Safety Rules (Never Violate)
Never force push to main/master.
Never commit secrets (env files, keys, credentials).
Never rewrite history that is already pushed unless explicitly requested.
Always show what will change before an irreversible action.
Confirmation Policy
Read-only commands are always OK.
Everything that changes state/history/remote requires explicit user confirmation:
git add, git commit, git push
git merge, git rebase, git reset, git revert
git worktree add, git worktree remove
git tag (create/delete)
git branch -d/-D
Quick Start
# Read-only
git status
git diff
# Commit
git diff --cached
git commit -m "feat(scope): why"# Worktrees
git worktree list