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 agentmods add rules/cdbattags/ai/gh-cligit clone --depth 1 https://github.com/cdbattags/aiWhat 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 | $0.00559 | $0.00559 |
| Opus 5 | $0.00280 | $0.00280 |
| Sonnet 5 | $0.00112 | $0.00112 |
| Haiku 4.5 | $0.00056 | $0.00056 |
Grade A, and why
gh-cli scanned grade A 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 yesterday.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Use `gh` instead of raw `curl`/API calls or the GitHub web UI for all GitHub operations. What it actually says
GitHub CLI (gh)
Use gh instead of raw curl/API calls or the GitHub web UI for all GitHub operations.
Sandbox Permissions
gh commands require network access. Always use required_permissions: ["full_network"] in Shell tool calls.
Key Commands
| Task | Command |
|---|---|
| Create PR | gh pr create --title "..." --body "..." |
| View PR | gh pr view <number> |
| List PRs | gh pr list |
| PR checks | gh pr checks <number> |
| Merge PR | gh pr merge <number> |
| Create issue | gh issue create --title "..." --body "..." |
| List issues | gh issue list |
| Workflow runs | gh run list, gh run view <id> |
| Releases | gh release create <tag>, gh release list |
| Arbitrary API | gh api <endpoint> |
| Cross-repo | Add -R OWNER/REPO to any command |
Read vs Write Operations
Read-only commands do not require user approval — just run them. These include any command that only fetches or displays data:
gh pr list,gh pr view,gh pr checks,gh pr diffgh issue list,gh issue viewgh run list,gh run viewgh release list,gh release viewgh search issues/prs/code/reposgh apiGET requests (the default method)
Write commands do require explicit user approval before executing:
gh pr create,gh pr merge,gh pr review,gh pr closegh issue create,gh issue close,gh issue commentgh run rerungh release create,gh release upload,gh release deletegh apiwith-X POST,-X PATCH,-X PUT,-X DELETE, or-f/--input
Conventions
- Pass long bodies via HEREDOC:
--body "$(cat <<'EOF' ... EOF)" - Use
--jqor--templateto extract specific fields from output - Use
gh apiwith{owner}and{repo}placeholders for the current repo - For detailed patterns and examples, read the
gh-cliskill
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.
- yesterday First seen · 56 lines · 559 tokens per session scan A 21d4c5e75d39
gh-cli is a cursor rule published in the GitHub repository cdbattags/ai (4 stars, last pushed 6mo ago), licensed MIT. It adds 559 tokens to every session, about $0.0028 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
10-feature-development
Feature implementation workflow and engineering mindset.
11-template-conventions
Reusable building blocks shipped with this template - use them instead of writing new ones.
12-new-project
Workflow for starting a new app from this template - rebranding, identity, cleanup and first feature.
13-updating-project
Workflow for updating an existing project - dependency and SDK upgrades, migrations, refactors, bug fixes.
01-tech-stack
Android tech stack and project standards.
02-architecture
Architecture rules - MVVM baseline, MVI for complex features.