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がスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
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
Identify the current branch and base branch:
git branch --show-current git merge-base HEAD mainGather the diff from main:
git diff main...HEAD --stat git diff main...HEADRead through the full diff carefully. Understand what files were changed, added, or removed, and what the changes do.
Review the commit history on this branch:
git log main..HEAD --onelineRead commit messages to understand the progression of changes.
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).
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.)
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
mainor 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
コメント
- …
このリポジトリの他のスキル
ai-elements
12kエージェントが、会話、メッセージ、ツールの表示、プロンプト入力のための既成のコンポーネントを使って、AIチャットの画面を作れるよう支援します。
ai-sdk
12kエージェントが、テキスト生成、ストリーミング、ツール呼び出し、エージェントを含め、Vercel AI SDKでAI機能を作れるよう支援します。
better-accessibility
12kエージェントが、フォーカス、ラベル、ARIA、フォームを含め、キーボードとスクリーンリーダーで使えるインターフェースを作れるよう支援します。
better-auth-best-practices
12kエージェントが、Better Authの文書の手順に従い、TypeScriptのアプリでログイン、セッション、OAuth、プラグインのための設定を行えるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。