home/dot_claude/skills/github-issue/SKILL.md
GitHub issue の CRUD・コメント・ラベル・assignee 操作と、GitHub Projects v2 のカスタムフィールド更新を行う。「issue 作って」「issue を Project に入れて」「Project のステータスを In Progress にして」等で使う。標準操作は github MCP、Projects v2 は gh CLI を使い分ける。
npx skillsauth add applejxd/dotfiles github-issueInstall 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 issue の標準操作は github MCP で、GitHub Projects v2 のカスタム フィールド操作は gh CLI で行う。両者の役割分担を明確にし、典型的な エンドツーエンド手順を再現可能にするための skill。
スコープ外:
gh auth のセットアップ — 前提として済んでいる想定ユーザー指示から下記が不足している場合のみ、まとめて確認する:
owner/repogh project list --owner OWNER で取得可能)会話の文脈で答えが既に明らかな項目は再確認しない。
| 操作 | 手段 | 補足 |
|---|---|---|
| Issue CRUD / コメント / ラベル / assignee / 検索 | github MCP (mcp__github__*) | 構造化 JSON で扱える、認証共有 |
| Project への issue 追加・除去 | gh CLI (gh project item-add / item-archive / item-delete) | MCP 未提供 |
| Project カスタムフィールド更新 | gh CLI (gh project item-edit) | field / option ID 解決が必要 |
| Projects v2 GraphQL(bulk / 詳細取得) | gh api graphql | item-edit でカバーできないケース |
判断に迷ったらまず MCP を試し、ツールが存在しない / Projects v2 領域なら
gh にフォールバックする。
${CLAUDE_SKILL_DIR}/references/github-mcp-issue.md~/.claude/skills/github-issue/references/github-mcp-issue.md${CLAUDE_SKILL_DIR}/references/gh-projects-cli.md~/.claude/skills/github-issue/references/gh-projects-cli.md${CLAUDE_SKILL_DIR}/references/workflows.md~/.claude/skills/github-issue/references/workflows.mdCopilot CLI では ${CLAUDE_SKILL_DIR} が展開されないため、絶対パス
(~/.claude/skills/github-issue/...)の方を採用する。Claude Code では
どちらでも動くが ${CLAUDE_SKILL_DIR} を優先。
同梱スクリプトは ~/.claude/skills/github-issue/scripts/ 配下にある。
Copilot からも同じパス(~/.copilot/skills/github-issue/scripts/ の symlink 経由)で見える。
~/.claude/skills/github-issue/scripts/resolve-project.sh <owner> <project-number>
出力(例):
{
"project_id": "PVT_xxx",
"fields": {
"Status": {
"id": "PVTSSF_xxx",
"type": "ProjectV2SingleSelectField",
"options": { "Todo": "...", "In Progress": "...", "Done": "..." }
},
"Iteration": {
"id": "PVTIF_xxx",
"type": "ProjectV2IterationField",
"iterations": { "Sprint 12": "..." }
},
"Priority": {
"id": "PVTSSF_xxx",
"type": "ProjectV2SingleSelectField",
"options": { "P0": "...", "P1": "..." }
}
}
}
エージェントはこの JSON をセッション内に保持し、以降の呼び出しで参照する。
~/.claude/skills/github-issue/scripts/add-issue-to-project.sh \
<project-id> <issue-url>
既に登録済みの場合は冪等に既存 itemId を返す。
~/.claude/skills/github-issue/scripts/set-project-field.sh \
<project-id> <item-id> <field-id> <type> <value>
<type> は single_select / iteration / date / number / text。
single_select / iteration の場合、<value> は option ID / iteration ID
(resolve 済みの値)を渡す。
代表 3 パターンを references/workflows.md に時系列で記載:
禁止 / 必ず承認をとる:
gh issue close / gh project item-delete / item-archive、
MCP の update_issue で state を closed にする等)は ユーザー承認後のみgh auth status の token 部分も含む)gh issue の書込系で代替しない(権限粒度を粗くする)推奨:
--format json で取得 → ユーザーに提示 → 承認 → 実行mutation を
1 リクエストにまとめる(API レート節約)gh auth refresh -s project が必要なエラーが出たら、自動実行はせず
ユーザーに案内する(対話を要するため)前提が崩れていたら停止:
mcp__github__* ツールが見えない)→ セットアップ後に再実行を依頼gh auth status で project scope 不足 → gh auth refresh -s project を案内uv run pre-commit run --all-filesmise exec shellcheck -- home/dot_claude/skills/github-issue/scripts/*.shtools
Claude Code / Copilot CLI 両対応の hook を作成・検証する。「hook を作って」「ツール実行をブロックしたい」「hook が動かない」「PreToolUse / Stop を書いて」「Claude の hook を Copilot で動かしたい」と言われたときに使う。
content-media
Solution design assistant
development
Python test generation assistant
tools
Project planning assistant