project-update-items
プロジェクトアイテムのフィールド値 (Status/Priority/Size 他) をクエリフィルタやアイテム指定で絞り込んで一括更新する。SINGLE_SELECT/TEXT/NUMBER/DATE のフィールドタイプに対応。「Status を In Progress に変更」「優先度を一括更新」「Todo を全部 In Progress に」などで使用。
How do I install this agent skill?
npx skills add https://github.com/fandhe-ai/agent-cli-skills --skill project-update-itemsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill facilitates bulk updates to GitHub Project items using the official GitHub CLI. It includes a mandatory user confirmation step to review changes before they are applied, mitigating risks of unintended actions.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
project-update-items
プロジェクトアイテムのフィールド値を一括で更新します。ステータス変更、優先度変更、サイズ設定などに対応します。
前提条件
- 対象の GitHub Project にアイテムが存在すること
ghCLI がインストールされ、認証済みであること(projectスコープ付き)
フロー
Step 1: 更新対象と更新内容を確認する
ユーザーから以下を確認:
- 対象の指定方法:
- クエリフィルタ(例:
status:Todo,label:bug,assignee:@me) - アイテム番号の直接指定
- 全件
- クエリフィルタ(例:
- 更新するフィールド: Status, Priority, Size, またはカスタムフィールド
- 新しい値: 例: Status → "In Progress", Priority → "High"
Step 2: フィールドメタデータを取得する
# プロジェクト ID を取得
gh project view <number> --owner <owner> --format json -q '.id'
# フィールド ID とオプション ID を取得
gh project field-list <number> --owner <owner> --format json
jq で対象フィールドの ID と、更新先の値に対応するオプション ID を解決する。
Step 3: 対象アイテムを検索する
gh project item-list <number> \
--owner <owner> \
--format json \
--limit 999
ユーザー指定の条件でアイテムをフィルタする。--query パラメータが使える場合はそちらを優先:
gh project item-list <number> \
--owner <owner> \
--query "status:Todo" \
--format json
Step 4: ユーザーに更新内容を確認する
更新対象と変更内容を一覧表示:
以下の N 件のアイテムを更新します:
- #1: ソーシャルログイン — Status: Todo → In Progress
- #2: パスワードリセット — Status: Todo → In Progress
実行しますか?
Step 5: フィールド値を一括更新する
各アイテムに対してフィールド値を更新:
gh project item-edit \
--id <item-id> \
--field-id <field-id> \
--project-id <project-id> \
--single-select-option-id <option-id>
フィールドタイプに応じて適切なフラグを使用:
- SINGLE_SELECT:
--single-select-option-id - TEXT:
--text - NUMBER:
--number - DATE:
--date(YYYY-MM-DD 形式)
Step 6: 更新結果を報告する
更新されたアイテムの一覧を表示:
| # | タイトル | フィールド | 旧値 | 新値 |
|---|---|---|---|---|
| 1 | ソーシャルログイン | Status | Todo | In Progress |
| 2 | パスワードリセット | Status | Todo | In Progress |
注意事項
- バッチ更新前に必ずユーザーの確認を得る
- オプション値がプロジェクトのフィールド定義に存在しない場合はエラーを報告する
- 複数フィールドを同時に更新する場合は、フィールドごとに
item-editを実行する - GitHub API レート制限に注意し、大量更新時はバッチサイズを調整する
- ネットワークを要する(主に API 経由。後述の「sandbox 環境での実行」節を参照)
検証
Step 6 完了後、以下で更新内容を確認する:
gh project item-list <number> --owner <owner> --format json --limit 999
対象アイテムのフィールド値が新しい値に変わっていれば完了。
sandbox 環境での実行
このスキルはネットワーク越しの GitHub 操作(gh project item-edit)を必須とする。該当コマンドはコマンド単位で sandbox 無効にして実行する。ネットワーク遮断を解除できない環境では実行できない。
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/fandhe-ai/agent-cli-skills/project-update-items">View project-update-items on skillZs</a>