From git-agent
Use when the user asks to ship changes, commit and create a PR or MR, commit push and PR, ship it, send it, or land their work. Chains commit + push + pull/merge request into one flow. Supports GitHub (gh) and GitLab (glab). Use commit-agent for commit only or pr-agent for PR only.
npx claudepluginhub shawn-sandy/agentics --plugin git-agentThis skill is limited to using the following tools:
Stage, commit, push, and create a pull/merge request in one flow. Supports
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Stage, commit, push, and create a pull/merge request in one flow. Supports
GitHub (gh) and GitLab (glab). Follow these steps in strict order. STOP
immediately after step 8.
Run all checks before any mutation. Stop on the first failure.
Clean working tree: Run git status. If nothing to commit, output: "Nothing
to ship — working tree is clean." and STOP.
Detached HEAD: Run git branch --show-current. If the output is empty,
output: "Cannot ship: repository is in detached HEAD state. Checkout a branch
first." and STOP.
On main or master: If the current branch is main or master, output:
"Cannot ship from the default branch. Switch to a feature branch first." and
STOP.
Detect platform: Run git remote get-url origin. Determine the platform
from the URL:
github.com → GitHub (use gh commands below)gitlab.com or gitlab → GitLab (use glab commands below)gh --version then
glab --version. Use whichever is installed.CLI not available or not authenticated:
For GitHub: run gh auth status. If gh is not installed or returns an auth
error, output:
GitHub CLI is required. Install it from https://cli.github.com/ and run `gh auth login`.
and STOP.
For GitLab: run glab auth status. If glab is not installed or returns an
auth error, output:
GitLab CLI is required. Install it from https://gitlab.com/gitlab-org/cli and run `glab auth login`.
and STOP.
Run git add -A to stage all changes.
This trusts .gitignore to exclude sensitive or generated files. The user is
responsible for .gitignore correctness.
Run git diff --staged to inspect all staged changes.
Write a conventional commit message:
<type>(<scope>): <description>
Rules:
feat, fix, docs, refactor, test, chore, perf, style,
ci, buildplugins/git-agent →
plugins/git-agent)Run:
git commit -m "<message>"
Output the commit hash and message on success.
If a pre-commit hook fails: report the hook's output verbatim and STOP.
Do not retry. Do not use --no-verify. Do not modify the staged files. Let the
user fix the issue.
Run:
git rev-parse --abbrev-ref --symbolic-full-name @{u}
If the command exits non-zero (no upstream tracking ref), run:
git push -u origin <current-branch>
If the command exits zero (upstream exists), run:
git push
For GitHub, run:
gh pr view --json url
For GitLab, run:
glab mr view --output json
If a PR/MR already exists, output: "Pushed to existing PR/MR: " and STOP. The new commit is already on the remote.
Run:
git symbolic-ref refs/remotes/origin/HEAD
Strip the refs/remotes/origin/ prefix to get the base branch name. If this
command fails, fall back to main, then master (try
git rev-parse --verify main to confirm existence before falling back).
Gather content:
git log <base>..HEAD --oneline
git diff <base>...HEAD --stat
Title: short summary of the branch's changes (≤ 70 characters), imperative mood.
Body: use this structure:
## Summary
- <bullet 1>
- <bullet 2>
## Changes
<brief description of what changed and why>
For GitHub, run:
gh pr create --title "<title>" --body "<body>"
For GitLab, run:
glab mr create --title "<title>" --description "<body>"
Output the PR/MR URL and STOP.
STOP here. Do not analyze code, run tests, review the diff, suggest follow-up tasks, or take any further action.