一键导入
push-and-pr
Consolidates git push and PR/MR creation into a single efficient operation, eliminating 5-8 wasted tool calls per implementation cycle
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Consolidates git push and PR/MR creation into a single efficient operation, eliminating 5-8 wasted tool calls per implementation cycle
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | push-and-pr |
| description | Consolidates git push and PR/MR creation into a single efficient operation, eliminating 5-8 wasted tool calls per implementation cycle |
| when_to_use | Invoke after implementing changes and committing to push and create PR. Triggers on: "push and pr", "create pr", "open pr", "git push pr". Replaces manual git push + gh pr create / glab mr create calls. |
| user-invocable | true |
| allowed-tools | ["Bash(python3 .claude/skills/push-and-pr/scripts/push_and_pr_operations.py *)","Read"] |
Before creating the PR, check if the repo has a PR template and use it to structure the body.
Step 1 — Discover template:
python3 .claude/skills/push-and-pr/scripts/push_and_pr_operations.py --find-template 2>&1
Step 2 — Fill template sections:
If a template was found, fill in each section before passing as <PR_BODY>:
<!-- ... -->) and replace with actual content.[KEY](url).[x], leave others [ ].Step 3 — Push and create PR:
python3 .claude/skills/push-and-pr/scripts/push_and_pr_operations.py "<PR_TITLE>" "<PR_BODY>" 2>&1
Use --dry-run to preview without executing:
python3 .claude/skills/push-and-pr/scripts/push_and_pr_operations.py "<PR_TITLE>" "<PR_BODY>" --dry-run 2>&1
The script executes 4 operations in sequence:
Checks for project-repos.json in current directory or parent. If not found, inspects git remotes:
Uses gh/glab CLI as credential helper:
git -c credential.helper='!gh auth git-credential' pushgit -c credential.helper='!glab auth git-credential' pushNo API tokens needed - relies on existing gh/glab CLI authentication.
Fail-fast approach: if any operation fails, execution stops immediately and reports the error.
Consolidates post-PR-creation bookkeeping (task updates, JIRA transitions, Slack notifications, learning storage) into a single efficient operation
Slack daily digest management. Send daily digest of queued notifications or trigger a status update for a specific ticket. Routes through memory-server MCP for deduplication and digest support.
Consolidates ticket claiming operations (assign, transition, add to sprint, track) into a single efficient operation, reducing ~10 tool calls per new-work cycle
Send Slack notification. Reads SLACK_WEBHOOK_URL from env, calls memory-server MCP slack_notify w/ webhook_url. No-ops if webhook not configured.
Post-merge bookkeeping for completed PRs. Archives task, transitions Jira to "Release Pending", posts Jira comment, sends Slack notification, deletes bot branches (remote + local). Handles already-deleted branches gracefully.
Auto-fork repos + update config. Scans project-repos.json for missing forks → forks via gh/glab → updates config → commits.