github
Use when interacting with GitHub (issues, PRs, projects, repo exploration)
What this skill does
# GitHub Skill
Use `gh` CLI to interact with GitHub repositories.
## Key Patterns
- `gh api repos/owner/repo/contents/path` — read files from any repo
- `gh api repos/owner/repo/issues/N/comments` — read issue discussions
- `gh repo view owner/repo` — README and metadata
- Add `--repo owner/repo` to any command for third-party repos
- When creating gists with markdown, use `.md` extension (e.g., `gh gist create README.md`) for proper rendering
## Issues & Projects
Everything below is project-agnostic. The actual IDs (project, field, option, issue type) are repo-specific — fetch them once and keep them in the project's own docs.
**Look up issue node ID (for use in other mutations):**
```bash
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") { issue(number: N) { id } }
}'
```
**List a repo's issue types** (to find `issueTypeId`):
```bash
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") {
issueTypes(first: 10) { nodes { id name } }
}
}'
```
**Set an issue's type** (gh CLI does not yet support `--type`):
```bash
gh api graphql -f query='mutation {
updateIssue(input: { id: "ISSUE_NODE_ID", issueTypeId: "IT_..." }) {
issue { issueType { name } }
}
}'
```
**List a project's fields + single-select option IDs** (Status, etc. — run once per project):
```bash
gh api graphql -f query='{
organization(login: "ORG") {
projectV2(number: N) {
id
fields(first: 20) {
nodes {
... on ProjectV2SingleSelectField {
id
name
options { id name }
}
}
}
}
}
}'
```
For user-owned (personal) projects, swap `organization(login: "ORG")` for `user(login: "USER")`.
**Add an issue to a project:**
```bash
gh api graphql -f query='mutation {
addProjectV2ItemById(input: {
projectId: "PVT_...",
contentId: "I_..."
}) { item { id } }
}'
```
**Find a project item ID for an issue already on the board:**
```bash
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") {
issue(number: N) {
projectItems(first: 20) {
nodes { id project { id title number } }
}
}
}
}'
```
If an issue is on multiple projects, the `project` selection disambiguates which item ID belongs to which board.
**Move a card between columns (single-select field):**
```bash
gh api graphql -f query='mutation {
updateProjectV2ItemFieldValue(input: {
projectId: "PVT_...",
itemId: "PVTI_...",
fieldId: "PVTSSF_...",
value: { singleSelectOptionId: "..." }
}) { projectV2Item { id } }
}'
```
GitHub Projects can auto-move cards when a linked PR opens or merges — configure that in the project's Workflows settings rather than scripting it. Manual moves are for the cases automation does not cover (non-closing PRs, status changes without a PR).
**Clear a single-select field (e.g. move a card back to the "no status" column / Backlog):**
```bash
gh api graphql -f query='mutation {
clearProjectV2ItemFieldValue(input: {
projectId: "PVT_...",
itemId: "PVTI_...",
fieldId: "PVTSSF_..."
}) { projectV2Item { id } }
}'
```
## PR Review Comments
PR review comments use numeric IDs in the REST API, not GraphQL node IDs.
- **List review comments**: `gh api repos/OWNER/REPO/pulls/N/comments --jq '.[].id'`
- **Reply to a review comment**: `gh api repos/OWNER/REPO/pulls/N/comments -f body='...' -F in_reply_to=COMMENT_ID` (POST to the same comments endpoint with `in_reply_to`, NOT to a `/replies` sub-endpoint)
- **Get thread GraphQL IDs**: `gh api graphql -f query='{ repository(owner: "OWNER", name: "REPO") { pullRequest(number: N) { reviewThreads(first: 20) { nodes { id isResolved comments(first: 1) { nodes { body } } } } } } }'`
- **Resolve a thread**: `gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "PRRT_..."}) { thread { isResolved } } }'`
- Avoid backticks in `-f body=` strings — shell interpolation issues. Use single quotes.
### Responding to review feedback
After pushing fixes for review comments, reply to each comment explaining what was done, then resolve threads that are fully addressed. Leave threads open if the feedback is deferred or tracked elsewhere.
## Worktree Gotchas
`gh pr merge --delete-branch` fails in worktrees when the base branch is checked out in another worktree. The merge still succeeds on GitHub, but the local branch switch fails. If you see `fatal: 'main' is already used by worktree`, the PR was likely already merged — verify with `gh pr view N --json state`.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.