home/dot_agents/skills/github-sub-issues/SKILL.md
This skill should be used when the user asks about "sub-issues", "sub-issue", "サブイシュー", "子イシュー", "issue type", "Issue Type", mentions "parent issue", "親issue", or discusses managing hierarchical GitHub issues using GraphQL API. Provides operations for listing, adding, removing sub-issues, and setting Issue Types.
npx skillsauth add kryota-dev/dotfiles github-sub-issuesInstall 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.
GitHub の Sub-issue 機能および Issue Types 機能を GraphQL API で操作するスキルです。
Sub-issue と Issue Types の機能を使用するには、GraphQL API リクエストに特別なヘッダーが必要です:
| 機能 | 必須ヘッダー |
|------|-------------|
| Sub-issues | -H "GraphQL-Features: sub_issues" |
| Issue Types | -H "GraphQL-Features: issue_types" |
# Step 1: Parent Issue の Node ID を取得
PARENT_ID=$(gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
issue(number: ISSUE_NUMBER) { id }
}
}' --jq '.data.repository.issue.id')
# Step 2: Sub-issues を取得
gh api graphql \
-H "GraphQL-Features: sub_issues" \
-f query="
query {
node(id: \"$PARENT_ID\") {
... on Issue {
number
title
subIssues(first: 50) {
nodes {
number
title
state
}
}
subIssuesSummary {
total
completed
percentCompleted
}
}
}
}"
# Parent と Sub-issue の Node ID を取得
PARENT_ID=$(gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
issue(number: PARENT_NUMBER) { id }
}
}' --jq '.data.repository.issue.id')
CHILD_ID=$(gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
issue(number: CHILD_NUMBER) { id }
}
}' --jq '.data.repository.issue.id')
# Sub-issue として追加
gh api graphql \
-H "GraphQL-Features: sub_issues" \
-f query="
mutation {
addSubIssue(input: {
issueId: \"$PARENT_ID\"
subIssueId: \"$CHILD_ID\"
}) {
issue { number title }
subIssue { number title }
}
}"
gh api graphql \
-H "GraphQL-Features: sub_issues" \
-f query="
mutation {
removeSubIssue(input: {
issueId: \"$PARENT_ID\"
subIssueId: \"$CHILD_ID\"
}) {
issue { number title }
}
}"
gh api graphql \
-H "GraphQL-Features: sub_issues" \
-f query="
query {
node(id: \"$ISSUE_NODE_ID\") {
... on Issue {
number
title
parent {
number
title
}
}
}
}"
gh api graphql \
-H "GraphQL-Features: issue_types" \
-f query='
query {
organization(login: "ORG_NAME") {
issueTypes(first: 25) {
nodes {
id
name
description
color
isEnabled
}
}
}
}'
出力例:
{
"data": {
"organization": {
"issueTypes": {
"nodes": [
{"id": "IT_kwDOxxxxxx", "name": "Task", "description": "A specific piece of work", "isEnabled": true},
{"id": "IT_kwDOyyyyyy", "name": "Bug", "description": "An unexpected problem", "isEnabled": true},
{"id": "IT_kwDOzzzzzz", "name": "Enhancement", "description": "A request or new functionality", "isEnabled": true},
{"id": "IT_kwDOwwwwww", "name": "Epic", "description": "A larger requirement", "isEnabled": true}
]
}
}
}
}
gh api graphql \
-H "GraphQL-Features: issue_types" \
-f query='
query {
repository(owner: "OWNER", name: "REPO") {
issue(number: ISSUE_NUMBER) {
number
title
issueType {
id
name
description
}
}
}
}'
# Step 1: Issue の Node ID を取得
ISSUE_NODE_ID=$(gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
issue(number: ISSUE_NUMBER) { id }
}
}' --jq '.data.repository.issue.id')
# Step 2: Issue Type を設定
gh api graphql \
-H "GraphQL-Features: issue_types" \
-f query="
mutation {
updateIssueIssueType(input: {
issueId: \"$ISSUE_NODE_ID\"
issueTypeId: \"IT_kwDOxxxxxx\"
}) {
issue {
number
title
issueType { name }
}
}
}"
#!/bin/bash
# Epic #123 の全 sub-issues を Enhancement に設定する例
OWNER="<OWNER>"
REPO="<REPO>"
EPIC_NUMBER=123
ISSUE_TYPE_NAME="Enhancement"
# 1. Epic の Node ID を取得
EPIC_ID=$(gh api graphql -f query="
query {
repository(owner: \"$OWNER\", name: \"$REPO\") {
issue(number: $EPIC_NUMBER) { id }
}
}" --jq '.data.repository.issue.id')
# 2. Sub-issues の番号を取得
SUB_ISSUE_NUMBERS=$(gh api graphql \
-H "GraphQL-Features: sub_issues" \
-f query="
query {
node(id: \"$EPIC_ID\") {
... on Issue {
subIssues(first: 50) {
nodes { number }
}
}
}
}" --jq '.data.node.subIssues.nodes[].number')
# 3. Organization から Issue Type ID を取得
ORG="${OWNER}"
ISSUE_TYPE_ID=$(gh api graphql \
-H "GraphQL-Features: issue_types" \
-f query="
query {
organization(login: \"$ORG\") {
issueTypes(first: 25) {
nodes { id name isEnabled }
}
}
}" --jq ".data.organization.issueTypes.nodes[] | select(.name == \"$ISSUE_TYPE_NAME\" and .isEnabled == true) | .id")
echo "Epic ID: $EPIC_ID"
echo "Issue Type ID for $ISSUE_TYPE_NAME: $ISSUE_TYPE_ID"
echo ""
# 4. 各 sub-issue に Issue Type を設定
for issue_num in $SUB_ISSUE_NUMBERS; do
echo "Setting Issue Type for #$issue_num..."
# Issue の Node ID を取得
NODE_ID=$(gh api graphql -f query="
query {
repository(owner: \"$OWNER\", name: \"$REPO\") {
issue(number: $issue_num) { id }
}
}" --jq '.data.repository.issue.id')
# Issue Type を設定
RESULT=$(gh api graphql \
-H "GraphQL-Features: issue_types" \
-f query="
mutation {
updateIssueIssueType(input: {
issueId: \"$NODE_ID\"
issueTypeId: \"$ISSUE_TYPE_ID\"
}) {
issue {
number
issueType { name }
}
}
}")
echo "$RESULT" | jq -c '.data.updateIssueIssueType.issue'
done
development
`cc-code-review` エージェントを起動して独立したコンテキストでコードレビューを実行する。 現在のセッションのバイアスのないフレッシュな視点で、プロジェクトの CLAUDE.md を踏まえたレビューを行う。 トリガー: "cc-code-review", "ccでレビュー", "別の視点でレビュー", "セカンドオピニオン" 使用場面: (1) PRのコードレビュー (2) ブランチ差分のレビュー (3) 特定ファイルのレビュー (4) 現在の変更のレビュー
tools
Comprehensive guide for the `wtp` (Worktree Plus) CLI by satococoa — an enhanced Git worktree manager. Use this whenever the user wants to create, list, remove, or navigate Git worktrees with wtp, mentions `wtp add`/`wtp cd`/`wtp list`/`wtp remove`/`wtp exec`, asks about automatic worktree paths from branch names, post-create hooks (copy/symlink/command) in `.wtp.yml`, branch tracking for worktrees, or shell integration (`wtp shell-init`, `wtp hook`, tab completion, auto-cd). Trigger this even when the user just describes the workflow — e.g. 'spin up a worktree for this feature branch', 'jump to my auth worktree', 'clean up the worktree and its branch' — without naming wtp explicitly, as long as wtp is the available tool.
tools
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.