Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add terrylica/cc-skills --skill gh-fine-grained-patgit clone --depth 1 https://github.com/terrylica/cc-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/terrylica/cc-skills/gh-fine-grained-pat)<a href="https://agentmods.dev/skills/terrylica/cc-skills/gh-fine-grained-pat"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/gh-fine-grained-pat/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/terrylica/cc-skills/gh-fine-grained-pat"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/gh-fine-grained-pat.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 4 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 3 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- medium Rogue Agent · line 3 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
- medium Prompt Injection · line 69 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Privilege Escalation · line 95 Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00096 | $0.01932 |
| Opus 5 | $0.00048 | $0.00966 |
| Sonnet 5 | $0.00019 | $0.00386 |
| Haiku 4.5 | $0.00010 | $0.00193 |
Grade B, and why
gh-fine-grained-pat scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
GitHub's **sudo mode** ("Confirm access") normally needs a human gesture. The engine can clear it autonomously using a self-custodied credential — see the [ADR](/docs/adr/2026-06-26-autonomous-github-web-auth-virtual-pas How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
gh-fine-grained-pat — declarative fine-grained PAT forge
GitHub exposes no API to create fine-grained PATs (community #148626) — the web UI is the only way. This skill drives that UI over the Chrome DevTools Protocol from a declarative JSON spec, so token creation is repeatable, reviewable, and anti-fragile instead of a hand-clicked one-off.
Self-Evolving Skill: This skill improves through use. GitHub's settings UI drifts — if a selector misses, the modal/picker/permission flow changed, or a permission's detail-page noun is wrong, fix
scripts/,CLAUDE.md(selector map + noun map), or the spec immediately; don't defer. Only update for real, reproducible breakage.
When to use
- Mint a scoped token (release bot, CI reporter, read-only auditor, account-scoped) for storage in the SCS
vault. - Re-create / rotate a token from a checked-in spec.
- List, verify (read back settings), or revoke fine-grained tokens.
Prerequisites
node(NOT bun — Bun'sconnectOverCDPtimes out) andplaywright-core(already pinned at the repo rootpackage.json).- Google Chrome at the standard macOS path.
- A one-time GitHub login (persisted in a profile; see below).
One-time login (then fully automated)
A persistent Chrome profile holds the GitHub session cookie, so you log in once and every later run reuses it:
cd plugins/gh-tools/skills/gh-fine-grained-pat
node scripts/pat.mjs login # opens Chrome; sign in (incl. 2FA); it auto-detects success
node scripts/pat.mjs doctor # runtime + chrome + profile + auth health
The profile lives at ~/.local/share/gh-pat-automation/profile (override with GH_PAT_PROFILE_DIR). Treat it as sensitive — it can impersonate your GitHub session. It is outside the repo and never committed.
Create a token from a spec
# write the value to a 0600 file (default) — the value is NEVER printed to the terminal
node scripts/pat.mjs create specs/release-bot.json --out /tmp/.tok
# …or pipe it straight into the SCS vault (value passed in-process, never to chat)
node scripts/pat.mjs create specs/release-bot.json --vault cc-skills:gh.token
# rotate: revoke the same-named token, create a replacement, store it (sink required)
node scripts/pat.mjs rotate specs/release-bot.json --vault cc-skills:gh.token
What ships with it
23 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- CLAUDE.md 29 KB
- schema/token-spec.schema.json 4.0 KB
- scripts/autosudo.mjs 4.8 KB runs code
- scripts/browser.mjs 8.1 KB runs code
- scripts/form.mjs 28 KB runs code
- scripts/identity.mjs 2.6 KB runs code
- scripts/pat.mjs 29 KB runs code
- scripts/selectors.mjs 2.5 KB runs code
- scripts/webauth-agent.mjs 4.2 KB runs code
- scripts/webauthn.mjs 2.9 KB runs code
- specs/account-scoped.json 347 B
- specs/ccmax-monitor-release-bot.json 5.5 KB
- specs/ci-status-reporter.json 390 B
- specs/examples/all-repositories-admin.json 404 B
- specs/examples/dependabot-secrets.json 582 B
- specs/examples/org-owned.json 508 B
- specs/examples/README.md 1.4 KB
- specs/kitchen-sink.json 787 B
- specs/read-only-auditor.json 341 B
- specs/release-bot.json 420 B
- test/autonomous.test.mjs 3.3 KB runs code
- test/campaign.mjs 8.5 KB runs code
- test/webauthn-smoke.mjs 3.1 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 118 lines · 96 tokens per session scan B 201a177840db
gh-fine-grained-pat is a skill published in the GitHub repository terrylica/cc-skills (72 stars, last pushed yesterday), licensed MIT. It adds 96 tokens to every session and 1,932 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other skills, from other repositories
core-workflow
Detailed development workflow patterns, checklists, and standards. Auto-loads for complex tasks, planning, debugging, testing, or when explicit patterns are needed. Contains session protocols, git conventions, security checklists, testing strategy, and communication standards.
auto-claude
Autonomous multi-agent coding with git worktree isolation, QA validation, and memory. Use for complex features requiring autonomous implementation.
debug-systematic
Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.
code-review-loop
Use when opening a PR for review or when receiving review feedback. Activate for keywords like "code review", "PR review", "request review", "review feedback", "address comments", "reviewer said". Covers both ends of the loop: preparing a reviewable PR and acting on feedback rigorously. Always engage with every…
release-and-changelog
Use when cutting a release, bumping a version, or writing release notes. Activate for keywords like "release", "version bump", "changelog", "release notes", "tag", "publish", "ship a release", "v1.x", "v2.x". Enforces version hygiene: SemVer respect, changelog discipline, atomic commits, tagged release. Always reflect…
wrap-up
End-of-session handler that first checks whether the current session's plan is actually complete. If complete: run a quick retrospective, emit a forward-looking follow-up prompt, and — in a git repository — refresh the repo and clean gone branches. If incomplete: skip cleanup and emit ready-to-paste resume prompts so…