{"slug": "famm-cursor-skill", "title": "/famm (cursor skill)", "summary": "A developer created a Cursor skill called /famm that fetches GitHub pull request metadata and diffs via the gh CLI from a PR URL, builds context, and confirms readiness without starting other work. The skill replaces manual copy-paste of PR context by fetching LLM-friendly metadata and diff, then stops and waits for the user's next task.", "body_md": "| name | famm |\n|---|---|\n| description | Fetches GitHub pull request metadata and diff via gh CLI from a PR URL, builds context, and confirms readiness without starting other work. Use when the user invokes /famm, @famm, or asks to familiarize with a GitHub PR link before continuing. |\n| disable-model-invocation | true |\n\nUse this skill only when the user explicitly invokes `/famm`\n\nor `@famm`\n\n.\n\nReplace manual copy-paste of PR context. Given a human-friendly GitHub PR URL, fetch LLM-friendly metadata and diff via `gh`\n\n, internalize them, then stop and confirm readiness. Do **not** implement, review, or answer unrelated questions until the user gives the next task.\n\nCompanion to `/fam`\n\n(local `@`\n\npaths). Use `/famm`\n\nfor GitHub PR URLs.\n\nAccept any of these from the message (after `/famm`\n\nor `@famm`\n\n):\n\n`https://github.com/{owner}/{repo}/pull/{number}`\n\n- Same URL with\n`/files`\n\n,`.diff`\n\n, or`.patch`\n\nsuffix — pass as-is to`gh`\n\n; it accepts them.\n\nMultiple PR URLs in one message: fetch each independently.\n\nIf no URL is provided, ask for the PR link.\n\n`gh`\n\ninstalled and authenticated. Verify this through the first metadata command rather than a separate sandboxed auth preflight.- Network access for\n`gh api`\n\n/`gh pr`\n\ncommands.\n\nCursor shell usage: run `gh`\n\ncommands with local keyring access enabled from the first command (for example, `required_permissions: [\"all\"]`\n\non Shell calls). Do **not** start with a sandboxed `gh auth status`\n\nor sandboxed `gh pr`\n\ncommand and wait for it to fail; on macOS the GitHub CLI often stores tokens in Keychain, which the default sandbox may not see.\n\nIf `gh`\n\nfails even with local keyring access enabled, or fails for another reason such as `gh`\n\nnot being installed, an inaccessible private repo, or a genuinely unauthenticated account, report the error and stop.\n\n**Never run bare gh pr view** (without\n\n`--json`\n\n). It fails on many repos with:\n\n```\nGraphQL: Projects (classic) is being deprecated … (repository.pullRequest.projectCards)\n```\n\nAlways pass an explicit `--json`\n\nfield list, or use the REST fallback below.\n\n-\n**Collect PR URL(s)** from the invocation. Parse`{owner}`\n\n,`{repo}`\n\n,`{number}`\n\nfrom each URL for fallback commands. -\n**Fetch metadata**(one command per PR). In Cursor, use local keyring access on the Shell call.** Always**use`--json`\n\nwith an explicit field list:\n\n```\ngh pr view \"<PR_URL>\" --json title,body,author,additions,deletions,changedFiles,baseRefName,headRefName,commits,labels,state,url,number\n```\n\nRun metadata fetches in parallel when there are multiple PRs, and apply the same keyring-capable permissions to each `gh`\n\ncommand.\n\n**If that still fails** (GraphQL or other), fall back to the REST API:\n\n```\ngh api \"repos/{owner}/{repo}/pulls/{number}\" --jq '{\n  number, title, body, state, url: .html_url,\n  additions, deletions, changedFiles: .changed_files,\n  author: {login: .user.login},\n  baseRefName: .base.ref, headRefName: .head.ref,\n  labels: [.labels[].name]\n}'\n```\n\nOptional commit subjects (when useful for scope):\n\n```\ngh api \"repos/{owner}/{repo}/pulls/{number}/commits\" --jq '.[0:20][] | .commit.message'\n```\n\n**Check diff size** before loading full diff, again using local keyring access on the Shell call:\n\n```\ngh pr diff \"<PR_URL>\" | wc -c\n```\n\nThresholds:\n\n| Size | Action |\n|---|---|\n| ≤ 150 KB | Fetch full diff: `gh pr diff \"<PR_URL>\"` |\n| > 150 KB | Fetch file list only: `gh pr diff \"<PR_URL>\" --name-only` . Internalize metadata + file list. Note in the reply that the diff was too large to load whole; offer to load specific paths if the user's next task needs them. |\n\nFor large PRs, load targeted diffs only when the user's follow-up requires code detail:\n\n```\ngh pr diff \"<PR_URL>\" -- path/to/file.rb\n```\n\nRepeat `--exclude`\n\npatterns if the user asks to skip noise (lockfiles, generated assets):\n\n```\ngh pr diff \"<PR_URL>\" --exclude '*.lock' --exclude 'vendor/*'\n```\n\n-\n**Synthesize**— from metadata + diff (or file list): purpose (title/body), scope (files changed, +/- lines), branch names, author, linked issue references in the body. -\n**Confirm only**— reply that you are ready; do not start review or implementation.\n\nKeep the reply short:\n\n```\nReady. I reviewed PR #{number}:\n\n- **{title}** — {one line: purpose / what it changes}\n- **Scope** — {changedFiles} files, +{additions}/−{deletions}, `{headRefName}` → `{baseRefName}`\n- **Author** — @{author.login}\n\nTell me what you’d like to do next.\n```\n\nIf the diff was truncated due to size, add one line:\n\n```\n- **Diff** — file list only ({N} files); say which paths to load for a deeper pass.\n```\n\nAdjust for multiple PRs (one bullet block per PR).\n\n- Paste the full diff or JSON metadata back to the user unless they explicitly ask.\n- Use the rendered HTML PR page as the primary source.\n- Start coding, reviewing, or planning unless the user asks in the same message.\n- Run bare\n`gh pr view`\n\nwithout`--json`\n\n(see pitfall above). - Claim readiness without fetching metadata (and diff or file list per size rules).\n\n**User:** `/famm https://github.com/otwcode/otwarchive/pull/5907`\n\n**Agent:** runs `gh pr view … --json …`\n\n+ size check + `gh pr diff`\n\n, internalizes, replies with readiness summary.\n\n**User:** `/famm https://github.com/org/repo/pull/42`\n\nthen \"review for N+1 queries\"\n\n**Agent:** already has context from step 1; proceed with the review task.", "url": "https://wpnews.pro/news/famm-cursor-skill", "canonical_source": "https://gist.github.com/tomdonarski/581b9b3a38011f6aa23f78850788d615", "published_at": "2026-06-27 14:14:19+00:00", "updated_at": "2026-06-27 20:03:30.653199+00:00", "lang": "en", "topics": ["developer-tools", "large-language-models", "ai-tools"], "entities": ["GitHub", "Cursor", "gh CLI"], "alternates": {"html": "https://wpnews.pro/news/famm-cursor-skill", "markdown": "https://wpnews.pro/news/famm-cursor-skill.md", "text": "https://wpnews.pro/news/famm-cursor-skill.txt", "jsonld": "https://wpnews.pro/news/famm-cursor-skill.jsonld"}}