一键导入
gh-issue
Fetch a GitHub issue, create a branch, implement with TDD, and open a PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fetch a GitHub issue, create a branch, implement with TDD, and open a PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Cut a new agnostic-ai release end to end. Use when the user wants to ship a new version (tag + GitHub Release).
Walk over all open GitHub issues that are unassigned or assigned to the current user, and process each one via the gh-issue skill, sequentially.
A sample skill for golden snapshot tests.
dos
tres
uno
| name | gh-issue |
| description | Fetch a GitHub issue, create a branch, implement with TDD, and open a PR |
| argument-hint | [issue-number] |
| disable-model-invocation | false |
Read both the issue body and every comment as requirements input. Maintainer follow-ups frequently add scope, edge cases, or override the original description; when a later comment conflicts with the body, prefer the comment.
!gh issue view ${ARGUMENTS#\#} --json number,url,title,body,labels,assignees,state,comments 2>/dev/null || echo "Provide an issue number"
Parse the issue number from $ARGUMENTS (strip # if present).
Assign yourself if unassigned:
gh issue edit <number> --add-assignee @me
Create a branch from fresh origin/main based on the issue type:
Determine the branch prefix from labels:
bug → fix/enhancement → feat/documentation → docs/feat/ (default)Branch name format: <prefix><issue-number>-<slug>
git checkout main && git pull --ff-only
git checkout -b <branch-name>
Enter Plan Mode to design the implementation:
.claude/rules/no-cross-adapter-imports.md..claude/rules/adapter-pattern.md.Create implementation plan with:
tests/integration).After plan approval, implement following TDD:
*_test.go next to the code under test)..claude/rules/error-wrapping.md..claude/rules/test-conventions.md (use t.TempDir(), testutil.Chdir, behavior-named tests).Run full test suite:
go test ./...
Fix ALL failures before proceeding.
Regenerate derived artifacts when touched:
internal/config/config.go struct tags → go run ./cmd/schemagen (see .claude/skills/regen-schema/)..agnostic-ai/ or any adapter → agnostic-ai sync then ./agnostic-ai sync --check (see .claude/skills/run-sync-check/).cmd/agnostic-ai-wasm → rebuild the playground (see .claude/skills/playground-rebuild/).Update CHANGELOG.md — add an entry under ## [Unreleased], grouped as Added, Changed, Fixed, or Removed per .claude/rules/docs-sync.md. Skip only for pure refactors or test-only changes.
Update user docs when behavior is visible:
docs/user/targets.md and docs/user/configuration.md.docs/user/spec-format.md.README.md.Commit changes using Conventional Commits (.claude/rules/conventional-commits.md):
git add <specific-files>
git commit -m "<type>(<scope>): <description>
Related to #<issue-number>"
Use ref: (not refactor:) for refactor commits. Subject under 72 chars. Body explains why, not what. Never mention AI assistance.
Final refactor commit (mandatory, last commit before PR): Re-review every file touched by this change. Look for:
.claude/rules/adapter-pattern.md, no-cross-adapter-imports.md, error-wrapping.md, go-style.md, plain-english.md.Apply fixes. Re-run go test ./.... Commit as a separate ref(...) commit — must be the final commit on the branch before PR:
git commit -m "ref(<scope>): polish <area> after #<issue-number>
Related to #<issue-number>"
If review surfaces zero changes, record that fact in the PR body instead of skipping silently.
Push and create PR:
git push -u origin <branch-name>
gh pr create \
--assignee Chemaclass \
--label "<bug|enhancement|documentation>" \
--title "<type>(<scope>): <description>" \
--body "$(cat <<'EOF'
## Summary
<1-3 bullets>
## Test plan
- [ ] go test ./...
- [ ] agnostic-ai sync --check (if specs/adapters touched)
Closes #<issue-number>
EOF
)"
Match the label to the issue type. Use Closes #<num> so merge auto-closes the issue.
Wait for CI green on the PR:
gh pr checks <pr-number-or-branch> --watch
Fix red checks on the branch (push fixes; re-watch). Do not proceed while any required check is failing. Never --no-verify past a failing required check.
Merge with admin bypass when possible: Once every required check is green:
gh pr merge <pr-number> --squash --admin --delete-branch
If --admin is rejected (token lacks admin, branch protection blocks bypass), fall back to --auto --squash --delete-branch and surface that the PR is awaiting human approval.
Sync local main after merge:
git checkout main && git fetch origin main && git reset --hard origin/main
origin/maingo test ./... passes## [Unreleased]Related to #<num>ref(...) commit (last commit on branch)Chemaclass assignee, matching label, Closes #<num>gh pr checks --watch)--admin --squash (or --auto fallback if admin blocked)main synced to origin/main