/lstack:auto-pushfrom lstack
Stages all changes, generates a commit message, runs safety checks for secrets and large files, then pushes to remote. Useful for quick one-shot commits when confident all changes belong together.
Ships in lstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
CAUTION: Stage ALL changes, commit, and push to remote. Use only when confident all changes belong together.
Trigger this skill when the user asks to "commit and push everything", "auto-push", or otherwise wants a one-shot stage-commit-push for the current working tree. Skip when they want PRs, code review, releases, or tags.
git is installed and the current directory is inside a git repository.origin remote exists, and the user can push to it.git config user.name and user.email are set, so git commit can run.Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If the working tree is not clean, stash first, sync, then restore:
git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash pop
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
Run in parallel:
git status - Show modified/added/deleted/untracked filesgit diff --stat - Show change statisticsgit log -1 --oneline - Show recent commit for message style❌ Record a finding if detected:
.env*, *.key, *.pem, credentials.json, secrets.yaml, id_rsa, *.p12, *.pfx, *.cer*_API_KEY, *_SECRET, *_TOKEN variables with real values (not placeholders like your-api-key, xxx, placeholder)>10MB without Git LFSnode_modules/, dist/, build/, __pycache__/, *.pyc, .venv/.DS_Store, thumbs.db, *.swp, *.tmpAPI Key Validation: Check modified files for patterns like:
OPENAI_API_KEY=sk-proj-xxxxx # ❌ Real key detected!
AWS_SECRET_KEY=AKIA... # ❌ Real key detected!
STRIPE_API_KEY=sk_live_... # ❌ Real key detected!
# ✅ Acceptable placeholders:
API_KEY=your-api-key-here
SECRET_KEY=placeholder
TOKEN=xxx
API_KEY=<your-key>
SECRET=${YOUR_SECRET}
✅ Also check:
.gitignore: no path from git status --porcelain matches a secret, build-artifact, or temp-file pattern above. If one does, record it as a finding and suggest the .gitignore entry.git diff --name-only --diff-filter=U prints nothing. If it prints a path, record a finding.main or master, record a finding.*_API_KEY, *_SECRET, or *_TOKEN value in the changed files is a placeholder. If one is a real value, record a finding.Each match in the first list above is also a finding. A safety check fails when it records at least one finding.
Proceeding now line./auto-push..gitignore.📊 Changes Summary:
- X files modified, Y added, Z deleted
- Total: +AAA insertions, -BBB deletions
🔒 Safety: ✅ No secrets | ✅ No large files | ⚠️ [warnings]
🌿 Branch: [name] → origin/[name]
Proceeding now: git add . → commit → push
Run this step only when no blocking finding from Step 3 remains, so git add . never stages a secret or a large file. Run sequentially:
git add .
git status --porcelain
Check that every path listed in Step 1 is now staged. If a path is missing, or a path appears that the safety checks did not cover, stop and report it.
Write a conventional commit (feat, fix, docs, style, refactor, test, chore, perf, build, ci) whose subject matches the casing and tense of the recent commits from Step 1 and stays within 72 characters. Add a short bulleted body when the change spans several concerns.
git commit -m "$(cat <<'EOF'
[Generated commit message]
EOF
)"
git push
git log -1 --oneline --decorate
git commit fails (for example, a pre-commit hook), print the hook output and stop. Do not retry.git push is rejected as non-fast-forward, run git pull --rebase && git push once. If the rebase conflicts or the second push fails, stop and report.git push succeeds, check that git log -1 --oneline --decorate shows the new commit on origin/[branch].Print the report shown in Expected Output. It opens with the status, then:
git log verification).The final report is plain text in this fixed form. If the user asks for another format, keep the four parts in the same order.
On success:
✅ Successfully pushed to remote!
Commit: abc1234 feat: add login page with OAuth support
Branch: feature/auth → origin/feature/auth
Files changed: 4 (+112, -8)
Evidence: safety scan 0 findings · git push exit 0 · origin/feature/auth at abc1234
Uncertainty: CI and remote hooks not run; API-key check is pattern-based
Decision: No approval needed.
When a safety check fails:
❌ Push blocked — secrets detected
.env: OPENAI_API_KEY=sk-proj-xxxxx (real key)
Evidence: safety scan 1 finding; nothing staged, committed, or pushed
Uncertainty: API-key check is pattern-based; if this value is a placeholder or test fixture, say it is a false positive to continue
Decision: Remove the key from the change and rotate it, then re-run /auto-push. A real secret cannot be confirmed to continue.
The skill run is successful when all of the following hold:
git fetch ran; rebase clean or stash/pop completed without conflicts)main/master)git push exited 0 and git log -1 shows the new commit on the remote-tracking refWhen grading a run, also check that a reader can use the report:
git log output, a finding's file path). A clean safety scan does not mean the push succeeded.Agent inspection cannot confirm that a human understood the report. If no human feedback was given, report human understanding as unconfirmed.
For the edge-case table, per-phase step-completion report format, error-handling guidance, and alternative workflows (selective staging, interactive git add -p, PR flow), see references/edge-cases-and-reports.md. Print a step completion report from that file after each step.
Optional and propose-only. After the run's result is delivered, run this check:
references/ (the directory holding this SKILL.md). Bump the patch number of metadata.version. If the skill is an installed copy or tracked in git, say so. Commit nothing unless the user asks.Off — the user opted out.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub luongnv89/skills --plugin lstack20 skills in this plugin
/agent-configCreate, update, or audit AGENTS.md (default) or CLAUDE.md agent instructions: set up, prune, add a rule, or merge CLAUDE.md or .cursorrules into one file Claude Code, Codex, and Cursor all read. Don't use for READMEs, skills, or subagents./cleanup-projectPrepare a git repo before new work: review uncommitted changes, fix .gitignore, delete merged branches, end on clean main, or inspect one branch before deciding. Don't use for dead code, commit-and-push, releases, LICENSE files, or git how-tos./cli-builderBuild production-quality CLIs with language detection and a five-step approval-gated workflow. Use when wrapping an existing module or app. Don't use for GUI/TUI apps, web APIs, or one-off shell scripts./code-analysis-setupPlan, then install on approval, free static analysis (lint, SAST, secrets, deps) across repos, merged into existing hooks and CI. Use when adding code analysis. Don't use for one-repo security stacks (security-setup) or CI/CD (devops-pipeline)./code-reviewReview or improve code in four modes: bug/security review (default), performance, clean-code audit, slop cleanup (mode:review|perf|clean|cleanup). Don't use for features, tests (test-coverage) or a full comment audit (comment-audit)./comment-auditAudit every code comment in a repo or path: sort as Tautology, Excuse, Stale or Decision Record, act on each after approval, ratchet a comment ban, and estimate lines shed. Don't use for slop cleanup (code-review) or writing docs.Other plugins' skills for the same job