From push
Quality-gated push pipeline. Auto-detects package manager (pnpm/yarn/npm) and runs available scripts (check-types, lint, test, build) in parallel before pushing. Auto-fixes failures in a retry loop, creates a PR, and polls CI. Use when user says "push", "push to remote", "ship it", or invokes /push.
How this skill is triggered — by the user, by Claude, or both
Slash command
/push:pushThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Quality-gated push pipeline. Never let broken code hit the remote.
Quality-gated push pipeline. Never let broken code hit the remote.
Output structured, emoji-prefixed logs throughout:
📋 Step N — Step Name
├─ ✅ Sub-step passed (details)
├─ ⏭️ Sub-step skipped (reason)
├─ ❌ Sub-step failed (error summary)
├─ 🔄 Retrying... (attempt N/3)
└─ 📊 Summary: X passed, Y failed
Track elapsed time for each major step. Output a timing summary at the end.
Run the preflight script to verify environment is ready.
"$CLAUDE_PROJECT_DIR"/.claude/skills/push/scripts/preflight.sh
(If running from a globally installed plugin, the path will be different - detect and use the correct location.)
Checks:
If any check fails, stop and report.
Auto-detect what to run based on what exists in the project.
# Package manager detection
if [ -f "pnpm-lock.yaml" ]; then
PKG="pnpm"
elif [ -f "yarn.lock" ]; then
PKG="yarn"
elif [ -f "package-lock.json" ]; then
PKG="npm"
else
PKG="" # No Node project detected
fi
If no package.json exists, skip Node-specific checks but still run git operations.
Detect available scripts from package.json:
if [ -f "package.json" ]; then
AVAILABLE_SCRIPTS=$(cat package.json | grep -oE '"(check-types|typecheck|lint|test|build)"' | tr -d '"' | tr '\n' ' ')
fi
Log detected setup:
├─ ✅ Package manager: {pnpm|yarn|npm|none}
├─ ✅ Available scripts: {list}
└─ ✅ Project type: {Node/TS | other}
git branch --show-current
git status --short
git log origin/$(git branch --show-current)..HEAD --oneline 2>/dev/null || git log --oneline -5
Capture branch name, uncommitted changes, commits ahead of remote.
If no commits to push AND no uncommitted changes, stop with ⏭️ Nothing to push.
Run all detected gates in parallel. Skip gates for scripts that don't exist.
Available gates (run only if the script exists in package.json):
$PKG run check-types OR $PKG run typecheck (whichever exists)$PKG run lint$PKG run test$PKG run buildAdditionally, run the secret scanner regardless of project type:
"$CLAUDE_PROJECT_DIR"/.claude/skills/push/scripts/secret-scan.sh
Log each gate result as it completes:
├─ ✅ Type check (8.2s)
├─ ✅ Lint (1.1s)
├─ ❌ Tests failed: 2 failures
├─ ✅ Build (12.4s)
└─ ✅ Secret scan
If ANY gate fails, proceed to Step 5 (Auto-Fix). If ALL pass, skip to Step 6.
Iterate up to 3 times.
Fix strategies:
any or @ts-ignore as a shortcut$PKG run lint:fix first (if it exists), then fix remaining errors manuallyAfter each fix iteration, re-run ONLY the failed gates (faster than re-running everything).
If after 3 iterations there are still failures, stop and ask for human intervention.
Do NOT push if gates still fail.
If there are uncommitted changes (original or from auto-fix):
git status --short
git diff --stat
git log --oneline -5 # For commit message style reference
Generate a conventional commit message:
<type>(<scope>): <subject>Stage specific files (not git add -A):
git add <files>
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
<body - why, not what>
Co-Authored-By: Claude <[email protected]>
EOF
)"
NEVER commit files that look like secrets (.env, credentials.json, keys).
BRANCH=$(git branch --show-current)
git push -u origin "$BRANCH"
If push fails due to upstream changes:
git pull --rebase origin "$BRANCH"
Then retry. If rebase has conflicts, stop and ask the user.
Check if PR already exists:
gh pr view --json number,url,state 2>/dev/null
If exists, log the URL and skip creation. If not, create PR targeting main (or master):
gh pr create --base main --title "<title>" --body "$(cat <<'EOF'
## Summary
- <point 1>
- <point 2>
## Changes
- <change 1>
- <change 2>
## Test plan
- [ ] <verification 1>
- [ ] <verification 2>
🤖 Generated with Claude Code
EOF
)"
Poll GitHub Actions until all checks complete:
gh pr checks --watch
Update every 20 seconds.
If CI passes, proceed to Step 10.
If CI fails, auto-fix loop (max 2 iterations):
gh run view --log-failed
After fixing, commit and push (triggers new CI run). Loop back.
If still failing after 2 iterations, stop and report.
Print a timing table with all step durations and statuses.
Final status line with branch, PR URL, and CI status.
--no-verifyany or @ts-ignore = fail, fix properlyProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub colorpulse6/claude-skills --plugin push