skill/git-management/SKILL.md
Unified git management skill that orchestrates the full feature-branch lifecycle — create, commit, push, PR, merge, cleanup — for both AI agents and human operators.
npx skillsauth add sorratheorc/sorraagents git-managementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Unified git management skill that orchestrates the full feature-branch lifecycle for AI agents and human operators.
Provide a deterministic, safe, and auditable set of git operations covering the complete feature-branch lifecycle:
/skill:git-management <action>
Where <action> is one of:
| Action | Description |
|--------|-------------|
| create-branch <work-item-id> <short-desc> | Create and check out a canonical feature branch |
| commit --message <msg> --work-item <id> [--all] [--dry-run] | Stage and commit with conventional format |
| push [--remote <name>] [--into-dev] [--dry-run] | Push current branch with safety checks |
| create-pr [--base <branch>] [--title <title>] | Create a GitHub PR from the current branch |
| merge-pr <pr-number> [--delete-source] | Merge an approved PR with CI checks |
| cleanup [--dry-run] [--days <n>] | Post-merge branch pruning |
| workflow <work-item-id> <short-desc> [--dry-run] [--phase <name>] | Full lifecycle orchestration |
| help | Print this documentation |
--force or equivalent is rejected with a non-zero exit status.main, master, or HEAD are always rejected.isBranchBlocked() from skill/ship/scripts/git-helpers.js for validation.wl-<work-item-id>-<short-desc>.makeBranchName() from skill/ship/scripts/git-helpers.js for generation.validateBranchName() for validation.merge-pr verifies CI/status checks before merging.All scripts in skill/git-management/scripts/ follow these conventions:
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | General error (missing arguments, invalid state) |
| 2 | Safety violation (protected branch, force-push request) |
| 3 | Prerequisite not met (missing git, gh, wl, or dirty worktree) |
--json is passed, the primary result is JSON on stdout.success (boolean), and on failure,
error (string) and optionally code (exit code category).| Flag | Description |
|------|-------------|
| --dry-run | Validate and plan without mutating the repository |
| --json | Output structured JSON instead of human-readable text |
| --verbose | Include detailed debugging output |
| --quiet | Suppress non-error output |
Each script checks its prerequisites before performing operations:
create-branch: requires git, valid work-item ID formatcommit: requires git, non-empty worktree changes (unless --all with no changes is allowed)push: requires git, valid branch name, remote configuredcreate-pr: requires git, gh CLI, authenticated GitHub sessionmerge-pr: requires git, gh CLI, valid PR numbercleanup: requires git, access to cleanup infrastructure scriptsworkflow: requires all prerequisites for the phases it will executeThis skill delegates to existing scripts where possible:
skill/ship/scripts/git-helpers.js (makeBranchName, validateBranchName, isBranchBlocked)skill/ship/scripts/ship.js (validatePushTarget, validateForcePush, pushToDev, pushToBranch)skill/cleanup/scripts/ (Python cleanup scripts)This skill does NOT duplicate the logic in these modules; it wraps and orchestrates them.
| Script | Purpose |
|--------|---------|
| scripts/create-branch.mjs | Create and check out a canonical feature branch |
| scripts/commit.mjs | Stage changes and commit with conventional format |
| scripts/push.mjs | Push to remote with safety checks |
| scripts/create-pr.mjs | Create a GitHub Pull Request |
| scripts/merge-pr.mjs | Guarded merge with CI verification |
| scripts/cleanup.mjs | Delegate to cleanup infrastructure |
| scripts/workflow.mjs | Full lifecycle orchestration |
| scripts/git-mgmt-helpers.mjs | Shared helpers for script I/O, argument parsing, and output formatting |
agent/patch.md): Respects the ask-first policy for push operations.
The push script can be invoked in dry-run mode for review before execution.agent/ship.md): Provides scripted implementations of the
branch/PR workflows described in the Ship agent documentation.testing
Automated batch planning for intake_complete work items. Discovers all items in intake_complete status and invokes /plan for each sequentially, producing a summary report.
development
Canonical push-to-dev and branch-policy enforcement for agents. Provides the push-to-dev workflow, branch naming, conflict handling, and release process guidance. Trigger with: /skill:ship push-to-dev
development
Write tests, docs and code for a single, specific Worklog work item. Unlike the `implement` skill, this skill operates on exactly one work-item without using `wl next` for recursive dependency resolution or sub-task discovery. It is designed to be invoked by Ralph's per-child loop so that each child is implemented, audited, and remediated independently. Trigger on user queries such as: 'implement-single <work-item-id>', 'complete <work-item-id> (single)', or when Ralph delegates a single-child implement step.
testing
Run an iterative implement→audit loop for a target work item. Ralph is a launcher/orchestrator, not the normal Worklog implementation workflow.