claude-configs/commands/commit-push-pr.md
Cal Corum 8642bb539a Migrate Gitea ops to MCP, update Paper Dynasty skill, sync plugins
- CLAUDE.md + commit-push-pr: prefer gitea-mcp over tea CLI
- Paper Dynasty: updated api_client, cli, distribute_packs
- New skill: resume-tailoring
- Plugins: updated marketplaces, blocklist, install counts
- Settings and MCP config updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:59:49 -06:00

33 lines
1.8 KiB
Markdown

---
allowed-tools: Bash(git checkout:*), Bash(git add:*), Bash(git status:*), Bash(git push:*), Bash(git commit:*), Bash(git branch:*), Bash(git remote:*), Bash(git symbolic-ref:*), Bash(git log:*), Bash(gh pr create:*), mcp__gitea-mcp__create_pull_request
description: Commit, push, and open a PR
---
**This command IS explicit approval to commit, push, and create a PR — no need to ask for confirmation.**
## Context
- Current git status: !`git status`
- Current git diff (staged and unstaged changes): !`git diff HEAD`
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -10`
- Remote URL: !`git remote get-url origin`
## Your task
Based on the above changes:
1. If there are no changes, say "Nothing to commit" and stop
2. If on `main` or `master`, create a new feature branch first
3. Stage all relevant changed files (prefer specific files over `git add -A` — avoid secrets, .env, credentials)
4. Create a single commit with a concise message following the repo's existing style (focus on "why" not "what")
5. Include `Co-Authored-By: Claude <model> <noreply@anthropic.com>` where `<model>` is the model currently in use
6. Push the branch to origin with `-u` flag
7. Create a pull request:
- If remote URL contains `github.com` → use `gh pr create --base <default-branch> --title "Title" --body "..."`
- If remote URL contains `git.manticorum.com` or other Gitea host → use `mcp__gitea-mcp__create_pull_request` with `owner`, `repo`, `title`, `body`, `head`, `base`
8. Include a summary section and test plan in the PR body
9. Return the PR URL
You have the capability to call multiple tools in a single response. You MUST do all of the above in a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.