本文へスキップ
Skillpedia
一般的なプログラミング12k · #11525

prepare-branch-context

できること

このスキルは、AIが現在のコードブランチで行われた変更、関連するプルリクエスト、そのコメントを読めるようにします。作業を始める前にAIに状況を把握させたい開発者に向けたものです。

使う場面

  • ✓コードブランチに戻り、そのブランチが何を変更しているかをAIに把握させたいとき。
  • ✓レビューの前に、ブランチの内容をAIに説明させたいとき。
  • ✓作業を続ける前に、AIにプルリクエストのコメントを読ませたいとき。

スキルのリンク

https://github.com/trycompai/crm/blob/release/.agents/skills/prepare-branch-context/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/trycompai/crm/blob/release/.agents/skills/prepare-branch-context/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“変更を加える前に、このブランチの内容を簡単に説明してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、gitコマンドでブランチをmainと比較し、コミット履歴とプルリクエストを読んでから、短い要約を提示します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Prepare Branch Context

Build a comprehensive understanding of the current branch so you can handle followup requests with full context.

Steps

  1. Identify the current branch and base branch:

    git branch --show-current
    git merge-base HEAD main
    
  2. Gather the diff from main:

    git diff main...HEAD --stat
    git diff main...HEAD
    

    Read through the full diff carefully. Understand what files were changed, added, or removed, and what the changes do.

  3. Review the commit history on this branch:

    git log main..HEAD --oneline
    

    Read commit messages to understand the progression of changes.

  4. Check for a related PR:

    gh pr list --head "$(git branch --show-current)" --json number,title,body,url,state,comments --jq '.[0]'
    

    If a PR exists, read its title, description, and comments for additional context (acceptance criteria, discussion, review feedback).

  5. Summarize your understanding to the user:

    • What this branch does (high-level purpose)
    • Key files and areas of the codebase affected
    • Notable decisions or patterns visible in the changes
    • Any open review comments or discussion from the PR
    • Current state (clean, uncommitted changes, etc.)
  6. Signal readiness: Tell the user you're ready for followup questions or tasks related to this branch.

Rules

  • Do NOT make any changes to files. This skill is read-only.
  • Read the actual diff content, not just the stat summary. You need to understand the code changes.
  • If there's no PR, that's fine — just skip that step and note it.
  • If the diff is very large, focus on understanding the overall structure first, then read key files in detail.
  • Keep the summary concise but thorough enough that you could confidently make changes to this branch.
  • If the branch is main or has no divergence from main, tell the user there's nothing to analyze.
よくある質問

このスキルにはGitHubのコマンドラインツールが必要ですか?

はい。関連するプルリクエストを探すためにghコマンドを使うため、そのツールのインストールが必要です。

AIはどのような内容を報告しますか?

ブランチの目的、主な影響ファイル、注目すべき判断、未解決のレビューコメント、作業の現在の状態を要約します。

コードは変更されますか?

挙げられている手順は、差分、履歴、プルリクエストなどブランチの情報を読むだけです。

詳細

作者による元の説明

Analyze the current branch's diff from main and related PR to build context for followup requests. Triggers on "prepare context", "branch context", "catch me up", "what's on this branch".

repo: trycompai/crm

人気

GitHubのスター
12k
ランキング
#11525
ライセンス
MIT
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル