一键导入
safe-push
Use when about to push to any git remote -- runs large-file, test, uncommitted-change, and diverged-history checks before pushing
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when about to push to any git remote -- runs large-file, test, uncommitted-change, and diverged-history checks before pushing
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create, review, audit, and list Architectural Decision Records for any software project. Trigger on: "create an ADR", "document this decision", "ADR for...", "what ADRs exist", "review this ADR", "update INDEX.md", architectural trade-offs, or design pivots affecting multiple layers or files. Project-agnostic -- works with any tech stack. Backed by Karpathy principles: think before deciding, simplest sufficient ADR, surgical scope.
Audit Codex skills for visibility flags, deterministic vs non-deterministic steps, and composability opportunities. Reads .Codex/skills/ (or a user-specified path), produces a punch list per skill, then shows proposed rewrites with a changelog. Trigger on: "audit my skills", "review my skill files", "which skills auto-fire?", "find duplicated logic in my skills", "should any skills be internal-only?", or any request to review, improve, or rationalize a set of SKILL.md files. Never modifies any file -- proposes changes and waits for approval.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Decision guide for delegating to caveman-style subagents. Tells the main thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder` (1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the work inline or using vanilla `Explore`. Subagent output is caveman-compressed so the tool-result injected back into main context is ~60% smaller -- main context lasts longer across long sessions. Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer", "save context", "compressed agent output".
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
Compress natural language memory files (AGENTS.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"
| name | safe-push |
| version | 2.0 |
| category | utilities |
| execution_speed | fast |
| token_efficiency | high |
| triggers | ["about to push","git push checks","large-file check","test suite check","push validation"] |
| cache_key | safe-push-2.0 |
| dependencies | [] |
| description | Use when about to push to any git remote -- runs large-file, test, uncommitted-change, and diverged-history checks before pushing |
| disable-model-invocation | true |
Run these checks in order before pushing to any remote. Stop and report if any check fails; never push until the user resolves a blocking issue.
Windows (PowerShell):
git ls-files | ForEach-Object { Get-Item $_ -ErrorAction SilentlyContinue } |
Where-Object { $_.Length -gt 52428800 } |
Select-Object FullName, @{Name='MB';Expression={[math]::Round($_.Length/1MB,1)}} |
Format-Table
Unix (bash):
git ls-files | xargs -I{} du -b {} 2>/dev/null | awk '$1 > 52428800 {print $2, int($1/1048576)"MB"}' | sort -rn
If any tracked file exceeds 50 MB: STOP. Report the filenames and sizes. Do not push until the user resolves the issue (add to .gitignore, use Git LFS, or remove from history).
Check package.json (or Makefile, pyproject.toml, etc.) for a test command. Run it. If tests fail: STOP and report. Do not push until tests pass. If no test command exists, note that and continue.
git status --short
If modified or untracked files exist that the user likely intended to include (i.e., they touch the same areas as recent commits), ask before proceeding.
git fetch --dry-run 2>&1
git status -b
If the branch has diverged from the remote (shows "have X and Y different"): ask the user explicitly:
"The branch has diverged from remote. Force-push? (yes/no)"
If the answer is not an explicit "yes": STOP immediately. Never force-push without explicit confirmation.
git push
If the repo has a GitHub remote, report the PR URL:
gh pr view --web 2>/dev/null || gh pr create --draft
Report: branch pushed, commits ahead count, PR URL if available.