Ship
Ship staged changes — runs a conventions check, generates a commit message with ticket ID from branch name, commits, and pushes. Use when the user says "ship it", "commit and push", or "send it".From its SKILL.md
npx -y skills add vthinkdeveloper/vthink-agent-toolkit --skill shipAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.7 KB, as published. Nobody here has run it
Ship — Conventions Check + Commit + Push
Overview
This skill is your pre-commit quality gate + shipping workflow. It checks staged files against project conventions, generates a good commit message, commits, and pushes — all in one step.
Workflow
Step 1: Pre-flight Checks
- Run
git statusto see the current state - Run
git diff --cached --name-onlyto get the list of staged files - If no staged files:
- Run
git diff --name-onlyto check for unstaged changes - If unstaged changes exist, show them and ask the user which files to stage using AskUserQuestion
- If no changes at all, tell the user "Nothing to ship — working tree is clean" and stop
- Run
- Run
git rev-parse --abbrev-ref HEADto get the current branch name - Display the staged files to the user
Step 2: Conventions Check on Staged Files
Run a conventions check on the staged files only. This is a lightweight version focused on the files being committed.
2a. Discover project conventions:
Read these sources (skip any that don't exist):
CLAUDE.mdin the project root — explicit architecture, patterns, coding conventions- Linter/formatter configs —
.eslintrc*,.prettierrc*,checkstyle.xml,.editorconfig,pom.xml - For each staged file, read 1-2 existing files of the same type in the same directory to identify local patterns
2b. Analyze staged files:
For each staged file:
- Read the file's full contents
- Run
git diff --cached -- <file>to see what specifically changed - Check the changed lines against applicable conventions
- Focus on the diff — don't flag pre-existing issues in unchanged lines
2c. Report findings:
Present a concise report:
## Pre-commit Conventions Check
**Files:** <count> staged files checked
**Result:** <error-count> errors, <warning-count> warnings, <info-count> info
### Findings (if any)
| File | Severity | Rule | Line(s) | Finding | Fix |
|------|----------|------|---------|---------|-----|
| ... | Error | ... | ... | ... | ... |
Step 3: Gate Decision
- If errors found: Stop. Show the report and tell the user "Fix the errors above before shipping. Run
/shipagain when ready." - If only warnings/info: Show the report, then proceed to commit (warnings don't block)
- If clean: Say "Conventions check passed" and proceed
Step 4: Generate Commit Message
4a. Extract ticket ID from branch name:
Parse the branch name for a ticket ID pattern like PROJ-1234 or FEAT-567:
- Pattern:
[A-Z]+-\d+(e.g.,FEAT-1702fromFEAT-1702-bootstrap-migration) - If no ticket ID found, skip the prefix
4b. Analyze changes for message:
- Run
git diff --cachedto see the full staged diff - Run
git log --oneline -5to see recent commit message style
4c. Draft the commit message:
- If
$ARGUMENTSwas provided, use that as the commit message (still prepend ticket ID) - Otherwise, generate a message that:
- Starts with the ticket ID followed by colon and space (e.g.,
FEAT-1702:) - Summarizes the "why" not the "what"
- Is concise (1-2 sentences)
- Matches the style of recent commits in the repo
- Ends with
Co-Authored-By: Claude <[email protected]>
- Starts with the ticket ID followed by colon and space (e.g.,
4d. Show the commit message to the user and ask for approval using AskUserQuestion with options:
- "Commit with this message" (proceed)
- "Edit message" (let user provide their own)
Step 5: Commit
Run the commit using heredoc format:
git commit -m "$(cat <<'EOF'
TICKET-ID: Summary message here.
Co-Authored-By: Claude <[email protected]>
EOF
)"
Step 6: Push
- Check if the branch has an upstream:
git rev-parse --abbrev-ref @{upstream} 2>/dev/null - If no upstream, push with
-u:git push -u origin <branch-name> - If upstream exists, push:
git push - Show the result to the user
Step 7: Summary
Display a final summary:
Shipped!
- Branch: <branch>
- Commit: <short-hash> <message>
- Pushed to: origin/<branch>
Important Rules
- Never force push. If push fails due to diverged history, stop and tell the user.
- Never amend. Always create new commits.
- Never skip hooks. Don't use
--no-verify. - Don't stage files automatically unless the user explicitly approves which files to stage.
- Respect .gitignore. Don't suggest staging ignored files.
- If the user provided
$ARGUMENTSas a commit message, still run the conventions check — the message override only skips message generation, not the quality gate.