github-cli
GitHub CLI workflows for repositories, issues, pull requests, actions, releases, projects, and API calls. Use when creating PRs, reviewing code, triaging issues, triggering workflows, publishing releases, managing projects, verifying attestations, or querying the GitHub API. Use for gh cli, github automation, code review, release management.
What this skill does
# GitHub CLI Skill
Provides patterns for the `gh` CLI to interact with GitHub repositories, services, and APIs directly from the terminal. Covers authentication, repository management, issues, pull requests, actions, releases, projects, search, and the REST/GraphQL API. Git workflow patterns (branching, commits, CI/CD) are handled by a separate skill.
## Quick Reference
| Area | Key Commands |
| ------------- | --------------------------------------------------------------------- |
| Auth | `gh auth status`, `gh auth login`, `gh auth token` |
| Repos | `gh repo clone`, `gh repo create`, `gh repo fork`, `gh repo sync` |
| Browse | `gh browse`, `gh browse --settings`, `gh browse file.ts:42` |
| Issues | `gh issue list`, `gh issue create`, `gh issue edit`, `gh issue close` |
| Pull Requests | `gh pr create`, `gh pr review`, `gh pr merge`, `gh pr checkout` |
| Actions | `gh run list`, `gh run view`, `gh workflow run`, `gh cache list` |
| Releases | `gh release create`, `gh release list`, `gh release verify` |
| Projects | `gh project list`, `gh project create`, `gh project item-add` |
| Search | `gh search repos`, `gh search issues`, `gh search code` |
| API | `gh api repos/{owner}/{repo}`, `gh api graphql` |
| Security | `gh attestation verify`, `gh ruleset list`, `gh secret set` |
| Status | `gh status`, `gh pr checks`, `gh pr status` |
| Codespaces | `gh codespace create`, `gh codespace ssh`, `gh codespace code` |
## Common Workflows
| Workflow | Commands |
| -------------------- | --------------------------------------------------------------------------------------------- |
| Quick PR | `git push -u origin feat` then `gh pr create --fill` |
| Draft PR | `gh pr create --draft --fill` then `gh pr ready` when done |
| Review and merge | `gh pr checkout 45` then `gh pr review --approve` then `gh pr merge --squash --delete-branch` |
| Auto-merge PR | `gh pr merge --auto --squash` (waits for required checks to pass) |
| Check CI | `gh pr checks` then `gh run watch` |
| Rerun failed CI | `gh run rerun <run-id> --failed` |
| Create release | `gh release create v1.0.0 --generate-notes` |
| Search code | `gh search code "handleAuth" --repo owner/repo` |
| Add issue to project | `gh project item-add 1 --owner @me --url <issue-url>` |
| Verify artifact | `gh attestation verify artifact.tar.gz --owner owner` |
| Trigger workflow | `gh workflow run deploy.yml -f environment=production` |
| Revert merged PR | `gh pr revert 45` |
| Sync fork | `gh repo sync` to update fork from upstream |
## Output Formatting
Most `gh` list and view commands support structured output for scripting and automation.
| Flag | Purpose |
| ------------ | --------------------------------- |
| `--json` | Output specified fields as JSON |
| `--jq` | Filter JSON with jq expressions |
| `-t` | Format JSON with Go templates |
| `--web` | Open the resource in a browser |
| `--comments` | Include comments (issues and PRs) |
## Scoping: Repo, Env, Org
Secrets and variables can be scoped to different levels.
| Scope | Flag Example |
| ------------ | ------------------------------------------- |
| Repository | `gh secret set KEY` (default) |
| Environment | `gh secret set KEY --env production` |
| Organization | `gh secret set KEY --org name --visibility` |
Project commands always require `--owner @me` or `--owner org-name`.
## Authentication Prerequisites
The `gh` CLI requires authentication before most commands work. Run `gh auth status` to verify the current session. Missing scopes cause silent failures -- use `gh auth refresh -s scope` to add scopes without re-authenticating. For CI environments, set the `GITHUB_TOKEN` or `GH_TOKEN` environment variable instead of interactive login.
## Common Mistakes
| Mistake | Correct Pattern |
| --------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Running `gh pr create` without pushing the branch first | Push with `git push -u origin branch` before creating a PR |
| Using `gh pr merge` without checking CI status | Run `gh pr checks` first or use `gh pr merge --auto` to wait for checks |
| Forgetting `--fill` when creating PRs from well-written commits | Use `gh pr create --fill` to auto-populate title and body from commits |
| Using REST API when GraphQL is more efficient for nested data | Use `gh api graphql` for queries needing related objects in one call |
| Not authenticating with correct scopes | Run `gh auth status` to verify scopes, `gh auth refresh -s scope` to add |
| Using `gh project` commands without specifying `--owner` | Always pass `--owner @me` or `--owner org-name` for project commands |
| Manually downloading CI artifacts | Use `gh run download <run-id>` to download artifacts programmatically |
| Not using `--json` for scripting | Add `--json field1,field2` and `--jq` for machine-readable output |
| Merging without `--delete-branch` | Use `gh pr merge --squash --delete-branch` to clean up after merge |
| Running `gh api` POST without `-f` fields | Use `-f key=value` for string fields, `-F` for typed fields |
## Delegation
- **Search across repositories for code patterns or issues**: Use `Explore` agent with `gh search code` and `gh search issues`
- **Automate multi-step release workflows**: Use `Task` agent to coordinate branch creation, PR merge, and release publishing
- **Plan repository structure and access controls**: Use `Plan` agent to design team permissions, branch protection, and workflow architecture
## References
- [Repos & Auth](references/repos-auth.md) -- Authentication, repository management, configuration, extensions, aliases
- [Issues](references/issues.md) -- Issue CRUD, labels, assignments, pinning, transferring, development branches
- [Pull Requests](references/pull-requests.md) -- PR creation, review, merge, checkout, checks, diff, auto-merge
- [Actions](references/actions.md) -- Workflow runs, manual triggers, secrets, variables, caches, artifact downloads
- [Releases & Search](references/releases-search.md) -- Releases, attestation verification, search, gists, SSH/GPG keys
- [Projects & API](references/projects-api.md) -- Projects v2 management, REST API, GraphQL API, rulesets, status
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.