Pull request creation and push

VerifiedSafe

Automates PR creation with preflight checks, rebase onto base branch, conflict detection and CI monitoring.

Sby Skills Guide Bot
DevelopmentIntermediate
9/21/2026
Claude Code
#pull-request#git-rebase#conflict-resolution#ci-monitoring#preflight-checks

Recommended for

Automated summary

Guides a pull request workflow: rebase onto the base branch, mandatory lint/build preflight, full-diff review for sensitive data, then handing the push and gh pr create commands back to the user to run.

Strengths

  • Enforces blocking preflight checks (yarn lint, yarn build) and re-runs them after any rebase
  • Catches merge conflicts through mergeable/mergeStateStatus, which gh pr checks --watch silently misses
  • Re-scans the entire diff against the base branch for customer names, real domains, and project identifiers that slipped past commit-level checks
  • Deliberately keeps git push and gh pr create in the user's hands, supplying quoted, copy-pasteable commands

Limitations

  • Assumes a specific repo setup: dev as base, yarn, no yarn test, plus a companion git skill at .claude/skills/git/SKILL.md
  • Written in Japanese, so the workflow instructions carry that project context
  • Post-creation conflict follow-up relies on the user reporting the PR number back to the agent
When to use it

Use when a topic branch needs to become a clean, conflict-free pull request against dev.

When not to use it

Avoid on repositories that do not use yarn or dev as the base branch, or when the agent is allowed to push directly.

Security analysis

Safe
Quality score90/100

The skill instructs standard git, yarn, and gh commands for pull request preparation and monitoring, explicitly avoiding agent execution of push and PR creation. No destructive, exfiltrating, or obfuscated actions are present.

No concerns found

How this analysis is made

Examples

Prepare a PR branch
Prepare this branch for a PR against dev: rebase onto origin/dev, run yarn lint and yarn build, and give me the ! git push and gh pr create commands with the body file path.
Check mergeability after PR creation
I created PR #482. Check if it's mergeable, watch CI in the background, and if it shows CONFLICTING, rebase and resolve following the sidebar/heading policy.
Scan diff for sensitive data
Before I push, run the sensitive-data and sample-value checks on the full git diff dev...HEAD and rewrite anything that leaks a customer name or real domain.

name: pr description: プルリクエストの作成とプッシュ(プリフライトチェック、base 追従、コンフリクト検知含む)

  1. dev ではないトピックブランチにいることを確認する。

  2. base 追従(コンフリクト予防): git fetch origin dev を実行し、git log HEAD..origin/dev --oneline で base が進んでいないか確認する。進んでいれば push 前に git rebase origin/dev する。ドキュメント系のコンフリクトは機械的に解決せず、base 側で追加された内容を方針(sidebar 構成・見出し構造)に沿って取り込むこと。

  3. プリフライトチェック(必須 — 省略不可):

    • yarn lint、yarn build がこのセッション内でまだ実行・成功していない場合、続行する前に今すぐ実行する。rebase を行った場合は rebase 後に再実行する。
    • このリポジトリに yarn test は存在しない。
    • 全てがパスしなければならない。失敗があれば続行前に修正する。
  4. 適切な git コマンドを使って現在のトピックブランチの変更をレビューする。

    • 機密・案件情報とサンプル慣例のダブルチェック: base branch との全 diff(git diff dev...HEAD)に対して、.claude/skills/git/SKILL.md の「機密・案件情報の検出」と「サンプル値の慣例チェック」を再実行する。コミット単位のチェックをすり抜けた企業名・顧客情報・実在ドメイン・未取得ドメイン・案件識別子・実データ断片がないかを PR 全体で確認する。検出したら汎用値へ書き換えて追加コミットする。
  5. PR body を一時ファイルに保存する: scratchpad ディレクトリに PR body(markdown)を書き出す。PR body は diff の要約であり会話の要約ではない — セッション中に出てきた顧客名・案件名・社外秘情報は、diff 自体に含まれていない限り書き込まない。

  6. push と PR 作成はユーザーが実行する: エージェントは git push / gh pr create を実行せず、ユーザーがそのまま実行できる ! 付きコマンドを提示する。ファイルパス引数は必ずダブルクオーテーションで囲む。

    ! git push -u origin <branch>
    ! gh pr create --base dev --title "<title>" --body-file "<PR body の一時ファイルパス>"
    
  7. マージ可能性の確認(CI watch では捕捉できない):

    • ユーザーから PR 作成の報告を受けたら、まず gh pr view <number> --json mergeable,mergeStateStatus で CONFLICTING / DIRTY を検知する。gh pr checks --watch はステータスチェックしか見ないため、コンフリクトは黙って素通りする。
    • CONFLICTING なら CI を待たずにステップ 2 の base 追従(rebase + 方針に沿った解決)に戻り、解決後にユーザーへ ! git push --force-with-lease を依頼する。
  8. CI 監視:

    • gh pr checks --watch をバックグラウンド実行で起動して CI の完了を待機する(フォアグラウンド実行はターン内タイムアウトで出力が欠損する)。
    • テストが途中で失敗した場合は完了を待たずに修正作業に戻る。
    • 全テストが通ったら、gh pr view <number> --json mergeable,mergeStateStatus で再度 CONFLICTING / DIRTY になっていないか確認する(CI 実行中に base が進んで新たにコンフリクトが発生している可能性があるため)。
    • CONFLICTING ならステップ 7 の対処に戻る。問題なければ gh pr view <number> --web でブラウザを開き、マージ可能であることをユーザーに報告してマージを促す。

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/pull-request-creation-and-push-muar2yxj' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pull-request-creation-and-push-muar2yxj/download' --output '.skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md.part' && mv '.skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md.part' '.skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md' && test -s '.skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/pull-request-creation-and-push-muar2yxj' '.claude/skills/pr'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/pull-request-creation-and-push-muar2yxj'

openskills read 'pull-request-creation-and-push-muar2yxj'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/pull-request-creation-and-push-muar2yxj/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills