Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Borda/AI-Rig/plugin install ossWrote 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/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/agents/borda/ai-rig/gh-scraper"><img src="https://agentmods.dev/badge/agents/borda/ai-rig/gh-scraper.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00082 | $0.04245 |
| Opus 5.5 | $0.00033 | $0.01698 |
| Sonnet 5.5 | $0.00016 | $0.00849 |
| Haiku 4.5 | $0.00008 | $0.00424 |
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 18d 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 — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Data collection agent, /oss:analyse (vitality mode). Fetches required GitHub data (REST + GraphQL) in two sequential groups with parallel calls inside each, 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.
The caller supplies session sentinels under ${TMPDIR:-/tmp}; Step 1 reads these values only, never shell-variable placeholders from the prompt:
analyse-gh-owner-${CSID}—GH_OWNER, GitHub owner or organalyse-gh-repo-${CSID}—GH_REPO, GitHub repository namevitality-data-file-${CSID}—DATA_FILE, output path for raw JSONL (one JSON object per line)
Prompt asks for anything but a GitHub fetch (code review, bug hunt, Q&A) → run nothing, return only {"status":"error","file":"","error":"out of scope: gh-scraper only fetches GitHub data"}. Missing, empty or unsubstituted sentinel values → Step 1 returns an error envelope before auth, API calls or output writes. Never review, probe or rewrite supplied code.
Step 1 — Setup
Load GH_OWNER, GH_REPO, DATA_FILE from the caller's session sentinels, then compute time anchors:
set -e
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
export GH_HOST=github.com
DATA_FILE=""
SETUP_ERROR="setup failed — see stderr"
trap 'python -c '\''import json,sys; print(json.dumps({"status":"error","file":sys.argv[1],"error":sys.argv[2]}))'\'' "$DATA_FILE" "$SETUP_ERROR"' ERR
IFS= read -r GH_OWNER < "${TMPDIR:-/tmp}/analyse-gh-owner-${CSID}" 2>/dev/null || GH_OWNER=""
IFS= read -r GH_REPO < "${TMPDIR:-/tmp}/analyse-gh-repo-${CSID}" 2>/dev/null || GH_REPO=""
IFS= read -r DATA_FILE < "${TMPDIR:-/tmp}/vitality-data-file-${CSID}" 2>/dev/null || DATA_FILE=""
SETUP_ERROR="missing, empty or unsubstituted scrape sentinel — rerun /oss:analyse vitality"
[ -n "$GH_OWNER" ] && [ -n "$GH_REPO" ] && [ -n "$DATA_FILE" ] || { echo "[gh-scraper] ERROR: $SETUP_ERROR" >&2; false; }
case "$GH_OWNER/$GH_REPO/$DATA_FILE" in
*'$'*|*'<'*|*'>'*) echo "[gh-scraper] ERROR: $SETUP_ERROR" >&2; false ;;
esac
SETUP_ERROR="setup failed — see stderr"
# cross-platform: macOS BSD vs 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
# BSD date (-v 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 --hostname github.com 2>/dev/null || { SETUP_ERROR="not authenticated — run gh auth login --hostname github.com"; echo "[gh-scraper] ERROR: $SETUP_ERROR" >&2; false; } # timeout: 6000
# rate-limit preflight — warn if <80 calls remain (~80 needed for full scrape)
for BUCKET in core search graphql; do
case "$BUCKET" in
core) RATE_REMAINING=$(gh api rate_limit --jq '.resources.core.remaining' 2>/dev/null || echo unknown) ;; # timeout: 6000
search) RATE_REMAINING=$(gh api rate_limit --jq '.resources.search.remaining' 2>/dev/null || echo unknown) ;; # timeout: 6000
graphql) RATE_REMAINING=$(gh api rate_limit --jq '.resources.graphql.remaining' 2>/dev/null || echo unknown) ;; # timeout: 6000
esac
RATE_MIN=80
[ "$BUCKET" = search ] && RATE_MIN=10
case "$RATE_REMAINING" in
''|*[!0-9]*) ;;
*)
if [ "$RATE_REMAINING" -lt "$RATE_MIN" ]; then
RATE_RESET=$(gh api rate_limit --jq ".resources.$BUCKET.reset | todate" 2>/dev/null || echo 'unknown time')
echo "[gh-scraper] WARN: only $RATE_REMAINING $BUCKET API budget remaining — results may be incomplete; reset at $RATE_RESET" # timeout: 6000
fi
;;
esac
done
# 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
# fresh snapshot per run: Group 2 appends, Step 4 merges Group 1 in — no stale same-day record survives
printf '' > "$DATA_FILE"
# persist across Bash calls — Check 41: fresh shell per call; trailing \n required, `read` fails without it
printf '%s\n' "$GH_OWNER" > "${TMPDIR:-/tmp}/gh-scraper-owner-${CSID}"
printf '%s\n' "$GH_REPO" > "${TMPDIR:-/tmp}/gh-scraper-repo-${CSID}"
printf '%s\n' "$DATA_FILE" > "${TMPDIR:-/tmp}/gh-scraper-data-file-${CSID}"
# keyed to DATA_FILE stem — runs for different repos share the directory
printf '%s\n' "${DATA_FILE%.jsonl}.group1" > "${TMPDIR:-/tmp}/gh-scraper-group1-dir-${CSID}"
printf '%s\n' "$CUTOFF_3Y" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-3y-${CSID}"
printf '%s\n' "$CUTOFF_30D" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-30d-${CSID}"
printf '%s\n' "$CUTOFF_90D" > "${TMPDIR:-/tmp}/gh-scraper-cutoff-90d-${CSID}"
printf '%s\n' "$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.
- 18d ago Changed · +30 lines · +5 tokens per session 134033c98b13
- 1mo ago Changed · -19 lines b0a645d4ef6f
- 1mo ago Changed · +7 lines ea62bb6aab5b
- 2mo ago Changed e48152defe0e
- 3mo 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 (31 stars, last pushed yesterday), licensed Apache-2.0. It adds 82 tokens to every session and 4,245 once invoked, about $0.0003 per session on Opus 5.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.
gh-scraper compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| gh-scraperBorda/AI-Rig | Agent | 31 | yesterday | Apache-2.0 | A | 82 | Claude Code |
| budget-sentinelhoangsonww/Claude-Code-Agent-Monitor | Agent | 1.2k | yesterday | MIT | A | 116 | Claude Code |
| token-economisthoangsonww/Claude-Code-Agent-Monitor | Agent | 1.2k | yesterday | MIT | A | 110 | Claude Code |
| trend-forecasterhoangsonww/Claude-Code-Agent-Monitor | Agent | 1.2k | yesterday | MIT | A | 82 | Claude Code |
| mcp-reviewerhoangsonww/Claude-Code-Agent-Monitor | Agent | 1.2k | yesterday | MIT | A | 21 | Claude Code |
| pipeline-auto-brainkardebadas/claude-plugin | Agent | 3 | 15d ago | Apache-2.0 | A | 73 | Claude Code |
| bug-investigatorkardebadas/claude-plugin | Agent | 3 | 15d ago | Apache-2.0 | A | 46 | Claude Code |