agentleFS
BlockKnown publisherblock/ghost/.agents/skills/create-pr/SKILL.md

create-pr

Skill34 starsChanged 4 months agoApache-2.0View on GitHub

Create a GitHub pull request for the ghost repo from the current branch: inspect branch changes, handle scoped commits, verify release and ghost review requirements, push safely, and open a draft PR. Use when the user says "create PR", "open PR", "submit PR", "push PR", "make a pull request", or asks to publish the current ghost branch for review.

  • Commits and pushes

We split this skill into the rules it gives an agent

29 rules. 0 are common, 20 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 177 edited versions we read keep these.

  • 20

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

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

    Create a GitHub pull request for the ghost repo from the current branch.

    line 13
  2. Distinctive:

    Before changing anything, identify the PR base branch.

    line 23
  3. Distinctive:

    Prefer the branch's upstream base if it is clear from local Git metadata.

    line 25
  4. Distinctive:

    Use merge-base semantics for all branch summaries and PR body evidence:

    line 32
  5. Distinctive:

    If there are staged, unstaged, or untracked changes:

    line 45
  6. Distinctive:

    Never stage or commit unrelated user changes.

    line 49
  7. Distinctive:

    If committing is needed, stage only the relevant paths and write a concise imperative commit message.

    line 50
  8. Distinctive:

    If the scope is ambiguous, pause and ask what should be included.

    line 52
  9. Distinctive:

    If there are no uncommitted changes, continue.

    line 54
  10. Distinctive:

    Run these in parallel where possible:

    line 58
  11. Very specific:

    Before pushing, verify that origin points to a Block-managed GitHub organization for this repo, normally git@github.com:block/ghost.git or …

    line 68
  12. Distinctive:

    When a changeset is required, create one before the PR:

    line 86
  13. Very specific:

    Use patch for fixes and docs, minor for new commands, flags, exports, or public capabilities, and major for removed or renamed public …

    line 96
  14. Distinctive:

    If commands, flags, help text, or CLI summaries changed, run:

    line 99
  15. Very specific:

    If ghost is not on PATH, build first and use the local CLI:

    line 128
  16. Very specific:

    Run ghost check for implementation or fingerprint changes that can affect a surface.

    line 135
  17. Very specific:

    Only active deterministic ghost check failures block.

    line 147
  18. Distinctive:

    Keep issue tracking lightweight and outside the PR body.

    line 153
  19. Distinctive:

    Look for an explicit issue key or URL in the user request, branch name, commit messages, or changed-file context.

    line 155
  20. Distinctive:

    If one issue clearly matches this branch, link the PR after creation when tooling is available.

    line 157
  21. Distinctive:

    If no issue is clear, continue without one unless the user asks to create or attach an issue.

    line 159
  22. Distinctive:

    If issue tooling is unavailable, do not block PR creation.

    line 161
  23. Distinctive:

    Write from the perspective of a product-minded maintainer explaining the why to engineers.

    line 172
  24. Distinctive:

    Use this body structure:

    line 175
  25. Distinctive:

    Keep Problem and Solution to 2-4 sentences total.

    line 208
  26. Very specific:

    Use N/A for Screenshots/Demos when no visual surface changed.

    line 212
  27. Distinctive:

    Do not include issue-linking bookkeeping in the PR body unless the repo already expects it.

    line 213
  28. Very specific:

    Create the PR with the generated title and body.

    line 224
  29. Very specific:

    Use a body file or heredoc to preserve formatting.

    line 227

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

Create a GitHub pull request for the ghost repo from the current branch. Prefer a draft PR unless the user explicitly asks for a ready PR and validation has passed.

The goal is to make agent-authored PRs easy to review: explain the product or developer intent, account for every changed file, show validation, and preserve the release hygiene expected by this repo.

Step 1: Resolve Base Branch

Before changing anything, identify the PR base branch.

  1. Prefer the branch's upstream base if it is clear from local Git metadata.
  2. Otherwise use the repository default branch from git remote show origin.
  3. Fall back to origin/main only if the repo does not expose a default branch.

Fetch the base ref when needed. If the branch is stale relative to the base, tell the user and ask whether to proceed, rebase, or merge first.

Use merge-base semantics for all branch summaries and PR body evidence:

git merge-base <base> HEAD
git log <merge-base>..HEAD --oneline
git diff <base>...HEAD --stat
git diff <base>...HEAD

Step 2: Check Worktree And Scope

Run git status --short --branch.

If there are staged, unstaged, or untracked changes:

  • Show the outstanding paths to the user.
  • Separate changes that belong to this PR from unrelated local work.
  • Never stage or commit unrelated user changes.
  • If committing is needed, stage only the relevant paths and write a concise imperative commit message.
  • If the scope is ambiguous, pause and ask what should be included.

If there are no uncommitted changes, continue.

Step 3: Gather Branch Context

Run these in parallel where possible:

  1. git rev-parse --abbrev-ref HEAD
  2. git remote -v
  3. git status --short --branch
  4. git merge-base <base> HEAD
  5. git log <merge-base>..HEAD --oneline
  6. git diff <base>...HEAD --stat
  7. git diff <base>...HEAD

Before pushing, verify that origin points to a Block-managed GitHub organization for this repo, normally git@github.com:block/ghost.git or an equivalent https://github.com/block/ghost remote. Do not push ghost source to personal or non-Block repositories.

Step 4: Check Release Hygiene

ghost publishes only @design-intelligence/ghost; private packages are ignored by Changesets.

Inspect the diff and decide whether a changeset is required:

  • Required: user-visible changes to the public package, including CLI behavior, public exports, schema behavior, package output, docs that affect users, or fixes shipped through @design-intelligence/ghost.
  • Usually not required: tests only, internal scripts only, private package only, CI-only changes, or docs/ideas notes that are not release-facing.

When a changeset is required, create one before the PR:

---
"@design-intelligence/ghost": patch
---

One sentence, user-facing, present tense.

Use patch for fixes and docs, minor for new commands, flags, exports, or public capabilities, and major for removed or renamed public behavior.

If commands, flags, help text, or CLI summaries changed, run:

pnpm dump:cli-help

Include apps/docs/src/generated/cli-manifest.json if it changes.

Step 5: Validate

Choose validation based on the diff. Prefer running all relevant checks before opening the PR. If a command is too expensive or unavailable, say so in the PR body and tell the user.

Common validation:

pnpm build
pnpm test
pnpm check

ghost-specific validation:

ghost check --base <base>
ghost review --base <base> --include-memory

If ghost is not on PATH, build first and use the local CLI:

node packages/ghost/dist/bin.js check --base <base>
node packages/ghost/dist/bin.js review --base <base> --include-memory

Run ghost check for implementation or fingerprint changes that can affect a surface. Run ghost review when the change touches UI generation behavior, fingerprint semantics, review packets, composition rules, docs about ghost's surface model, or anything where advisory drift context would help reviewers.

For fingerprint edits, also run:

ghost lint .ghost
ghost verify .ghost --root .

Only active deterministic ghost check failures block. Advisory ghost review findings should be summarized as review context, not treated as CI failures unless tied to an active check.

Step 6: Optional Issue Tracking

Keep issue tracking lightweight and outside the PR body.

  1. Look for an explicit issue key or URL in the user request, branch name, commit messages, or changed-file context.
  2. If one issue clearly matches this branch, link the PR after creation when tooling is available.
  3. If no issue is clear, continue without one unless the user asks to create or attach an issue.
  4. If issue tooling is unavailable, do not block PR creation.

Step 7: Generate PR Title And Body

Generate a concise title under 72 characters. Use imperative mood and make the intent clear, for example:

preserve accepted memory in review packets

Write from the perspective of a product-minded maintainer explaining the why to engineers. Be concise and grounded in the branch diff.

Use this body structure:

**Category:** new-feature | improvement | fix | infrastructure
**User Impact:** One standalone sentence a non-technical stakeholder could understand.
**Problem:** The user-facing, maintainer-facing, or agent-facing friction this PR addresses.
**Solution:** How the change resolves it, including brief rationale when useful.

**Validation:**
- `command`: result

**Changeset:** added | not needed because ...

**ghost Review:**
- `ghost check --base <base>`: result | not run because ...
- `ghost review --base <base> --include-memory`: result | not run because ...

<details>
<summary>File changes</summary>

**path/to/file.ts**
What changed and why.

**path/to/other.md**
What changed and why.

</details>

**Screenshots/Demos:** N/A | link or description | not captured because ...

Guidelines:

  • Keep Problem and Solution to 2-4 sentences total.
  • List every changed file in the collapsible section.
  • Focus file notes on intent and reviewer orientation, not line-by-line implementation details.
  • Use N/A for Screenshots/Demos when no visual surface changed.
  • Do not include issue-linking bookkeeping in the PR body unless the repo already expects it.

Step 8: Push And Create PR

Push the branch if it has not been pushed:

git push -u origin HEAD

Create the PR with the generated title and body. Prefer gh pr create --draft unless the user explicitly asked for a ready PR and validation is complete.

Use a body file or heredoc to preserve formatting. After creation, output the PR URL as a clickable link and mention any skipped validation, missing issue link, or advisory ghost review finding the user should know about.

Tone

Be crisp, calm, and concrete. The reviewer can read the code; the PR body should explain the intent, release impact, validation state, and the few choices that would otherwise take extra time to infer.

Download now (ZIP)

  • Other versions196 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 196

    1. microsoft/vscode★ 194ksame name
    2. vercel/next.js★ 143ksame name
    3. penpot/penpot★ 62ksame name
    4. remix-run/react-router★ 57ksame name
    5. moeru-ai/airi★ 51ksame name
    6. ToolJet/ToolJet★ 41ksame name
    7. ueberdosis/tiptap★ 39ksame name
    8. BabylonJS/Babylon.js★ 26ksame name
    9. kortix-ai/suna★ 20ksame name
    10. ryoppippi/ccusage★ 19ksame name

    186 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use update-pr, act-on-feedback 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 9 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

    • 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

      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

    • frostneySkill

      roadmap-review

      Reviews a roadmap from fresh project evidence and produces a verified, throughput-anchored version plan, with execution gated on confirmation. Use when reviewing a roadmap, planning releases, or sequencing a backlog.

      Also in 3 projects that use this

    • Hey-DigaSkill

      review-pr-comments

      Review and apply Claude's PR feedback interactively. Use after receiving a Claude Code review on a PR to triage and implement feedback.

      Also in 4 projects that use this

    • +1 more from microsoft
    • +1 more from frostney
  • In this repository3 other files it gives its agents.

Does it work?

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

Reviews can't be read right now.

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.