agentleFS
ngc-shjngc-shj/claude-code-config/skills/pr-create/SKILL.md

pr-create

Skill1 starsChanged 2 months agoMITView on GitHub

Create a pull request with auto-generated description. Summarizes changes and generates PR body via local LLM (llm:think), 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.

  • Commits and pushes

26 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pr-feedback, commit and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dversozaSkill

    pr-feedback

    Address PR review feedback including inline threads, general comments, bot-generated reviews, PR description findings, check run annotations (inline lint/type/security findings shown in the Files changed tab), code scanning alerts, and CI failures. Use when asked to handle, address, resolve, respond to, or work through PR review comments, review feedback, inline findings, or CI check failures. Triggers on requests like "address PR comments", "handle review feedback", "resolve PR reviews", "fix review comments", "go through PR feedback", "check CI failures", "fix the inline findings on the PR".

    Also in 5 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 5 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If on main branch, ask the user for the target branch or create one.

    line 29
  2. Distinctive:

    Ensure all changes are committed before proceeding.

    line 31
  3. Distinctive:

    If Ollama is unavailable, proceed to Step 3 without pre-analysis.

    line 51
  4. Distinctive:

    If Ollama is unavailable, compose the PR body directly as fallback.

    line 74
  5. Distinctive:

    After user approval (allow editing the title and body):

    line 89

“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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)

# Confirm branch and ensure not on main
git branch --show-current

# Get change summary
git diff main...HEAD --stat

# Get commit history
git log main...HEAD --oneline

# Check for review artifacts (plan, review log, deviation log, code review log)
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:

# Summarize the diff
SUMMARY=$(git diff main...HEAD | bash ~/.claude/hooks/llm-commands.sh summarize-diff)

# Classify changes
CATEGORY=$(git diff main...HEAD --name-only | bash ~/.claude/hooks/llm-commands.sh classify-changes)

# Generate a draft title from category + summary
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)

# Aggregate context for generate-pr-body: everything on stdin as one section.
{
  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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.