agentleFS
RoboFinSystemsRoboFinSystems/robosystems/.claude/skills/create-pr/SKILL.md

create-pr

Skill31 starsChanged 14 days agoApache-2.0View on GitHub

Open a pull request for the current branch, writing the title and description from the work actually done in this session rather than reconstructing it from the diff. Use for \"create a PR\", \"open a PR\", \"ship it\", or after committing a finished unit of work.

  • Commits and pushes

197 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update-pr, create-release-note and 10 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.
  • MicrosoftSkill

    update-pr

    Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.

    Also in 10 projects that use this

  • ModelEngine-GroupSkill

    create-release-note

    从 PR/commit 中自动生成结构化的 Release Notes,并可选创建 GitHub Draft Release。支持 x.y.0 版本合并前一 minor 系列的 release notes。当用户要求生成发布说明、创建 release notes 时触发。参数为版本号和可选的上一版本号。

    Also in 3 projects that use this

  • frostneySkill

    delivery-wait

    Provides deterministic, resumable GitHub transition waits used internally by delivery workflows. Use when another workflow must await CI, merge, tag, or release state without model heartbeats.

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • parkchuSkill

    start-mission

    넥스트스텝(NextStep) 미션을 처음 시작할 때, 미션 저장소를 fork·clone하고 최초 작업 브랜치(step1 등)까지 만들어 준다. gh CLI로 fork하고 clone까지 이어서 처리하며, gh가 없거나 인증이 안 돼 있으면 브라우저 Fork 안내로 폴백한다. 이미 fork/clone돼 있으면 재사용하고 이어서 진행한다(재실행 안전). 사용자가 "미션 시작하려는데 저장소 세팅해줘", "새 미션 시작할래", "fork부터 해줘", "/nextstep:start-mission" 등으로 요청할 때 사용한다.

    Also in 3 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • +1 more from frostney
  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 182 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Create a GitHub pull request for the current branch, writing the title and description from the actual work done in this session — not …

    line 9
  2. Distinctive:

    Run these checks before touching anything:

    line 23
  3. Very specific:

    Never PR from the default branch: If CURRENT is main (or master/staging), stop and tell the user to switch to a feature branch first.

    line 31
  4. Very specific:

    Source ≠ target: If CURRENT == TARGET, stop.

    line 32
  5. Distinctive:

    Uncommitted changes: Run git status --porcelain.

    line 33
  6. Very specific:

    Existing PR: Check gh pr list --head "$CURRENT" --base "$TARGET" --json url,number.

    line 34
  7. Distinctive:

    Primary source: this session: Use what was actually changed and why from the conversation context.

    line 42
  8. Distinctive:

    Write the body to a temp file to avoid shell-escaping problems, then:

    line 72
  9. Very specific:

    If the review workflow does not fire (it is gated to OWNER/MEMBER/COLLABORATOR authors, so fork PRs are excluded by design and get a …

    line 100
  10. Distinctive:

    After creating the PR, report:

    line 108

“Common” is measured: kept by at least 6 in 10 of the 182 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

Create a GitHub pull request for the current branch, writing the title and description from the actual work done in this session — not reconstructed from the diff.

Why this skill exists

The previous flow outsourced PR-description authoring to a GitHub Action that only saw the diff and commit messages. It could not know why the changes were made, so it frequently described things that weren't true. Those inaccurate descriptions then fed @claude reviews, compounding the bad information. This skill fixes that at the root: you author the description here, where the full context of what was done and why is available.

This is a Python backend service (FastAPI + LadybugDB graphs, managed with uv and just). Ground every description in the actual code that changed, and stay mindful of multi-tenancy (graph operations scoped to graph_id).

This repository is public. The PR title and body are world-readable the moment they're pushed — routinely before the change is deployed, since deploys are manual. Treat the description as a publication, not a work note.

Instructions

1. Preflight

Run these checks before touching anything:

# Current and target branches
CURRENT=$(git branch --show-current)
TARGET=${1:-main}            # override target via the first argument
  • Never PR from the default branch. If CURRENT is main (or master/staging), stop and tell the user to switch to a feature branch first.
  • Source ≠ target. If CURRENT == TARGET, stop.
  • Uncommitted changes. Run git status --porcelain. If there are uncommitted/staged changes, surface them and ask whether to commit them (respecting the repo's commit rules — never on main, stage files by name, no git add -A) or proceed without them. The PR description must reflect committed state.
  • Existing PR. Check gh pr list --head "$CURRENT" --base "$TARGET" --json url,number. If a PR already exists, do not create a duplicate — offer to update its title/body with gh pr edit instead.
  • Security fixes — check deployment first. A security-fix commit discloses the bug through its diff the moment it's pushed. If this branch carries one, check whether the vulnerable code is still live in production (git show <prod-tag>:<file> against the fix) and tell the user, so they can sequence the deploy with — or ahead of — the public push rather than opening a window.
  • Push the branch. gh pr create requires the branch on the remote. Ensure it's pushed: git push -u origin "$CURRENT" (the user invoking /create-pr is the explicit, in-the-moment request that authorizes pushing this feature branch — this is the one push allowed without a separate ask; never push main).

2. Gather the real change context

This is the whole point — ground the description in what actually happened:

  • Primary source: this session. Use what was actually changed and why from the conversation context. This is the information the old GHA workflow never had.
  • Corroborate against the branch:
    git log --oneline "$TARGET".."$CURRENT"     # commits on this branch
    git diff --stat "$TARGET"..."$CURRENT"      # files + churn
    git diff "$TARGET"..."$CURRENT"             # full diff — read it, don't guess
  • Hard rule — no confabulation. Every claim in the description must be supported by the diff. If you didn't touch an endpoint, don't write "API changes." If a behavior isn't in the diff, don't mention it. When the session context and the diff disagree, the diff wins and you investigate the discrepancy.

3. Compose the PR

  • Type — derive from the branch prefix (feature/ → feat, bugfix//fix/ → fix, hotfix/ → fix, chore/ → chore, refactor/ → refactor, release/ → release). Default to feat if unprefixed.
  • Title — concise (~50–72 chars), conventional-commit style, e.g. feat(graph): scope materialize to graph_id. Match the style in git log.
  • Body — markdown. Match the headings in .github/PULL_REQUEST_TEMPLATE.md, because --body-file bypasses template prefill entirely and a hand-written body silently drops whatever sections it omits:

    • Summary — 1–3 sentences: what this PR does and why.
    • Changes — bullets grouped by area/module/file, describing real edits. Call out anything reviewers should look at closely.
    • Breaking Changes — "None" if there are none, and say so explicitly rather than omitting the section. See the SDK contract below; this is where it goes.
    • Testing — state truthfully what was run. The repo gate is just test-all; just test-code is the code-quality half without the ~6-minute test run. The justfile holds the stage list — don't restate it here, since the copy that is not the recipe is the one that goes stale. If you ran any of these this session, say which and give the result. The test portion needs a local env and is often not runnable in-session — if you couldn't run it, say so plainly. If nothing was run, say "Not run" — never claim passing tests that weren't executed.
    • Certification — reproduce the template's checkbox verbatim and tick it: - [x] I have the right to submit this work under the Apache 2.0 license, and do so. Where any part of it is owned by my employer, I have their permission. Because --body-file bypasses prefill, omitting this section silently drops a required provenance assertion.

    The template has no Related Issues section — put Closes #123 / Fixes #456 as the last line of the Summary. GitHub links it from anywhere in the body.

  • SDK contract. robosystems-python-client and robosystems-typescript-client are post-1.0 semver contracts with external integrators, on a two-tier rule. Changes reaching the stable tier — the SDK facades, or the symbols robosystems-integration-template imports for its emit path — propagate as a client major: call those out under Breaking Changes and say so explicitly in the body, so the regen lands as a coordinated major with deprecation notes rather than silent drift. Changes to the generated tier (everything else the OpenAPI spec produces) ride a client minor; note the removal so it reaches the release notes, but don't file it under Breaking Changes. Removing surface that never worked skips deprecation entirely — record the three facts that justify it: it never functioned, no consumer exists, and removal changes only symbol resolution. Additive changes are free; note them as an SDK regen opportunity.
  • Security-fix disclosure. If the PR fixes a security issue, the prose is often more actionable than the diff — keep it terse and non-actionable. Describe the area hardened, never the mechanism: "harden write-path authorization on the query surface", not the how. No exploit mechanics, attack scenarios, affected-endpoint enumerations, payloads/regexes, or "previously protected only by X" tells. Detailed root cause and any PoC go in the private design vault under specs/, referenced by filename only — never pasted into the PR. For coordinated disclosure use a private GitHub Security Advisory, never a public issue.
  • Attribution — end the body with the standard footer, after Certification: 🤖 Generated with [Claude Code](https://claude.com/claude-code). Do not add a Co-Authored-By trailer to commits (per the repo's commit conventions).

4. Create the PR

Write the body to a temp file to avoid shell-escaping problems, then:

gh pr create \
  --base "$TARGET" \
  --head "$CURRENT" \
  --title "<title>" \
  --body-file /tmp/pr-body.md

Print the resulting PR URL.

5. The Claude review — requested by the workflow, not by you

Every pull request that changes code gets a @claude review. This is a change-management control, not a convenience: this is a single-maintainer repository where GitHub forbids self-approval, so an automated second reader on every code change is the compensating control that stands in for independent human review.

Do not post the review request yourself. The test workflow's change-classification job runs on every pull request, whoever opened it, and does this deterministically:

  • It records the change class on the PR: change:standard for dependency bumps, manifests and lockfiles, documentation and release notes (test gate only, no review); change:normal for anything that touches platform or application code.
  • For a normal change it posts @claude please review this PR once, if no such request exists, and waits for the review before the job passes.

Posting the request here as well would trigger a second review of the same change, which doubles the cost for nothing. After creating the PR, confirm the job ran and applied a label; that is the whole of your part. Post the request by hand only if the job is absent in the repository you are in (the rollout is per repository) or it failed before requesting.

Two things this is not:

  • Not an approval. The review posts as a comment from claude[bot], not as an approving review, and it must stay that way. An unconditional bot approval on every PR is a rubber stamp, and it would be worse evidence than the documented exception it replaced. The reviewer's job is to find problems, not to sign off.
  • Not a substitute for /pr-review. That skill runs locally with full session context and is the deeper pass. This is the standing automatic one.

If the review workflow does not fire (it is gated to OWNER/MEMBER/COLLABORATOR authors, so fork PRs are excluded by design and get a maintainer's own review), say so in the output rather than silently moving on.

One expected exception — a PR that edits .github/workflows/claude.yml will not be reviewed. claude-code-action refuses to run whenever the workflow file on the PR branch differs from the version on the default branch. That is an anti-tampering guard: without it, a pull request could rewrite the reviewer to exfiltrate secrets. The run still completes green and posts nothing, logging Workflow validation failed... your workflow will begin working once you merge your PR.

This is normal, not a fault. Do not report it as a broken review, and do not go hunting for a misconfiguration — check whether the PR touches claude.yml first. It also means a change to the review workflow itself can never be validated by its own PR; it has to be merged and then exercised by the next unrelated PR.

Output

After creating the PR, report:

  1. The PR URL.
  2. A one-line summary of the title.
  3. Target ← source branches.
  4. The change class the workflow applied (change:standard or change:normal), and for a normal change that the review request is on the PR — or, if the job did not run, why.

Arguments

$ARGUMENTS may contain:

  • A target branch (default main).
  • Freeform guidance on what to emphasize in the description.

review / --review is accepted and ignored — the review is requested by the workflow (§5).

$ARGUMENTS

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.