agentleFS
jerelvelardejerelvelarde/chalk-skills/skills/create-pr/SKILL.md

create-pr

Skill8 starsChanged 9 months agoMITView on GitHub

Create a GitHub pull request with structured body, visual preview from screenshots, and test instructions derived from project context

  • 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

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

  • 0

    Common

    Most of the 182 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 7

    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 from the current branch using gh CLI.

    line 17
  2. Distinctive:

    Not on main/master (if so, warn and suggest creating a branch)

    line 22
  3. Very specific:

    No uncommitted changes (if there are, suggest running /commit first)

    line 23
  4. Very specific:

    After generating the body, check if .github/pr-screenshots/ exists and contains .png or .gif files.

    line 62
  5. Distinctive:

    Use relative paths — GitHub renders these inline in PR descriptions

    line 74
  6. Distinctive:

    If no screenshots exist, omit this section

    line 75
  7. Very specific:

    If no screenshots exist and the branch has UI changes (changes to components, pages, styles, templates), suggest running …

    line 77
  8. Distinctive:

    If the branch has mixed types, use the most significant one

    line 84
  9. Distinctive:

    NEVER create PRs to main without user confirmation if there are destructive changes

    line 89
  10. Very specific:

    Always use gh pr create (not the GitHub web UI)

    line 90
  11. Very specific:

    If gh is not authenticated, tell the user to run gh auth login

    line 92
  12. Very specific:

    Test plan should use actual commands from chalk.json when available (e.g., real test.command, real dev.command)

    line 94

“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 from the current branch using gh CLI. Reads chalk.json for project context to generate better test instructions and embeds visual artifacts if available.

Workflow

  1. Check prerequisites — Run git status to verify:
    • Not on main/master (if so, warn and suggest creating a branch)
    • No uncommitted changes (if there are, suggest running /commit first)
    • Branch has commits ahead of base branch
  2. Analyze changes — Run git log main..HEAD --oneline and git diff main...HEAD --stat to understand all changes.
  3. Read project context — Read .chalk/chalk.json if it exists:
    • test.command — for test plan instructions
    • dev.command — for setup instructions
    • routes — to identify affected pages
    • project.framework — for framework-specific review notes
  4. Determine base branch — Default to main. If the user specifies a different target, use that.
  5. Push the branch — Run git push -u origin <branch> if not already pushed.
  6. Create the PR — Use gh pr create with:
    • A concise title (under 70 characters) following conventional commit style
    • A structured body (see format below)
  7. Report — Show the user the PR URL.

PR Body Format

## Summary
<1-3 bullet points describing what changed and why>

## Changes
<Bulleted list of specific changes, grouped by area>

## Test plan
<How to verify — include actual commands from chalk.json if available>
<e.g., "1. Run `npm run dev` 2. Navigate to /dashboard 3. Verify...">

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Visual Preview Section

After generating the body, check if .github/pr-screenshots/ exists and contains .png or .gif files. If it does, append a ## Visual Preview section before the footer:

## Visual Preview

### <Page Name>
![<page-name>](/.github/pr-screenshots/<page-name>.png)
![<page-name> interaction](/.github/pr-screenshots/<page-name>.gif)
  • Group images by page/route with subheadings
  • Include both screenshots and GIFs if both exist
  • Use relative paths — GitHub renders these inline in PR descriptions
  • If no screenshots exist, omit this section

If no screenshots exist and the branch has UI changes (changes to components, pages, styles, templates), suggest running /capture-pr-visuals first.

Title Convention

Match the conventional commit style of the primary change:

  • feat(scope): description for feature branches
  • fix(scope): description for bug fix branches
  • If the branch has mixed types, use the most significant one

Rules

  • NEVER force push
  • NEVER create PRs to main without user confirmation if there are destructive changes
  • Always use gh pr create (not the GitHub web UI)
  • Pass the PR body via HEREDOC for proper formatting
  • If gh is not authenticated, tell the user to run gh auth login
  • Include relevant issue references (e.g., "Closes #34") if the branch name or commits reference an issue
  • Test plan should use actual commands from chalk.json when available (e.g., real test.command, real dev.command)

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.