| name | comment-github-issue |
| description | GitHub Issue や Pull Request にコメントを投稿する。Use when Claude needs to: (1) Post a comment on a GitHub Issue, (2) Post a comment on a Pull Request, (3) Reply to existing discussions. コメント本文を標準入力から受け取ることで引用符の問題を回避する。 |
Comment on GitHub Issue / Pull Request
Quick start
コメントは 標準入力から渡す。引用符のエスケープ問題を避けるため、--body 引数は使わないこと。
コメント本文の末尾には > :robot: Generated by <Agent名> を必ず付ける。Agent名は自分の実行環境に応じて以下から選ぶ。
Claude Code
OpenCode
Codex
Issue にコメントを投稿する
echo "コメント本文" | ~/.claude/skills/comment-github-issue/scripts/gh-comment issue <number> --agent "OpenCode"
Pull Request にコメントを投稿する
echo "コメント本文" | ~/.claude/skills/comment-github-issue/scripts/gh-comment pr <number> --agent "OpenCode"
別リポジトリに投稿する
echo "コメント本文" | ~/.claude/skills/comment-github-issue/scripts/gh-comment issue <number> --agent "OpenCode" --repo owner/repo
複数行のコメントを投稿する
cat <<'EOF' | ~/.claude/skills/comment-github-issue/scripts/gh-comment issue <number> --agent "OpenCode"
- foo を修正
- bar を追加
EOF
ファイルからコメントを投稿する
cat comment.md | ~/.claude/skills/comment-github-issue/scripts/gh-comment pr <number> --agent "OpenCode"
Usage
gh-comment <type> <number> --agent <agent-name> [--repo <owner/repo>]
Arguments:
type issue または pr
number Issue/PR番号
Options:
--agent Agent名。Claude Code、OpenCode、Codex のいずれか
--repo owner/repo 形式のリポジトリ(省略時はカレントリポジトリ)
Notes
- コメント本文は必ず stdin から渡すこと(
--body 引数は引用符の問題が起きやすいため使わない)
--agent には自分の Agent 名を Claude Code、OpenCode、Codex から選んで渡すこと
- wrapper が stdin の本文末尾に
> :robot: Generated by <Agent名> を追加する
- カレントディレクトリが git リポジトリでない場合は
--repo オプションが必要