GitHub workflow skills for PR management

Install

/plugin install reedom-gh@reedom-commands-and-skills

Run it inside Claude Code after adding the marketplace with /plugin marketplace add reedom/claude-code-commands.

Contents

Discovered from source

Skills 2

Collect data, draft complete PR content, cleanup, return ready-to-use JSON.

Arguments

ArgDefaultDescription
--againstorigin/mainTarget branch
--langsystemPR content language
--prefix""Prefix to prepend to title

Workflow

  1. Run ${CLAUDE_PLUGIN_ROOT}/skills/collect-pr-info/scripts/collect-info.sh -a <target> --lang <lang>
  2. Check for errors
  3. Read temp files (commits, diffs)
  4. Draft PR title and body
  5. Prepare preceding PR update (if exists)
  6. Run ${CLAUDE_PLUGIN_ROOT}/skills/collect-pr-info/scripts/cleanup.sh <temp_dir>
  7. Return complete PR data

Output JSON

{
  "current_branch": "feature/x",
  "target_branch": "origin/main",
  "push_needed": true,
  "matched_spec": "auth",
  "pr": {
    "title": "feat(auth): add login module",
    "body": "## Summary\n..."
  },
  "existing_pr": {
    "exists": false,
    "number": null
  },
  "preceding_pr": {
    "exists": true,
    "number": 122,
    "updated_body": "## PR Order\n- this PR\n- #NEW\n\n<original body>"
  }
}

Agent replaces #NEW with actual PR number after creation.


Title Format

<prefix> type(scope): description

  • Prepend --prefix value if provided
  • Type: feat/fix/refactor/chore/docs/test (from commits)
  • Scope: matched_spec if single, omit if multiple/none
  • Max 50 chars (excluding prefix), lowercase, imperative

Body Format

Language: lang.effective

## Summary
What and why (2-3 sentences)

## Changes
- Key changes

## Testing
How to verify

## Related Issues
closes #N

Preceding PR Update

If preceding PR exists, prepare updated_body:

## PR Order
- this PR
- #NEW

<original body>

Use ## PR順序 for Japanese.


Large Diff Strategy

When split: read manifest.json, prioritize source files, skip generated.

Error Handling

{"error": "message", "error_code": "NOT_GIT_REPO"}

Collect data, draft complete PR content, cleanup, return ready-to-use JSON.

Arguments

ArgDefaultDescription
--againstorigin/mainTarget branch
--langsystemPR content language
--prefix""Prefix to prepend to title

Workflow

  1. Run ${CLAUDE_PLUGIN_ROOT}/skills/create-draft-pr/scripts/collect-info.sh -a <target> --lang <lang>
  2. Check for errors
  3. Read temp files (commits, diffs)
  4. Draft PR title and body
  5. Prepare preceding PR update (if exists)
  6. Run ${CLAUDE_PLUGIN_ROOT}/skills/create-draft-pr/scripts/cleanup.sh <temp_dir>
  7. Return complete PR data

Output JSON

{
  "current_branch": "feature/x",
  "target_branch": "origin/main",
  "push_needed": true,
  "matched_spec": "auth",
  "pr": {
    "title": "feat(auth): add login module",
    "body": "## Summary\n..."
  },
  "existing_pr": {
    "exists": false,
    "number": null
  },
  "preceding_pr": {
    "exists": true,
    "number": 122,
    "updated_body": "## PR Order\n- this PR\n- #NEW\n\n<original body>"
  }
}

Agent replaces #NEW with actual PR number after creation.


Title Format

<prefix> type(scope): description

  • Prepend --prefix value if provided
  • Type: feat/fix/refactor/chore/docs/test (from commits)
  • Scope: matched_spec if single, omit if multiple/none
  • Max 50 chars (excluding prefix), lowercase, imperative

Body Format

Language: lang.effective

## Summary
What and why (2-3 sentences)

## Changes
- Key changes

## Testing
How to verify

## Related Issues
closes #N

Preceding PR Update

If preceding PR exists, prepare updated_body:

## PR Order
- this PR
- #NEW

<original body>

Use ## PR順序 for Japanese.


Large Diff Strategy

When split: read manifest.json, prioritize source files, skip generated.

Error Handling

{"error": "message", "error_code": "NOT_GIT_REPO"}

Commands 1

Invoke reedom-gh:pr-maker agent with the parsed arguments IMMEDIATELY. DO NOT explain how this works. DO NOT analyze the plugin structure. JUST INVOKE THE AGENT.

Arguments

FlagShortDefaultDescription
--against-aorigin/mainTarget branch
--langinferPR language (en/ja/...)
--no-push--npfalseSkip git push
--draft-dfalseCreate draft PR
--skip-ai-review-qfalseAdd [!ai-review] prefix

Language Detection

When --lang not specified:

  1. Check explicit user config (CLAUDE.md, system rules) for language preference
  2. If found → use that language code
  3. If not found → pass system (script detects from LANG env var)

Execution

  1. Parse args
  2. Resolve language: explicit arg > user config > system
  3. Translate: --skip-ai-review → --prefix "[!ai-review]"
  4. Invoke agent:
Task(
  subagent_type: "reedom-gh:pr-maker",
  prompt: "--against=<val>, --lang=<val>, --prefix=<val>, --no-push, --draft"
)
  1. Return PR URL

Agents 1

Invoke skill reedom-gh:collect-pr-info, execute git/gh commands with prepared content.

CRITICAL:

  • Do NOT use Write tool. Pass all content inline via command arguments.
  • Only use --draft flag in gh pr create if --draft was explicitly passed in input args. Default is regular PR (no --draft).

Input Args

ArgPassed to
--against, --lang, --prefixSkill
--no-push, --draftAgent

Workflow

1. Invoke Skill

skill: reedom-gh:collect-pr-info Pass: --against, --lang, --prefix

Returns ready-to-use content:

{
  "current_branch": "feature/x",
  "target_branch": "origin/main",
  "push_needed": true,
  "matched_spec": "auth",
  "pr": {
    "title": "feat(auth): add login module",
    "body": "## Summary\n..."
  },
  "existing_pr": {"exists": false, "number": null},
  "preceding_pr": {"exists": true, "number": 122, "updated_body": "...#NEW..."}
}

2. Push

If push_needed and NOT --no-push:

git push -u origin <branch>

3. Create/Update PR

New PR:

gh pr create --title "<pr.title>" --body "<pr.body>" [--draft] [--label "..."]

Existing PR: Ask user, then gh pr edit <number>

4. Update Preceding PR

If preceding_pr.exists:

  1. Get new PR#: gh pr list --head <branch> --json number --jq '.[0].number'
  2. Replace #NEW in updated_body with actual number
  3. gh pr edit <preceding_pr.number> --body "<updated_body>"

Output

Return PR URL.

Sponsors

Details

Marketplace
reedom/claude-code-commands
Source
gh
Author
HANAI Tohru
Category
Productivity
Keywords
git, github, gh, pr

More from reedom/claude-code-commands

All 6