Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
日本語の概要は準備中です。原文の説明を表示しています。
Triage, fix, and pre-flight a PR before merge. Checks mergeability, CI, reviews, and bot comments — fixes issues, runs /pre-commit before pushing, then hands off to /pr-merge.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Full triage, fix, and pre-flight for a PR. Diagnoses all issues (merge conflicts, CI failures, bot comments, review requests), fixes them, enforces /pre-commit before pushing, then hands off to /pr-merge for the actual merge and post-merge workflow.
/pr-fix <pr-number>
Relationship with other skills:
/pr-fix = triage problems + fix them + pre-flight validation (you stay on the PR branch)/pr-merge = validate readiness + execute merge + post-merge workflow (docs, milestone, release)/pr-fix first when you know there are issues. Use /pr-merge when you expect the PR is ready.Checkout the PR branch first:
gh pr checkout <pr-number>
Then run ALL four sources in parallel:
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
PR=<pr-number>
# 1. PR metadata — mergeability, draft state, review decision
gh pr view $PR --json mergeable,isDraft,state,reviewDecision,additions,deletions
# 2. CI check status
gh pr checks $PR --repo $REPO
# 3. Bot inline comments (Codex, Gemini, etc.)
gh api repos/$REPO/pulls/$PR/comments \
--jq '.[] | "[\(.path):\(.line // .original_line // "?")]\n\(.body)\n---"'
# 4. Top-level reviews (approval/request-changes state)
gh pr view $PR --repo $REPO --json reviews \
--jq '.reviews[] | "\(.author.login) [\(.state)]: \(.body)"'
# 5. Forgejo CI status (if dual-remote)
SHA=$(gh pr view $PR --json headRefOid --jq '.headRefOid')
fi
If bot reviews are still pending, poll until complete (max 3 attempts, 30s apart):
for i in 1 2 3; do
STATE=$(gh pr checks $PR --repo $REPO 2>&1)
echo "$STATE"
echo "$STATE" | grep -q "pending" && sleep 30 || break
done
| Condition | Action |
|---|---|
mergeable: CONFLICTING | "Merge conflicts detected. Resolve first: gh api -X PUT repos/O/R/pulls/N/update-branch or rebase locally, then re-run /pr-fix." |
isDraft: true | "PR is a draft. Mark as ready for review first." |
state != OPEN | "PR is not open (state: X). Nothing to fix." |
| Condition | Route |
|---|---|
| CI failing | → Phase 3 fix loop |
| Bot comments (P1/P2) | → Phase 3 fix loop |
CHANGES_REQUESTED | → Phase 3 fix loop (address review comments) |
REVIEW_REQUIRED (zero reviews) | Note it — addressed at Phase 6 handoff |
| All passing, no issues | Skip Phase 3 → go directly to Phase 4 pre-flight |
Fix one category at a time. Verify locally after each fix before moving to the next.
Build/Dependency Issues:
rm -rf node_modules package-lock.json || rm -rf __pycache__ .pytest_cache
npm ci || pip install -r requirements.txt
npm run build || python -m build
Test Failures:
npm run test -- --verbose || pytest -v --tb=short -m "not integration and not e2e"
npm run test:integration || pytest tests/integration/ # CI runs full suite; run locally only if diagnosing integration failures
Code Quality Issues:
npm run lint -- --fix || ruff format . && ruff check --fix .
npm run format || prettier --write .
npm run typecheck || mypy .
Security Issues:
npm audit fix || safety check && pip-audit --fix
npx audit-ci --moderate || bandit -r src/
Test Failures:
Quality Issues:
Bot Review Comments (Codex P1/P2, Gemini):
Human Review (CHANGES_REQUESTED):
JavaScript/TypeScript:
npm audit fix && npm run build
npm run test -- --updateSnapshot
npm run test:coverage -- --coverageThreshold='{"global":{"branches":80}}'
npx eslint . --fix && npx prettier --write .
npx tsc --noEmit
Python:
pip install -r requirements.txt && safety check
pytest -m "not integration and not e2e" # coverage threshold enforced on CI, not locally
ruff format . && ruff check --fix . && mypy src/
Docker/Infrastructure:
docker build -t test-image .
terraform validate && terraform plan
Always run /pre-commit before pushing any fix to the PR. This enforces the same checks CI will run — catching failures locally before they hit the pipeline and breaking the push→CI-fail→fix→repeat cycle.
/pre-commit
Runs: quality check → tests → coverage → security scan → changelog → companion gate.
For large diffs (additions + deletions > 200 lines), also run first:
/review changes --quick
External AI second opinion on the code changes. Address any BLOCK-level findings before pushing. --quick skips the deeper audits (silent-failures, types, comments) for speed.
Do not proceed to Phase 5 until /pre-commit passes.
git add .
git commit -m "fix(pr): resolve PR #<pr-number> issues
- Fixed: [specific issue description]
- Tests: [test fixes applied if any]
- Security: [security issues resolved if any]"
git push
# Monitor GitHub CI
gh pr checks <pr-number> --watch
# Monitor Forgejo CI (dual-remote projects)
SHA=$(git rev-parse HEAD)
TOKEN=$(cat ~/.config/forgejo/token)
sleep 60
for i in 1 2 3; do
RESULT=$(curl -s \
-H "Authorization: token $TOKEN")
STATE=$(echo "$RESULT" | python3 -c "import json,sys; print(json.load(sys.stdin)['state'])" 2>/dev/null)
echo "Forgejo CI: $STATE (attempt $i)"
[ "$STATE" = "pending" ] && sleep 30 || break
done
echo "$RESULT" | python3 -c "
import json,sys; d=json.load(sys.stdin)
print(f'Forgejo CI: {d[\"state\"]} ({d[\"total_count\"]} checks)')
for s in (d.get('statuses') or []):
print(f' {s[\"context\"]}: {s[\"status\"]}')
"
# If Forgejo CI failed, loop back to Phase 3
[ "$STATE" = "failure" ] && echo "FORGEJO CI FAILED — return to Phase 3 fix loop"
fi
# Re-check bot reviews after pushing fixes
gh api repos/$REPO/pulls/<pr-number>/comments \
--jq '.[] | "[\(.path):\(.line // .original_line // "?")]\n\(.body)\n---"'
If REVIEW_REQUIRED (no human reviews on this PR):
PR has no reviews yet. Consider getting a second opinion before requesting merge:
/review pr <N> — external AI review (MERGE/BLOCK verdict, ~5 min)
Then run the merge orchestrator:
/pr-merge <N>
If all checks passing and reviews satisfied:
All issues resolved. Run the merge orchestrator:
/pr-merge <N>
/pr-merge owns the merge decision, branch cleanup, milestone check, and release readiness. Do not auto-merge here.
/pre-commit is mandatory — it prevents the push→CI-fail→fix→repeat cyclegh pr checks --watch to monitor CI progress after pushまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze feature requirements, dependencies, and security considerations. Use when starting feature implementation from GitHub issues to understand scope, technical feasibility, and risks.
日本語の概要は準備中です。原文の説明を表示しています。
Run SQL queries against psql, BigQuery, or MySQL from the terminal, including natural-language-to-SQL and schema exploration. Use when analyzing data, inspecting DB state, or debugging tables. Trigger on "query the database", "SQL", "show me data from", "explore table".
日本語の概要は準備中です。原文の説明を表示しています。
Design REST APIs or function contracts with clear request/response specifications, error handling patterns, authentication strategies, and comprehensive documentation.
日本語の概要は準備中です。原文の説明を表示しています。
Generate comprehensive API endpoint tests for REST and GraphQL APIs. Creates tests for all HTTP methods, status codes, authentication, and validation.
日本語の概要は準備中です。原文の説明を表示しています。
Design component architecture and module structure using established architectural patterns for clean, maintainable, and scalable systems.
日本語の概要は準備中です。原文の説明を表示しています。