.claude/skills/issue-branch/SKILL.md
Create a child issue in current branch without switching worktree
npx skillsauth add AtsushiHashimoto/research-project-template .claude/skills/issue-branchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
現在のブランチ/worktree内で子Issueを作成し、worktreeを切り替えずに作業を継続します。
用途: 大きなタスクを細かく分割して進めたい場合、または関連する小タスクを同じworktree内で処理したい場合。
/issue/branch データ前処理の実装
現在のブランチから親Issue番号を取得
feature/5-description → Issue #5)子Issueを作成
親Issueに子Issue作成を報告
現在のworktreeで作業を継続
Refs #CHILD_ISSUE_ID を使用Refs #PARENT_ISSUE_ID, #CHILD_ISSUE_ID現在のブランチから親Issue番号を取得:
BRANCH=$(git branch --show-current)
PARENT_ISSUE_ID=$(echo "$BRANCH" | grep -oE '[0-9]+' | head -1)
# エラーチェック
if [ -z "$PARENT_ISSUE_ID" ]; then
echo "Error: Could not extract parent Issue ID from branch name: $BRANCH"
echo "Branch name must contain Issue number (e.g., feature/123-description)"
exit 1
fi
子Issueを作成:
CHILD_ISSUE_TITLE="$1"
gh issue create \
--title "$CHILD_ISSUE_TITLE" \
--body "親Issue: #${PARENT_ISSUE_ID}
## 概要
[子タスクの詳細説明]
## 親タスクとの関連
このIssueは #${PARENT_ISSUE_ID} のサブタスクです。
## 作業場所
- ブランチ: \`${BRANCH}\`
- Worktree: 親タスクと同じ" \
--label "subtask"
子Issue番号を取得:
CHILD_ISSUE_ID=$(gh issue list --limit 1 --json number --jq '.[0].number')
親Issueに報告:
gh issue comment "$PARENT_ISSUE_ID" --body "## 子タスク作成
子Issue #${CHILD_ISSUE_ID} を作成しました。
- タイトル: ${CHILD_ISSUE_TITLE}
- 作業場所: 同一worktree内(ブランチ: \`${BRANCH}\`)
"
子Issueに開始報告:
gh issue comment "$CHILD_ISSUE_ID" --body "## タスク開始
親Issue #${PARENT_ISSUE_ID} と同じworktree内で作業を開始します。
- ブランチ: \`${BRANCH}\`
- コミット時の参照: \`Refs #${CHILD_ISSUE_ID}\`
"
子タスク作業時のコミット:
git commit -m "feat(scope): implement child task feature
子タスクの実装
Refs #${CHILD_ISSUE_ID}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>"
親タスクにも関連する変更の場合:
git commit -m "refactor(scope): improve parent task structure
親タスクの構造改善(子タスク #${CHILD_ISSUE_ID} に関連)
Refs #${PARENT_ISSUE_ID}, #${CHILD_ISSUE_ID}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>"
親Issue #5「データセットローダーの実装」を進めている途中で、細かいサブタスクに分割:
/issue/branch 画像前処理パイプラインの実装
/issue/branch データ拡張機能の追加
/issue/branch バッチ処理の最適化
すべて同じworktree内で順次作業し、各サブタスクごとにコミット&報告。
親Issue #7「モデルアーキテクチャの設計」の中で発見した関連タスク:
/issue/branch ハイパーパラメータ設定の追加
/issue/branch モデル評価スクリプトの作成
Feature開発中に見つけたバグを別Issueとして管理:
/issue/branch 画像読み込み時のメモリリーク修正
/issue/start と異なり、新しいworktreeを作成しません| 特徴 | /issue/start | /issue/branch | |------|-------------|-------------| | Worktree | 新規作成 | 現在のまま | | ブランチ | 新規作成 | 現在のまま | | 用途 | 独立した新タスク | 現在のタスクの子タスク | | 並行作業 | 完全に独立 | 同一ブランチ内で順次 | | クリーンアップ | Worktree削除必要 | 不要 |
data-ai
Set up data directories in a new worktree
testing
Safely remove a worktree after checking for important data
data-ai
Initialize worktree data protection configuration (run once in main repository)
research
Sync updates from research-project-template (テンプレート更新の取り込み)