github_KM
Use when the task centers on GitHub repositories, issues, pull requests, Actions runs, or `gh` CLI workflows. Trigger on requests to inspect or update issues and PRs, check CI status or logs, query re
Файлы2
Открыть в GitHubSKILL.mdskills/github/github_KM/SKILL.md
GitHubGitHub Skill
Use the gh CLI to interact with GitHub. Always specify --repo owner/repo when not in a git directory, or use URLs directly.
Pull Requests
Check CI status on a PR:
gh pr checks 55 --repo owner/repo
List recent workflow runs:
gh run list --repo owner/repo --limit 10
View a run and see which steps failed:
gh run view <run-id> --repo owner/repo
View logs for failed steps only:
gh run view <run-id> --repo owner/repo --log-failed
API for Advanced Queries
The gh api command is useful for accessing data not available through other subcommands.
Get PR with specific fields:
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'
JSON Output
Most commands support --json for structured output. You can use --jq to filter:
gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'
Issue Fix Workflow
This skill now owns the issue-fix lane that previously lived in gh-issue-fix-flow.
End-to-end flow for resolving a GitHub issue through fix, validation, and push.
1. Intake and issue context
- Use
gh issue view <id> --repo <owner/repo> --commentsto get full issue context. - If the repo is unclear, run
gh repo view --json nameWithOwnerto confirm. - Capture reproduction steps, expected behavior, and any maintainer notes.
2. Locate the code path
- Use
rg -nto locate likely files and entry points. - Read the relevant code paths with context.
- Follow repo-specific conventions (AGENTS/CLAUDE instructions).
3. Implement the fix
- Edit the minimal set of files.
- Keep changes aligned with existing architecture and style.
- Add tests when behavior changes and test coverage is practical.
4. Build and test
- Use XcodeBuildMCP for required builds/tests:
- Set defaults once:
mcp__XcodeBuildMCP__session-set-defaults. - Build:
mcp__XcodeBuildMCP__build_macosormcp__XcodeBuildMCP__build_sim. - Tests: prefer targeted schemes (e.g.,
mcp__XcodeBuildMCP__test_sim).
- Set defaults once:
- If macOS tests fail due to deployment target mismatches, run the equivalent iOS simulator tests.
- Report warnings or failures; do not hide them.
5. Commit and push
- Check for unrelated changes with
git status --short. - Stage only the fix (exclude unrelated files).
- Commit with a closing message:
Fix … (closes #<issue>). - Push with
git push.
6. Report back
- Summarize what changed and where.
- Provide test results (including failures).
- Note any follow-ups or blocked items.