research-merge
Claude Code Webセッションの研究ブランチを処理し、コンテンツ統合、ドキュメント移動、GitHub issue作成を行い、モバイルセッションの研究処理や/popkit:next検出時に活用するSkill。
📜 元の英語説明(参考)
Processes research branches from Claude Code Web sessions - merges content, moves docs to docs/research/, and creates GitHub issues. Use when /popkit:next detects research branches or when manually processing research from mobile sessions. Do NOT use for regular feature branches - only for branches matching claude/research-* or containing research documentation.
🇯🇵 日本人クリエイター向け解説
Claude Code Webセッションの研究ブランチを処理し、コンテンツ統合、ドキュメント移動、GitHub issue作成を行い、モバイルセッションの研究処理や/popkit:next検出時に活用するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o research-merge.zip https://jpskill.com/download/19399.zip && unzip -o research-merge.zip && rm research-merge.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19399.zip -OutFile "$d\research-merge.zip"; Expand-Archive "$d\research-merge.zip" -DestinationPath $d -Force; ri "$d\research-merge.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
research-merge.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
research-mergeフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 3
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
リサーチブランチのマージ
概要
Claude Code Web セッション中に作成されたリサーチブランチを処理するための完全なワークフローを扱います。
- リサーチブランチを検出します。
- ユーザー承認のためにコンテンツをプレビューします。
- メインブランチにスカッシュマージします。
- ドキュメントを標準化された場所に移動します。
- 調査結果から GitHub Issue を作成します。
- リモートブランチをクリーンアップします。
トリガー: リサーチブランチが検出されたときに pop-next-action スキルによって呼び出されるか、/popkit:research merge を介して直接呼び出されます。
ユーザーインタラクションパターン
マージの決定には常に AskUserQuestion を使用します。
Use AskUserQuestion tool with:
- question: "Found research branch: [topic]. How should we process it?"
- header: "Research"
- options:
- label: "Merge and create issue"
description: "Squash-merge, move docs, create GitHub issue, delete branch"
- label: "Merge only"
description: "Squash-merge content without creating issue"
- label: "Skip for now"
description: "Leave branch for later processing"
- label: "Delete branch"
description: "Discard research (cannot be undone)"
- multiSelect: false
処理ワークフロー
ステップ 1: リサーチブランチの検出
research_branch_detector.py ユーティリティを使用します。
import sys
# No longer needed - install popkit-shared instead
from research_branch_detector import (
fetch_remotes,
get_research_branches,
format_branch_table,
get_branch_content_preview,
parse_research_doc,
generate_issue_body
)
# Fetch and detect
fetch_remotes()
branches = get_research_branches()
if not branches:
print("No research branches detected.")
return
# Show table
print("## Research Branches Detected\n")
print(format_branch_table(branches))
ステップ 2: コンテンツのプレビュー
各ブランチについて、プロンプトを表示する前にプレビューを表示します。
for branch in branches:
print(f"\n### {branch.short_name}")
print(f"**Topic:** {branch.topic}")
print(f"**Created:** {branch.created_ago}")
print(f"**Commits:** {branch.commit_count} ahead of master")
if branch.doc_paths:
print(f"\n**Documentation:**")
for path in branch.doc_paths:
print(f"- `{path}`")
# Show summary preview
previews = get_branch_content_preview(branch, max_lines=20)
for path, content in previews.items():
parsed = parse_research_doc(content)
if parsed.get("summary"):
print(f"\n**Summary:** {parsed['summary'][:200]}...")
ステップ 3: ユーザーの決定
各ブランチに AskUserQuestion を使用します。
Use AskUserQuestion tool with:
- question: f"Process '{branch.topic}' research? ({branch.commit_count} commits, {len(branch.doc_paths)} docs)"
- header: "Merge"
- options:
- label: "Merge + Issue"
description: "Full processing: merge, organize docs, create issue"
- label: "Merge Only"
description: "Just merge the content"
- label: "Skip"
description: "Process later"
- label: "Delete"
description: "Discard this research"
- multiSelect: false
ステップ 4: マージの実行
ユーザーの選択に基づいて実行します。
オプション A: マージ + Issue (完全処理)
# 1. Ensure clean working directory
git status --porcelain
# If dirty, prompt user to commit or stash first
# 2. Squash merge the research branch
git merge --squash origin/claude/research-[topic]-[session-id]
# 3. Organize docs (if not already in docs/research/)
mkdir -p docs/research
# Move any root-level research docs
git mv RESEARCH*.md docs/research/ 2>/dev/null || true
git mv *_RESEARCH.md docs/research/ 2>/dev/null || true
# 4. Commit with standard message
git commit -m "docs(research): merge [topic] research from web session
Merged from: [branch-name]
Created: [created-ago]
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
# 5. Create GitHub issue
gh issue create --title "[Research] [Topic Title]" --body "[generated-body]" --label "research,documentation"
# 6. Delete remote branch
git push origin --delete claude/research-[topic]-[session-id]
オプション B: マージのみ
git merge --squash origin/claude/research-[topic]-[session-id]
git commit -m "docs(research): merge [topic] research
Merged from: [branch-name]
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
# Optionally delete branch
# Ask: "Delete the remote branch?"
オプション C: スキップ
アクションなし - ブランチは将来の処理のために残されます。
オプション D: 削除
# Confirm deletion
# "Are you sure? This research will be permanently lost."
git push origin --delete claude/research-[topic]-[session-id]
ステップ 5: 要約レポート
すべてのブランチを処理した後。
## Research Processing Complete
| Branch | Action | Result |
|--------|--------|--------|
| research-claude-code | Merged + Issue | Issue #182 created |
| research-audio-hooks | Skipped | - |
| research-old-test | Deleted | - |
**Next Steps:**
- Review created issues
- Run `/popkit:next` to see updated recommendations
Issue の生成
タイトル形式
[Research] {Topic Title}
例:
[Research] Claude Code v2.0.65 Features Integration[Research] Audio Feedback Hooks Architecture
本文形式
## Summary
{Executive summary from research doc}
## Source
- **Branch:** `{full_branch_name}`
- **Created:** {created_ago}
- **Files:** {file_count} changed
## Documentation
- `docs/research/{doc_name}.md`
## Implementation Tasks
- [ ] {Task 1 from research}
- [ ] {Task 2 from research}
---
*Auto-generated from research branch by PopKit*
ラベル
自動的に適用されます。
research- リサーチの成果物としてマークします。documentation- ドキュメントが含まれています。
コンテンツからオプションで検出されます。
enhancement- 実装タスクが見つかった場合。P1-high/P2-medium/P3-low- 優先度メタデータから。
エラー処理
| 状況 | 対応 |
|---|---|
| ダーティな作業ディレクトリ | コミット/スタッシュを促す |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Research Branch Merge
Overview
Handles the complete workflow for processing research branches created during Claude Code Web sessions:
- Detect research branches
- Preview content for user approval
- Squash-merge to main branch
- Move docs to standardized location
- Create GitHub issue from findings
- Clean up remote branch
Trigger: Called by pop-next-action skill when research branches detected, or directly via /popkit:research merge.
User Interaction Pattern
ALWAYS use AskUserQuestion for merge decisions:
Use AskUserQuestion tool with:
- question: "Found research branch: [topic]. How should we process it?"
- header: "Research"
- options:
- label: "Merge and create issue"
description: "Squash-merge, move docs, create GitHub issue, delete branch"
- label: "Merge only"
description: "Squash-merge content without creating issue"
- label: "Skip for now"
description: "Leave branch for later processing"
- label: "Delete branch"
description: "Discard research (cannot be undone)"
- multiSelect: false
Processing Workflow
Step 1: Detect Research Branches
Use the research_branch_detector.py utility:
import sys
# No longer needed - install popkit-shared instead
from research_branch_detector import (
fetch_remotes,
get_research_branches,
format_branch_table,
get_branch_content_preview,
parse_research_doc,
generate_issue_body
)
# Fetch and detect
fetch_remotes()
branches = get_research_branches()
if not branches:
print("No research branches detected.")
return
# Show table
print("## Research Branches Detected\n")
print(format_branch_table(branches))
Step 2: Preview Content
For each branch, show a preview before prompting:
for branch in branches:
print(f"\n### {branch.short_name}")
print(f"**Topic:** {branch.topic}")
print(f"**Created:** {branch.created_ago}")
print(f"**Commits:** {branch.commit_count} ahead of master")
if branch.doc_paths:
print(f"\n**Documentation:**")
for path in branch.doc_paths:
print(f"- `{path}`")
# Show summary preview
previews = get_branch_content_preview(branch, max_lines=20)
for path, content in previews.items():
parsed = parse_research_doc(content)
if parsed.get("summary"):
print(f"\n**Summary:** {parsed['summary'][:200]}...")
Step 3: User Decision
Use AskUserQuestion for each branch:
Use AskUserQuestion tool with:
- question: f"Process '{branch.topic}' research? ({branch.commit_count} commits, {len(branch.doc_paths)} docs)"
- header: "Merge"
- options:
- label: "Merge + Issue"
description: "Full processing: merge, organize docs, create issue"
- label: "Merge Only"
description: "Just merge the content"
- label: "Skip"
description: "Process later"
- label: "Delete"
description: "Discard this research"
- multiSelect: false
Step 4: Execute Merge
Based on user choice:
Option A: Merge + Issue (Full Processing)
# 1. Ensure clean working directory
git status --porcelain
# If dirty, prompt user to commit or stash first
# 2. Squash merge the research branch
git merge --squash origin/claude/research-[topic]-[session-id]
# 3. Organize docs (if not already in docs/research/)
mkdir -p docs/research
# Move any root-level research docs
git mv RESEARCH*.md docs/research/ 2>/dev/null || true
git mv *_RESEARCH.md docs/research/ 2>/dev/null || true
# 4. Commit with standard message
git commit -m "docs(research): merge [topic] research from web session
Merged from: [branch-name]
Created: [created-ago]
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
# 5. Create GitHub issue
gh issue create --title "[Research] [Topic Title]" --body "[generated-body]" --label "research,documentation"
# 6. Delete remote branch
git push origin --delete claude/research-[topic]-[session-id]
Option B: Merge Only
git merge --squash origin/claude/research-[topic]-[session-id]
git commit -m "docs(research): merge [topic] research
Merged from: [branch-name]
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
# Optionally delete branch
# Ask: "Delete the remote branch?"
Option C: Skip
No action - branch remains for future processing.
Option D: Delete
# Confirm deletion
# "Are you sure? This research will be permanently lost."
git push origin --delete claude/research-[topic]-[session-id]
Step 5: Summary Report
After processing all branches:
## Research Processing Complete
| Branch | Action | Result |
|--------|--------|--------|
| research-claude-code | Merged + Issue | Issue #182 created |
| research-audio-hooks | Skipped | - |
| research-old-test | Deleted | - |
**Next Steps:**
- Review created issues
- Run `/popkit:next` to see updated recommendations
Issue Generation
Title Format
[Research] {Topic Title}
Examples:
[Research] Claude Code v2.0.65 Features Integration[Research] Audio Feedback Hooks Architecture
Body Format
## Summary
{Executive summary from research doc}
## Source
- **Branch:** `{full_branch_name}`
- **Created:** {created_ago}
- **Files:** {file_count} changed
## Documentation
- `docs/research/{doc_name}.md`
## Implementation Tasks
- [ ] {Task 1 from research}
- [ ] {Task 2 from research}
---
*Auto-generated from research branch by PopKit*
Labels
Automatically apply:
research- Marks as research outputdocumentation- Contains documentation
Optionally detect from content:
enhancement- If implementation tasks foundP1-high/P2-medium/P3-low- From priority metadata
Error Handling
| Situation | Response |
|---|---|
| Dirty working directory | Prompt to commit/stash first |
| Merge conflicts | Show conflicts, offer manual resolution |
| gh CLI unavailable | Skip issue creation, note in output |
| No doc files | Merge anyway, create minimal issue |
| Branch already merged | Skip, note in output |
Research Document Standard
For best results, research docs should follow this format:
# Research: [Topic Name]
**Research Date:** YYYY-MM-DD
**Status:** Research Document
**Priority:** P1-high | P2-medium | P3-low
## Executive Summary
[Brief summary of findings - becomes issue body]
## Key Findings
[Main research content]
## Implementation Tasks
- [ ] Task 1 [becomes checklist in issue]
- [ ] Task 2
- [ ] Task 3
## References
[Links and sources]
Integration Points
| Component | Role |
|---|---|
pop-next-action |
Calls this skill when branches detected |
research_branch_detector.py |
Core detection logic |
/popkit:next |
Entry point for auto-detection |
/popkit:routine morning |
Can include in morning routine |
| GitHub Issues | Output destination for findings |
Related
/popkit:next- Primary entry point/popkit:routine morning- Can detect in morning checkhooks/utils/research_branch_detector.py- Detection utilityoutput-styles/research-summary.md- Output formatting
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (7,717 bytes)
- 📎 scripts/detect_conflicts.py (7,640 bytes)
- 📎 scripts/merge_findings.py (8,237 bytes)