From vthink-agent-toolkit
Stage, commit, push, and open a pull request in one workflow. Confirms commit message, PR title, and description before acting. Use when the user says "commit push and PR", "push and raise a PR", or invokes /commit-push-pr.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vthink-agent-toolkit:commit-push-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill handles the full commit → push → PR workflow. It confirms the commit message, PR title, and PR description with the user before doing anything irreversible.
This skill handles the full commit → push → PR workflow. It confirms the commit message, PR title, and PR description with the user before doing anything irreversible.
Run these commands in parallel:
git status — see staged, unstaged, and untracked files (never use -uall)git diff — see unstaged changesgit diff --cached — see already-staged changesgit log --oneline -5 — see recent commit style for message consistencygit branch --show-current — identify the current branchgit remote get-url origin — identify the remoteIf there are no changes, inform the user and stop.
Check that gh is authenticated: run gh auth status. If not authenticated, tell the user to run gh auth login and stop.
git add with specific file paths..env, credentials.json, *.key, *.pem). Warn the user and skip them.git add -A or git add ..Analyze git diff --cached and draft a commit message following Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/).
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
| Type | When to use |
|---|---|
feat | A new feature |
fix | A bug fix |
docs | Documentation only |
style | Formatting, whitespace — no logic change |
refactor | Code restructuring, no feature or fix |
perf | Performance improvement |
test | Adding or updating tests |
build | Build system or dependency changes |
ci | CI configuration changes |
chore | Maintenance, no src/test changes |
! after type/scope and a BREAKING CHANGE: footerCo-Authored-By: Claude <[email protected]>
Mandatory. Use AskUserQuestion to show the proposed message and get approval.
Options: "Use this message" / "Edit message" (user types their own).
Do NOT commit without explicit approval.
git commit -m "$(cat <<'EOF'
<approved message>
Co-Authored-By: Claude <[email protected]>
EOF
)"
If a pre-commit hook fails: report the error, do NOT use --no-verify, fix and create a NEW commit (never amend).
git rev-parse --abbrev-ref @{upstream}git push -u origin <branch-name>git pushIf the push is rejected, inform the user and suggest next steps. Do NOT force-push without explicit approval.
Run:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
Also check if a develop branch exists:
git branch -r | grep -E 'origin/(develop|main|master)'
Use this priority to pick the base branch:
develop — if it exists on the remotemain — if it existsmaster — fallbackDerive the PR title from the commit message subject line (the first line).
For the description, analyze the full diff (git log <base>..<current-branch> --oneline and git diff <base>..HEAD) and generate:
## Summary
- [bullet points describing what changed and why]
## Test plan
- [ ] [specific things a reviewer should verify, based on the actual changes]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Tailor the test plan to the actual changes — don't use generic placeholders.
Mandatory. Show the proposed PR title and description and ask for approval before creating the PR.
Use AskUserQuestion:
"Here's the PR I'll open against
[base branch]:Title: [proposed title]
Description: [proposed description]
Does this look good?"
Options:
Do NOT create the PR without explicit user approval.
gh pr create \
--base <base-branch> \
--title "<approved title>" \
--body "<approved description>"
Use a HEREDOC for the body to preserve formatting:
gh pr create --base <base-branch> --title "<approved title>" --body "$(cat <<'EOF'
<approved description>
EOF
)"
After a successful PR creation, report:
✅ Done!
Commit: <short hash> — <commit subject>
Branch: <branch> → <base-branch>
PR: <PR URL>
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub vthinkdeveloper/vthink-agent-toolkit --plugin vthink-toolkit