pr

A workflow for analyzing branch changes and creating a draft pull request, including a screenshot step when the changes affect the user interface.

In plain words
What is it for?
Use it to detect the base branch, review changes, write and check the pull-request text, push the branch, and open a draft pull request with GitHub’s CLI.
Why use it?
It gathers the relevant branch, commit, file, and review information so the pull-request description follows the project’s rules.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/thkt/dotclaude/pr
Any agent
npx skills add thkt/dotclaude --skill pr
Clone the repo
git clone --depth 1 https://github.com/thkt/dotclaude

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.01454
Opus 5 $0.00031 $0.00727
Sonnet 5 $0.00012 $0.00291
Haiku 4.5 $0.00006 $0.00145

Measured 2d ago against content hash e036d2e676e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ja/skills/pr/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/pr - Pull Request 作成

build の Ship 段を手で行う版。本文の書き方は同じものを読む。

入力

$ARGUMENTS は Issue 参照またはコンテキスト。空なら現在ブランチからのみ生成する。

Phase 1: 準備

commit なし、Git リポジトリでない、gh 認証失敗のいずれかを検出したら、エラーを報告して中止する。

  1. base ブランチを検出する (§ Base ブランチ検出)
  2. § 分析ソースの各コマンドを並列実行する
  3. UI 変更の有無を判定する (§ UI 変更検出)。この判定は Phase 2 と Phase 3 が読む

Phase 2: 生成

  1. ${CLAUDE_SKILL_DIR}/references/pr-writing.md に従って骨格を選び、本文を書く。Design Decisions は § Design Decisions の検出に従う
  2. UI 変更があってリポジトリ側の骨格を採ったときは、§ Pageshot 統合が要求する 2 項目を補う。同梱の骨格は最初から両方を持つので何もしない
  3. ${CLAUDE_SKILL_DIR}/references/pr-writing.md の § タイトルに従ってタイトルを付ける
  4. ${CLAUDE_SKILL_DIR}/references/prose-review.md の基準で本文をインライン精査する

Phase 3: 作成

  1. UI 変更があれば Skill で use-workflow-pageshot を PR 本文と共に呼ぶ (§ Pageshot 統合)
  2. git push -u origin HEAD で現在ブランチを push する
  3. 本文を一時ファイルに書き出し、gh pr create --draft --title "<title>" --body-file <path> で PR を作成する (§ 作成の制約)
  4. pageshot 成果物があれば表示 (§ Pageshot 統合)。成功時は Created draft PR: #<number> <title> (base: <base>) <PR URL> を出す

分析ソース

<base> は § Base ブランチ検出が決めた値。

カテゴリ ソース
Changes git diff <base>...HEAD
Commits git log <base>..HEAD
Files git diff --name-status <base>...HEAD
Issue gh issue view <ref> --json title$ARGUMENTS が issue を指すときだけ

Base ブランチ検出

分岐元を HEAD の reflog から取る。取れないか、それが HEAD の祖先でなければ origin の既定ブランチへ落とす。

BASE=$(git reflog --format='%gs' | grep "moving from .* to $(git branch --show-current)$" | tail -1 | sed 's/.*from \(.*\) to .*/\1/'); git merge-base --is-ancestor "$BASE" HEAD 2>/dev/null || BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'); BASE=${BASE:-main}

UI 変更検出

§ 分析ソースの diff を読み、描画結果が変わらないと言い切れるかを判断する。言い切れなければ UI 変更ありとする。最終判定は pageshot のレンダリングが担うので、迷ったら UI 変更ありに倒す。

Read the full file on GitHub · 92 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 92 lines · 62 tokens per session scan A e036d2e676e8

Subscribe to this mod's changes

pr is a skill published in the GitHub repository thkt/dotclaude (11 stars, last pushed 2d ago), licensed MIT. It adds 62 tokens to every session and 1,454 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

create-modal

Create declarative modals using the modal library API. Covers modal types (confirm, input, select, form), sections (Text, Buttons, Input, Textarea, Checkbox, List, Combo, When, Custom), rendering with OverlayModal, and keyboard/mouse handling. Use when adding modals or dialogs to the application.

marcus/sidecar · 69 tokens

create-plugin

Create new sidecar plugins implementing the plugin.Plugin interface, rendering views with Bubble Tea, handling keyboard input via keymap contexts, and integrating with the app shell (footer hints, event bus, adapters). Use when creating a new plugin, modifying plugin architecture, or debugging plugin…

marcus/sidecar · 74 tokens

merge-strategy

Git merge strategies, conflict resolution approaches, merge vs rebase recommendations, and branch integration patterns in sidecar. Covers pull strategy menu, direct merge workflow, squash merge, commit message templates, configurable defaults, and protected branches. Use when working on git merge features or making…

marcus/sidecar · 63 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens