| name | pr-create |
| description | Create a pull request with auto-generated description. Summarizes changes and generates PR body via local LLM (gpt-oss:120b), then creates the PR after user approval. Use this skill when: asked to create a PR; asked to submit changes for review; asked to open a pull request. |
PR Create Skill
Creates a pull request with an auto-generated description using local LLM for summarization and PR body composition.
Step 1: Gather Context (Shell Only, Zero Claude Tokens)
git branch --show-current
git diff main...HEAD --stat
git log main...HEAD --oneline
ls ./docs/archive/review/*-plan.md ./docs/archive/review/*-review.md \
./docs/archive/review/*-deviation.md ./docs/archive/review/*-code-review.md 2>/dev/null
If on main branch, ask the user for the target branch or create one.
Ensure all changes are committed before proceeding.
Step 2: Local LLM Analysis (Zero Claude Tokens)
Summarize changes, classify the PR type, and pre-generate a title:
SUMMARY=$(git diff main...HEAD | bash ~/.claude/hooks/llm-commands.sh summarize-diff)
CATEGORY=$(git diff main...HEAD --name-only | bash ~/.claude/hooks/llm-commands.sh classify-changes)
TITLE=$({ echo "$CATEGORY"; echo '=== OLLAMA-INPUT-SEPARATOR ==='; echo "$SUMMARY"; } \
| bash ~/.claude/hooks/llm-commands.sh generate-pr-title)
printf '%s\n' "$SUMMARY" "$CATEGORY" "$TITLE"
If Ollama is unavailable, proceed to Step 3 without pre-analysis.
Step 3: Local LLM PR Body Generation (Zero Claude Tokens)
{
echo "=== COMMIT LOG ==="
git log main...HEAD --oneline
echo
echo "=== DIFF STAT ==="
git diff main...HEAD --stat
echo
for f in ./docs/archive/review/*-plan.md ./docs/archive/review/*-review.md \
./docs/archive/review/*-deviation.md ./docs/archive/review/*-code-review.md; do
[ -f "$f" ] || continue
echo "=== $f ==="
cat "$f"
echo
done
} | bash ~/.claude/hooks/llm-commands.sh generate-pr-body
If Ollama is unavailable, compose the PR body directly as fallback.
Step 4: Review, Approve, and Create
Present the draft PR to the user:
=== PR Draft ===
Title: [TITLE from Step 2, or a short title from change type + summary if Ollama was unavailable]
Base: main
Head: [current branch]
[PR body]
After user approval (allow editing the title and body):
gh pr create --title "[title]" --body "$(cat <<'EOF'
[PR body]
EOF
)"
Report the PR URL to the user.