github
MUST invoke when the user needs GitHub operations or GitHub API access. Trigger phrases include "gh", "GitHub", "pull request", "PR", "issue", "repo", and "workflow". Use authenticated gh for GitHub URLs and private repository access. Do NOT invoke for creating or modifying GitHub Actions workflows; use github-actions instead.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- github
- description
- MUST invoke when the user needs GitHub operations or GitHub API access. Trigger phrases include "gh", "GitHub", "pull request", "PR", "issue", "repo", and "workflow". Use authenticated gh for GitHub URLs and private repository access. Do NOT invoke for creating or modifying GitHub Actions workflows; use github-actions instead.
02 资源文件 1
- 参考文档agents/openai.yaml100 B
03 SKILL.md 正文
GitHub CLI
Use the GitHub CLI (gh) to interact with repositories and GitHub resources.
Prerequisite and Safety Boundary
- Confirm
ghis installed and authenticated withgh auth statusbefore repository operations. Letghmanage authentication; never handle, print, or persist credentials yourself. - Use
ghrather than unauthenticated web requests for GitHub URLs when private repository access is needed. - Ask for confirmation before state-changing operations such as creating, editing, merging, or deleting GitHub resources when the user has not explicitly requested them.
- Use explicit
<owner>/<repo>arguments outside a checked-out repository. Do not assume an organization, GitHub host, default branch, reviewer, or deployment environment.
Repository Commands
List repositories
gh repo list <owner> --limit 100
gh repo list <owner> --json name,description,visibility,updatedAt
gh repo list <owner> --visibility public
View repository details and branches
gh repo view <owner>/<repo>
gh repo view <owner>/<repo> --json name,description,defaultBranchRef,visibility
gh repo view <owner>/<repo> --readme
gh api repos/<owner>/<repo>/branches --jq '.[].name'
Pull Requests
List and view
gh pr list --repo <owner>/<repo>
gh pr list --repo <owner>/<repo> --state all --json number,title,state,author
gh pr view <number> --repo <owner>/<repo>
gh pr view <number> --repo <owner>/<repo> --json title,body,state,reviews
Create with a body file
For Markdown, tables, or backticks, use --body-file rather than an inline shell argument. Write the body with AI Workflow's pr skill when that plugin is installed; otherwise follow the repository's PR template.
cat > /tmp/pr-body.md << 'EOF'
## Summary
<diagram, diff-sketch, or tree>
## Evidence
- **Before:** <failing test or output>
**After:** <passing test or output>
## Merge Danger
**Door:** two-way
**Blast Radius:** <one word>
EOF
gh pr create --title "Describe the change" --body-file /tmp/pr-body.md --base <base-branch>
An inline body is appropriate only for simple text that has been safely quoted. Use a blank line before a Markdown table so it renders correctly.
Edit a pull request description
gh pr edit <number> --repo <owner>/<repo> --body-file /tmp/pr-body.md
Issues
gh issue list --repo <owner>/<repo>
gh issue list --repo <owner>/<repo> --state all --json number,title,state
gh issue view <number> --repo <owner>/<repo>
GitHub Actions Inspection
Use github-actions to design or change workflow files. Use these commands to inspect existing workflows and runs.
gh workflow list --repo <owner>/<repo>
gh run list --repo <owner>/<repo>
gh run list --repo <owner>/<repo> --workflow <workflow-name>
gh run view <run-id> --repo <owner>/<repo>
gh run view <run-id> --repo <owner>/<repo> --log
Secrets Metadata (Read-only)
These commands list secret names only; secret values are not available through GitHub.
gh secret list --repo <owner>/<repo>
gh secret list --org <owner>
API Access
Use gh api for advanced queries or private repository content.
gh api repos/<owner>/<repo>
gh api repos/<owner>/<repo>/commits --jq '.[].sha'
gh api repos/<owner>/<repo>/actions/runs --jq '.workflow_runs[].name'
gh api repos/<owner>/<repo>/commits --paginate --jq '.[].sha'
View a repository file
gh api repos/<owner>/<repo>/contents/<path> --jq '.content' \
| python3 -c 'import base64, sys; sys.stdout.write(base64.b64decode(sys.stdin.read()).decode())'
gh api "repos/<owner>/<repo>/contents/<path>?ref=<branch>" --jq '.content' \
| python3 -c 'import base64, sys; sys.stdout.write(base64.b64decode(sys.stdin.read()).decode())'
GraphQL query
gh api graphql -f query='
query {
repository(owner: "<owner>", name: "<repo>") {
name
description
defaultBranchRef { name }
}
}
'
Common Patterns
# Check whether a repository is accessible.
gh repo view <owner>/<repo> --json name 2>/dev/null && echo "exists" || echo "not found"
# Get the latest commit on the repository's default branch.
DEFAULT_BRANCH=$(gh repo view <owner>/<repo> --json defaultBranchRef --jq '.defaultBranchRef.name')
gh api repos/<owner>/<repo>/commits/$DEFAULT_BRANCH --jq '.sha'
Related Skills
- Use
github-actionsto scaffold or update CI/CD workflows. - Use repository-local review and release guidance for actions that create, merge, publish, or deploy.
04 同仓库更多 Skills
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Local database with 79 searchable styles (88 catalog entries), 192 color palettes, 74 font pairings, 192 product types, 119 UX guidelines, 105 curated icon entries, 17 GSAP motion presets, and 25 chart types across 22 stacks (React, Next.js, Vue, Nuxt, Svelte, Astro, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Jetpack Compose, Angular, Laravel, JavaFX, WPF, WinUI, Avalonia, Uno Platform, UWP, Three.js, and HTML/CSS). Use when designing, building, or reviewing UI: pages, components, color schemes, typography, layout, accessibility, animation, or data visualization.
figma-mcp
Implement or compare UI against Figma designs using an available Figma MCP integration. Use for Figma-backed implementation, design-token extraction, or visual-parity gap analysis; Figma MCP access is optional and must already be configured by the user.
improve-codebase-architecture
Find evidence-based, active-change architecture improvements using shared design and domain-modeling guidance. Use when a user wants to reduce architectural friction, deepen a module, or make a current change safer, more testable, and easier to navigate.
domain-modeling
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing GLOSSARY.md or CONTEXT.md, or recording or editing an ADR.
codebase-design
Provide the shared vocabulary and discipline for designing deep modules with clear interfaces and seams. Use when a user wants to design or improve a module, find deepening opportunities, choose a seam, or make code more testable and AI-navigable.
test-coverage-review
MUST invoke to review whether added or updated tests cover code changes in a diff. Checks new logic, branches, error paths, and regression risk, producing a change-to-test matrix. Use requirements-to-tests-traceability for acceptance-criteria mapping and orchestrated-review for bundled reviews.