agentleFS
sjain-stanfordsjain-stanford/claude-workspace/skills/pr-create/SKILL.md

pr-create

Skill2 starsChanged 21 days agoApache-2.0View on GitHub

Create a GitHub pull request for a sub-repo branch with a concise prose description and relevant validation. Use when asked to create a PR, open a pull request, or submit changes for review.

  • Commits and pushes

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pr-feedback, explore and 4 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

  • genomewalkerSkill

    explore

    RLM-style recursive memory exploration - dynamically navigate the memory graph

    Also in 4 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

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 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

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 30 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run git and gh commands from the branch-backed development worktree that owns the change.

    line 26
  2. Distinctive:

    Do not return to the canonical sub-repo to push or create the PR.

    line 28
  3. Distinctive:

    Run these commands in parallel:

    line 32
  4. Distinctive:

    Title: Use the same style as commit messages — concise, imperative mood, under 72 characters.

    line 54
  5. Distinctive:

    Description: Default to one to three short prose paragraphs, including for non-trivial fixes and features.

    line 56
  6. Distinctive:

    Keep only details that affect the review.

    line 67
  7. Distinctive:

    Write the complete description to a temporary file with a quoted heredoc (or use a structured tool argument).

    line 79
  8. Distinctive:

    If the branch needs publishing, push from this same worktree within the user's authorization and execution permissions:

    line 99
  9. Distinctive:

    If a remote write is denied, stop remote mutations and report the denial with the prepared title/body.

    line 106

“Common” is measured: kept by at least 6 in 10 of the 30 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 GitHub pull requests following workspace conventions: a few concise paragraphs with enough context for a reviewer to understand the change.

Usage

/pr-create [--repo <repo-name>] [--base <base-branch>]
  • repo (optional): Repository inferred from the active task and workspace routing, including internal repositories under projects-emu/.
  • base (optional): Base branch for the PR. When omitted, resolve it from task context and the workspace's LOCAL_CONTEXT.md (if present). For NPI rocjitsu, use the designated internal repository and PR target; develop applies only to public rocjitsu work. Do not infer the target from the remote's default branch or an older PR's base.

Process

Run git and gh commands from the branch-backed development worktree that owns the change. For meta-workspace changes, use the active workspace checkout. Do not return to the canonical sub-repo to push or create the PR.

1. Gather Information

Run these commands in parallel:

git status -sb
git log --oneline -5 --decorate
git diff <base-remote>/<base>...HEAD
git diff <base-remote>/<base>...HEAD --name-only

Verify:

  • Branch is not the resolved base branch (must be on a feature branch)
  • The diff and commits contain only the intended work. Confirm the PR's base repository and push remote, including when the branch lives in a fork.
  • Confirm that the selected base matches the current task's routing before computing the diff or publishing; reconcile an obsolete development base while preserving local changes and commits.
  • Determine whether the branch is published and whether the remote has the same commit as HEAD; a remote decoration in the last five commits is not sufficient to establish this.

2. Draft PR Title and Description

Title: Use the same style as commit messages — concise, imperative mood, under 72 characters. For single-commit PRs, reuse the commit subject line.

Description: Default to one to three short prose paragraphs, including for non-trivial fixes and features. Do not use headings, subheadings, or bold section labels in PR descriptions, even when the repository template contains them. Answer relevant template prompts in prose. Prefer prose to bullet lists for normal PRs.

Lead with the problem and the resulting behavior. Add a brief explanation of the cause, design, or tradeoff when it helps a reviewer assess the change. Include relevant validation and any material gaps in a short final paragraph or sentence. A small change may fit in a single paragraph.

Keep only details that affect the review. Link existing issues or documentation for longer investigations; omit the investigation chronology and file-by-file changelogs. Include exact commands or environment details when needed to reproduce the behavior, without listing every check performed. Describe only validation actually run, distinguishing an equivalent reproducer from the reported one when relevant.

Include validation and any manual testing needed beyond CI in the prose; do not add a "Test Plan" section.

3. Publish the Prepared PR

Write the complete description to a temporary file with a quoted heredoc (or use a structured tool argument). Review the title, body, diff, and commit history before the remote write. For a public destination, verify that they contain no material derived from projects-emu/. Internal changes must target the designated internal repository and branch.

PR_BODY=$(mktemp)
cat > "$PR_BODY" <<'EOF'
<Briefly explain the problem and resulting behavior.>

<Add only supporting context needed to assess the change, if any.>

<Summarize relevant validation and material gaps in a sentence or two.>
EOF

Combine or omit optional paragraphs as appropriate, and replace all placeholders before publishing.

If the branch needs publishing, push from this same worktree within the user's authorization and execution permissions:

git push -u <push-remote> HEAD

If a remote write is denied, stop remote mutations and report the denial with the prepared title/body. Follow the workspace's no-bypass rule; do not try an API, alternate tool, or different remote-write mechanism to evade it.

Once the intended commit is available remotely:

gh pr create --base <base-branch> --title "<title>" --body-file "$PR_BODY"

For a fork, pass --repo <base-owner>/<repo> and --head <fork-owner>:<branch> when needed to identify the prepared change. Remove the temporary body file when it is no longer needed.

4. Report

Return the PR URL to the user.

Example

A typical PR body:

Resolve the review diff against the PR's declared base branch. Reuse the
branch's development worktree for follow-up fixes.

Checked the documented commands against the local worktree layout.

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.