When to use
Use this skill for:
- Any prompt containing a pasted
github.com URL, even without words like "GitHub", "issue", "PR", or "repo"
- Any GitHub link to an issue, pull request, commit, compare page, Actions run, release, discussion, or repository
- "Fix https://github.com/owner/repo/issues/123" style tasks
- Creating, reviewing, and managing pull requests and GitHub issues
- Reading or triaging repository security advisories (GHSA), private vulnerability reports, and advisory comments; adding or editing triage notes
- Creating a GHSA temporary private fork and opening an embargoed fix PR inside it
- Merge conflict resolution and history rewriting
- Pre-commit hook debugging and fixes
- Branch management and cleanup
- GitHub Actions workflow optimization
- Any git command or GitHub workflow question
Instructions
When invoked:
- If the prompt includes a GitHub URL, treat that URL alone as sufficient reason to invoke this skill and inspect it with
gh/git first
- Assess the git/GitHub situation immediately
- If the prompt includes a
github.com URL, activate this skill immediately and translate that URL into the relevant gh/git workflow
- Use gh CLI for all GitHub operations (never suggest the web interface)
- Handle complex git operations with surgical precision
- Fix pre-commit hook issues or delegate to typescript-magician for TypeScript linting
- Never alter git signing key configuration; if signing is already enabled and configured, use it. Otherwise, proceed without signing
- NEVER include "Co-Authored-By: Claude" or similar AI attribution
- For security advisory work, read rules/security-advisory-comments.md and fetch the accessible discussion before drawing triage conclusions; advisory bodies alone can omit important context
- For advisory state questions or changes (
triage → draft → published, or closed), read rules/security-advisory-lifecycle.md; never publish an advisory unless the user explicitly asks
- For embargoed security fixes, read rules/security-advisory-private-fork-prs.md: push only to the advisory's temporary private fork and open the PR there with
gh pr create --repo <fork>, never against the public repository
Activation examples
Fix https://github.com/mercurius-js/mercurius/issues/1227
Review https://github.com/nodejs/node/pull/12345
What changed in https://github.com/org/repo/compare/v1.0.0...v1.1.0?
Check https://github.com/org/repo/actions/runs/123456789
Investigate https://github.com/org/repo/commit/abcdef1234567890
Triage https://github.com/org/repo/security/advisories/GHSA-xxxx-xxxx-xxxx, including the discussion
Add a triage note to the private vulnerability report's advisory
Open a fix PR in the private fork of https://github.com/org/repo/security/advisories/GHSA-xxxx-xxxx-xxxx
Capabilities
Advanced git operations:
- Interactive rebasing for clean history (commit splitting, squashing)
- Cherry-pick, bisect, worktrees
- Advanced merge strategies
- Submodule and subtree management
- Git hooks setup and maintenance
- Repository archaeology with git log/blame/show
GitHub operations via gh CLI:
- Create/manage PRs with proper templates
- Open PRs with explicit base/head and clear concise content, e.g.
gh pr create --base main --head <branch> --title "<title>" --body-file <file>
- After opening a PR, wait for CI with
gh pr checks <num> --watch 2>&1 and proactively fix failures
- Validate unfamiliar gh commands first with
gh help <command> before using them in guidance
- Track and change advisory state from triage to draft to published, or closed (lifecycle)
- Read repository security advisories and their comments; add/edit advisory comments via REST (workflow and limits)
- Create an advisory's temporary private fork and open fix PRs inside it (workflow)
- Handle issues and project boards
- Manage releases and artifacts
- Configure repository settings
- Automate workflows and notifications
PR Body Formatting
When creating PRs with gh pr create, use --body-file to avoid newline escaping issues with the --body flag.
PR descriptions should stay simple:
- Write a short description of the change in plain prose
- Do not add subsections or headings such as
## Summary or ## Testing
- Do not include a testing section
- Architecture changes may need a slightly longer description if extra context is necessary
cat > /tmp/pr-body.md << 'EOF'
Refactor plugin loading so skills are discovered from the registry instead of being hardcoded.
EOF
gh pr create --body-file /tmp/pr-body.md
Using a temporary file is cleaner, more reliable, and easier to debug.
Validation Checkpoints for Complex Operations
Interactive rebase: git rebase -i <base> → verify with git log --oneline -n 10 → on conflict: resolve, git add <file>, git rebase --continue → abort anytime with git rebase --abort.
Merge conflict resolution: git status (find conflicts) → inspect with git diff or open file → resolve all markers → git add <resolved-file> → git merge --continue (or git rebase --continue) → confirm clean state with git status.
Branch cleanup: git branch --merged main → git branch -d <branch> → git push origin --delete <branch> → git fetch --prune.
Commit Signing and Attribution Rules
- NEVER alter git signing key settings (
user.signingkey) or signing mode in user/repo config
- If commit signing is already enabled and correctly configured, create signed commits using the existing setup
- If signing is not enabled/configured, do not force or configure signing; proceed without it
- NEVER add AI co-authorship attributions (e.g. "Co-Authored-By: Claude")
1---2name: octocat3description: Use this skill whenever the prompt contains any `github.com` URL, even if the user only pastes a link and gives no GitHub-specific keywords. Handles git and GitHub operations using the gh CLI. Triggers include any GitHub link to an issue, pull request, commit, compare page, Actions run, release, discussion, or repository. Covers creating and reviewing PRs, repository security advisories (GHSA), their comments, and fix PRs in their temporary private forks, private vulnerability report discussions, watching CI checks, interactive rebasing, branch cleanup, submodule management, and repository archaeology with git log/blame/bisect.4metadata:5 source: https://skillmd.com/skills/hackernoon/octocat6 tags: git, github, gh-cli, version-control, merge-conflicts, pull-requests, security-advisories, private-fork7---89## When to use1011Use this skill for:12- Any prompt containing a pasted `github.com` URL, even without words like "GitHub", "issue", "PR", or "repo"13- Any GitHub link to an issue, pull request, commit, compare page, Actions run, release, discussion, or repository14- "Fix https://github.com/owner/repo/issues/123" style tasks15- Creating, reviewing, and managing pull requests and GitHub issues16- Reading or triaging repository security advisories (GHSA), private vulnerability reports, and advisory comments; adding or editing triage notes17- Creating a GHSA temporary private fork and opening an embargoed fix PR inside it18- Merge conflict resolution and history rewriting19- Pre-commit hook debugging and fixes20- Branch management and cleanup21- GitHub Actions workflow optimization22- Any git command or GitHub workflow question2324## Instructions2526When invoked:271. If the prompt includes a GitHub URL, treat that URL alone as sufficient reason to invoke this skill and inspect it with `gh`/`git` first282. Assess the git/GitHub situation immediately293. If the prompt includes a `github.com` URL, activate this skill immediately and translate that URL into the relevant `gh`/`git` workflow304. Use gh CLI for all GitHub operations (never suggest the web interface)315. Handle complex git operations with surgical precision326. Fix pre-commit hook issues or delegate to typescript-magician for TypeScript linting337. Never alter git signing key configuration; if signing is already enabled and configured, use it. Otherwise, proceed without signing348. NEVER include "Co-Authored-By: Claude" or similar AI attribution359. For security advisory work, read [rules/security-advisory-comments.md](rules/security-advisory-comments.md) and fetch the accessible discussion before drawing triage conclusions; advisory bodies alone can omit important context3610. For advisory state questions or changes (`triage` → `draft` → `published`, or `closed`), read [rules/security-advisory-lifecycle.md](rules/security-advisory-lifecycle.md); never publish an advisory unless the user explicitly asks3711. For embargoed security fixes, read [rules/security-advisory-private-fork-prs.md](rules/security-advisory-private-fork-prs.md): push only to the advisory's temporary private fork and open the PR there with `gh pr create --repo <fork>`, never against the public repository3839## Activation examples4041- `Fix https://github.com/mercurius-js/mercurius/issues/1227`42- `Review https://github.com/nodejs/node/pull/12345`43- `What changed in https://github.com/org/repo/compare/v1.0.0...v1.1.0?`44- `Check https://github.com/org/repo/actions/runs/123456789`45- `Investigate https://github.com/org/repo/commit/abcdef1234567890`46- `Triage https://github.com/org/repo/security/advisories/GHSA-xxxx-xxxx-xxxx, including the discussion`47- `Add a triage note to the private vulnerability report's advisory`48- `Open a fix PR in the private fork of https://github.com/org/repo/security/advisories/GHSA-xxxx-xxxx-xxxx`4950## Capabilities5152**Advanced git operations:**53- Interactive rebasing for clean history (commit splitting, squashing)54- Cherry-pick, bisect, worktrees55- Advanced merge strategies56- Submodule and subtree management57- Git hooks setup and maintenance58- Repository archaeology with git log/blame/show5960**GitHub operations via gh CLI:**61- Create/manage PRs with proper templates62- Open PRs with explicit base/head and clear concise content, e.g. `gh pr create --base main --head <branch> --title "<title>" --body-file <file>`63- After opening a PR, wait for CI with `gh pr checks <num> --watch 2>&1` and proactively fix failures64- Validate unfamiliar gh commands first with `gh help <command>` before using them in guidance65- Track and change advisory state from triage to draft to published, or closed ([lifecycle](rules/security-advisory-lifecycle.md))66- Read repository security advisories and their comments; add/edit advisory comments via REST ([workflow and limits](rules/security-advisory-comments.md))67- Create an advisory's temporary private fork and open fix PRs inside it ([workflow](rules/security-advisory-private-fork-prs.md))68- Handle issues and project boards69- Manage releases and artifacts70- Configure repository settings71- Automate workflows and notifications7273## PR Body Formatting7475When creating PRs with `gh pr create`, use `--body-file` to avoid newline escaping issues with the `--body` flag.7677PR descriptions should stay simple:78- Write a short description of the change in plain prose79- Do not add subsections or headings such as `## Summary` or `## Testing`80- Do not include a testing section81- Architecture changes may need a slightly longer description if extra context is necessary8283```bash84cat > /tmp/pr-body.md << 'EOF'85Refactor plugin loading so skills are discovered from the registry instead of being hardcoded.86EOF87gh pr create --body-file /tmp/pr-body.md88```8990Using a temporary file is cleaner, more reliable, and easier to debug.9192## Validation Checkpoints for Complex Operations9394**Interactive rebase:** `git rebase -i <base>` → verify with `git log --oneline -n 10` → on conflict: resolve, `git add <file>`, `git rebase --continue` → abort anytime with `git rebase --abort`.9596**Merge conflict resolution:** `git status` (find conflicts) → inspect with `git diff` or open file → resolve all markers → `git add <resolved-file>` → `git merge --continue` (or `git rebase --continue`) → confirm clean state with `git status`.9798**Branch cleanup:** `git branch --merged main` → `git branch -d <branch>` → `git push origin --delete <branch>` → `git fetch --prune`.99100## Commit Signing and Attribution Rules101102- NEVER alter git signing key settings (`user.signingkey`) or signing mode in user/repo config103- If commit signing is already enabled and correctly configured, create signed commits using the existing setup104- If signing is not enabled/configured, do not force or configure signing; proceed without it105- NEVER add AI co-authorship attributions (e.g. "Co-Authored-By: Claude")