auto-push
20
总安装量
20
周安装量
#17995
全站排名
安装命令
npx skills add https://github.com/luongnv89/skills --skill auto-push
Agent 安装分布
codex
19
opencode
19
claude-code
17
github-copilot
16
kimi-cli
16
gemini-cli
16
Skill 文档
Commit and Push Everything
â ï¸ CAUTION: Stage ALL changes, commit, and push to remote. Use only when confident all changes belong together.
Workflow
1. Analyze Changes
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
2. Safety Checks
â STOP and WARN if detected:
- Secrets:
.env*,*.key,*.pem,credentials.json,secrets.yaml,id_rsa,*.p12,*.pfx,*.cer - API Keys: Any
*_API_KEY,*_SECRET,*_TOKENvariables with real values (not placeholders likeyour-api-key,xxx,placeholder) - Large files:
>10MBwithout Git LFS - Build artifacts:
node_modules/,dist/,build/,__pycache__/,*.pyc,.venv/ - Temp files:
.DS_Store,thumbs.db,*.swp,*.tmp
API 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}
â Verify:
.gitignoreproperly configured- No merge conflicts
- Correct branch (warn if main/master)
- API keys are placeholders only
3. Execute Immediately (No Extra Confirmation)
Present a short summary, then proceed directly when safety checks pass:
ð 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
Do not ask for additional yes/no confirmation after this skill is invoked.
4. Execute
Run sequentially:
git add .
git status # Verify staging
5. Generate Commit Message
Analyze changes and create conventional commit:
Format:
[type]: Brief summary (max 72 characters)
- Key change 1
- Key change 2
- Key change 3
Types: feat, fix, docs, style, refactor, test, chore, perf, build, ci
Example:
docs: Update concept README files with comprehensive documentation
- Add architecture diagrams and tables
- Include practical examples
- Expand best practices sections
6. Commit and Push
git commit -m "$(cat <<'EOF'
[Generated commit message]
EOF
)"
git push # If fails: git pull --rebase && git push
git log -1 --oneline --decorate # Verify
7. Confirm Success
â
Successfully pushed to remote!
Commit: [hash] [message]
Branch: [branch] â origin/[branch]
Files changed: X (+insertions, -deletions)
Error Handling
- git add fails: Check permissions, locked files, verify repo initialized
- git commit fails: Fix pre-commit hooks, check git config (user.name/email)
- git push fails:
- Non-fast-forward:
git pull --rebase && git push - No remote branch:
git push -u origin [branch] - Protected branch: Use PR workflow instead
- Non-fast-forward:
Alternatives
If user wants control, suggest:
- Selective staging: Review/stage specific files
- Interactive staging:
git add -pfor patch selection - PR workflow: Create branch â push â PR (use
/prcommand)
â ï¸ Remember: Always review changes before pushing. When in doubt, use individual git commands for more control.