gh-projects
Use when working with GitHub Projects — listing items, changing status, adding issues or PRs, or looking up project field IDs
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 10
- Forks
- 0
01 前言 Front Matter
- name
- gh-projects
- description
- Use when working with GitHub Projects — listing items, changing status, adding issues or PRs, or looking up project field IDs
03 SKILL.md 正文
GitHub Projects
Quick reference for gh project commands on personal projects (@me). Run gh project <command> --help for full flags.
The ID Chain
Most gh project commands need internal IDs, not human-readable names. Resolve them in order:
1. Project number
gh project list --owner "@me"
Plain tabular output. The first column is the project number.
2. Project ID and field IDs
gh project field-list <number> --owner "@me" --format json
Returns all fields with their IDs and types. Single-select fields (like Status) include an options array with option IDs and names:
{
"id": "PVTSSF_...",
"name": "Status",
"options": [
{ "id": "f75ad846", "name": "Backlog" },
{ "id": "47fc9ee4", "name": "In Progress" }
],
"type": "ProjectV2SingleSelectField"
}
3. Item ID
gh project item-list <number> --owner "@me"
The last column is the item ID (PVTI_...).
4. Project global ID
Needed for item-edit. Extract from field-list or view JSON output, or from the fourth column of gh project list.
Common Operations
| Task | Command |
|---|---|
| List items | gh project item-list <num> --owner "@me" |
| Add issue/PR | gh project item-add <num> --owner "@me" --url <issue-url> |
| Create draft | gh project item-create <num> --owner "@me" --title "..." --body "..." |
| Change status | gh project item-edit --id <item-id> --project-id <project-id> --field-id <field-id> --single-select-option-id <option-id> |
| Edit text field | gh project item-edit --id <item-id> --project-id <project-id> --field-id <field-id> --text "..." |
| Clear field | gh project item-edit --id <item-id> --project-id <project-id> --field-id <field-id> --clear |
| View in browser | gh project view <num> --owner "@me" --web |
Batching
Each gh project call triggers a permission prompt. Minimize prompts by combining multiple operations into a single Bash call when possible — especially when resolving the ID chain or editing multiple items.
Gotchas
--format json --jqoften fails because the top-level output is an array. Pipe tojqinstead, or use--format jsonalone and parse with Python.item-editonly updates one field per invocation. To change status and assignee, run it twice.- Single-select fields need
--single-select-option-id, not--text. Check the field type infield-listoutput. - The
--ownerflag defaults to the authenticated user only for some commands. Pass"@me"explicitly.
04 同仓库更多 Skills
zoekt
Use when searching code across repositories — prefer zoekt over grep/ripgrep for indexed code search. Covers indexing repos, search syntax, and query patterns.
writing-for-accessibility
Use when writing documentation, alt text, diagrams, or any content that should be accessible to people with disabilities. Covers alt text, color contrast, inclusive language, and accessible visuals. Also use when reviewing documents for accessibility.
writing-error-messages
Use when writing, reviewing, or improving error messages in code, CLI tools, APIs, or UIs. Covers identifying the cause, explaining the fix, and setting the right tone. Also use when error messages are vague, unactionable, or confusing.
working-in-the-open
Use when making design decisions during implementation — routes rationale to the right venue (commits, task comments, code comments, or documentation) based on how durable the context needs to be
web-standards
Use when writing or reviewing HTML, CSS, or browser JavaScript — covers semantic markup, native platform features over libraries, Baseline browser support, accessibility and APCA contrast, and optional validation with vnu, axe, and Lighthouse
web-design
Use when designing or building web UI, frontends, or styling — covers personal web design preferences, fluid layout, and Alpine.js