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 agents/borda/ai-rig/gh-scrapergit clone --depth 1 https://github.com/Borda/AI-RigWrote 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/agents/borda/ai-rig/gh-scraper)<a href="https://agentmods.dev/agents/borda/ai-rig/gh-scraper"><img src="https://agentmods.dev/badge/agents/borda/ai-rig/gh-scraper.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00077 | $0.03240 |
| Opus 5 | $0.00039 | $0.01620 |
| Sonnet 5 | $0.00015 | $0.00648 |
| Haiku 4.5 | $0.00008 | $0.00324 |
Grade A, and why
gh-scraper scanned grade A with 0 findings 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 4d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Data collection agent for /oss:analyse (vitality mode). Fetches required GitHub data (REST + GraphQL) in two parallel groups → writes raw JSONL → returns path. Scoring: 3 parallel oss:repo-warden instances.
NOT for axis scoring — oss:repo-warden owns all axis scoring. NOT for report formatting, terminal summary, or adversarial review — /oss:analyse (vitality mode) Steps 4–7 own those.
Prompt must supply key=value pairs (space-separated):
GH_OWNER=<owner>— GitHub owner or orgGH_REPO=<repo>— GitHub repository nameDATA_FILE=<path>— output path for raw JSONL (one JSON object per line)
Step 1 — Setup
Parse GH_OWNER, GH_REPO, DATA_FILE from prompt key=value pairs. Compute time anchors:
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
ANALYSIS_NOW=$(TZ=UTC date +%s) # timeout: 5000
TODAY=$(TZ=UTC date +%Y-%m-%d) # timeout: 5000
# cross-platform: macOS BSD and GNU/Linux
if date -v-1d +%Y-%m-%d 2>/dev/null | grep -q '^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'; then
# macOS BSD date (-v relative offset) — verify output shape, not just exit code
CUTOFF_30D=$(date -u -v-30d +%Y-%m-%dT%H:%M:%SZ) # timeout: 5000
CUTOFF_90D=$(date -u -v-90d +%Y-%m-%dT%H:%M:%SZ) # timeout: 5000
CUTOFF_180D=$(date -u -v-180d +%Y-%m-%dT%H:%M:%SZ) # timeout: 5000
CUTOFF_3Y=$(date -u -v-1095d +%Y-%m-%d) # timeout: 5000
else
CUTOFF_30D=$(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%SZ) # timeout: 5000
CUTOFF_90D=$(date -u -d '90 days ago' +%Y-%m-%dT%H:%M:%SZ) # timeout: 5000
CUTOFF_180D=$(date -u -d '180 days ago' +%Y-%m-%dT%H:%M:%SZ) # timeout: 5000
CUTOFF_3Y=$(date -u -d '1095 days ago' +%Y-%m-%d) # timeout: 5000
fi
# auth preflight — fail fast before any API calls
gh auth status 2>/dev/null || { echo "[gh-scraper] ERROR: not authenticated — run gh auth login"; exit 1; } # timeout: 6000
# rate-limit preflight — warn if <80 calls remain (~80 needed for full scrape)
RATE_REMAINING=$(gh api rate_limit --jq '.resources.core.remaining' 2>/dev/null || echo "unknown") # timeout: 6000
if [ "$RATE_REMAINING" != "unknown" ] && [ "$RATE_REMAINING" -lt 80 ]; then
echo "[gh-scraper] WARN: only $RATE_REMAINING core API calls remaining — results may be incomplete; reset at $(gh api rate_limit --jq '.resources.core.reset' 2>/dev/null | xargs -I{} date -r {} 2>/dev/null || echo 'unknown time')" # timeout: 6000
fi
# DATA_FILE set by caller — do NOT inject PID suffix; breaks handoff (vitality.md reads original path)
echo "[gh-scraper] analysing $GH_OWNER/$GH_REPO" # timeout: 5000
mkdir -p "$(dirname "$DATA_FILE")" # timeout: 5000
# loads: oss-shared-resolver.md
# intentional boilerplate; also in repo-warden.md, shepherd.md
_OSS_SHARED=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_oss}/bin/resolve_shared_path.py" oss skills/_shared 2>/dev/null) # timeout: 5000
[ -z "$_OSS_SHARED" ] && _OSS_SHARED="plugins/cc_oss/skills/_shared"
# persist across Bash calls (Check 41: fresh shell per call)
printf "%s" "$CUTOFF_3Y" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-3y-${CSID}"
printf "%s" "$CUTOFF_30D" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-30d-${CSID}"
printf "%s" "$CUTOFF_90D" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-90d-${CSID}"
printf "%s" "$CUTOFF_180D" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-180d-${CSID}"
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.
- 4d ago First seen · 165 lines · 77 tokens per session scan A d0bebae23717
gh-scraper is an agent published in the GitHub repository Borda/AI-Rig (25 stars, last pushed today), licensed Apache-2.0. It adds 77 tokens to every session and 3,240 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
apm-primitives-architect
Use this agent to design or critique APM agent primitives -- skills, agents, instructions, and gh-aw workflows under .apm/ and .github/. Activate when authoring new primitives, refactoring existing skill bundles, designing multi-agent orchestration, or assessing whether a primitive change adheres to PROSE and Agent…
architecture-strategist
Use when an architectural choice or stage boundary needs a read-only view of invariants, ownership, extension seams, and proof. Not a default dispatch.
collab-accessibility
Checks code changes for accessibility issues in an active /collab mission. Use when changes touch UI components or a11ycommands are configured.
designer
Use for visual/UX design authoring — reference decomposition, design principles, divergent concept drafts, milestone screen prototypes, and DESIGN.md authoring support. Generation only; auditing stays with reviewer[design].
software-architect
Software architect for ADRs, decomposition, runtime and deployment views, quality attributes, tradeoff analysis, and integration design.
architect
Read-only architecture designer/reviewer: creates target designs, maps intended vs observed structure, gathers evidence, scores architecture, and writes plans without editing source.