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 foundryWrote 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/borda/ai-rig/investigate)<a href="https://agentmods.dev/skills/borda/ai-rig/investigate"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/investigate/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/borda/ai-rig/investigate"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/investigate.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.00191 | $0.06609 |
| Opus 5.5 | $0.00076 | $0.02644 |
| Sonnet 5.5 | $0.00038 | $0.01322 |
| Haiku 4.5 | $0.00019 | $0.00661 |
Grade B, and why
investigate 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 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
Print environment variable names only, never their values. Inspect configuration through the projection below rather than raw Read or dumps: it retains permission and hook structure, enabled plugins, and environment key How it starts
The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Diagnose unknown failures: broken local setup, environment mismatch, tool misbehavior, hook problems, CI vs local divergence, permission errors, runtime anomalies. Gather signals broadly, eliminate hypotheses systematically, report confirmed root cause + recommended next skill. No fixes — diagnosis only. NOT for: known Python test failures with traceback (use /develop:debug (requires develop plugin)); .claude/ config quality sweep (use /foundry:audit).
-
$ARGUMENTS: required — symptom, question, or failing command, e.g.:
"hooks not firing on Save""bridge review is unavailable on this machine""/foundry:calibrate times out every run""CI fails but passes locally""uv run pytest can't find conftest.py"
-
--fast: optional flag — skip Step 4 adversarial Codex review; use when speed matters more than thoroughness, or Codex unavailable.
$ARGUMENTS empty or too vague: use AskUserQuestion: "What exactly is failing or behaving unexpectedly? Include the command and any error output you can share."
Task hygiene — task tools may be deferred; load before first use: ToolSearch(query="select:TaskList,TaskCreate,TaskUpdate,TaskGet", max_results=4). Call TaskList first and triage each task it returns: completed if work clearly done, deleted if orphaned, keep in_progress only if genuinely continuing. Never spend a turn on bookkeeping alone — every TaskCreate/TaskUpdate ships in the same response as the next substantive tool call; one exception, TaskUpdate(completed) immediately before a long output block (rules/task-lifecycle.md).
Task tracking: TaskCreate tasks for Gather, Hypothesise, Probe, Report in the same response as the Step 1 block; each later TaskUpdate rides with that step's first real tool call — zero bookkeeping-only turns (measured: ~7 per run before this rule).
Turn budget — the profiled runs were 94% single-call turns, and every turn re-reads the whole live context. Each step below is one bash block plus the Read/Grep/Write calls it needs, all issued together in one response; independent probes go in one response too. Never split a block to look at half its output.
Step 1: Parse symptom and scope
One block: flag parsing, stale-ledger clear, and the run directory Step 2 needs. Run-dir creation has no dependency on the scoping below, and a second bash block would cost a whole turn — a turn re-reads the entire live context (claude-config.md §Turn Batching).
PLUGIN_ROOT=$(python "${CLAUDE_PLUGIN_ROOT}/bin/resolve_plugin_root.py" --plugin-name foundry) || exit $?; export PLUGIN_ROOT
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
python "$PLUGIN_ROOT/bin/parse-skill-flags.py" --flags fast --keep-state investigate -- "$ARGUMENTS" >/dev/null # timeout: 5000 — no eval; investigate-{fast,clean-args,keep-items}-${CSID}, clears stale contract
IFS= read -r ARGUMENTS < "${TMPDIR:-/tmp}/investigate-clean-args-${CSID}" 2>/dev/null || ARGUMENTS=""
rm -f "${TMPDIR:-/tmp}/investigate-verdicts-${CSID}" # stale probe ledger # timeout: 3000
INVESTIGATE_RUN=".temp/investigate/$(date -u +%Y-%m-%dT%H-%M-%SZ)"
mkdir -p "$INVESTIGATE_RUN"
echo "$INVESTIGATE_RUN" > "${TMPDIR:-/tmp}/investigate-run-path-${CSID}" # persist; re-read in later steps
echo "INVESTIGATE_RUN=$INVESTIGATE_RUN" # bash vars don't persist; read from stdout
printf '%s\n' "$ARGUMENTS" | tr ' ' '\n' | grep -E '^--' | sed 's/^/UNKNOWN_FLAG=/' # feeds unsupported-flag check
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 · +10 lines 98be82475444
- 1mo ago Changed · -9 lines e88032d28163
- 1mo ago Changed ff6ac13f888d
- 1mo ago Changed d603dfcce0b8
- 1mo ago Changed · +3 lines f617060b2803
- 2mo ago Changed · +2 lines 32fc52f23263
- 2mo ago Changed · -9 lines fd671c991c21
- 2mo ago Changed · +2 lines f4ca802c30e1
- 2mo ago Changed aa7aefbc7e69
- 2mo ago First seen · 320 lines · 191 tokens per session scan B 2bfc79e74938
investigate is a skill published in the GitHub repository Borda/AI-Rig (31 stars, last pushed yesterday), licensed Apache-2.0. It adds 191 tokens to every session and 6,609 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
investigate compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| investigateBorda/AI-Rig | Skill | 31 | yesterday | Apache-2.0 | B | 191 | Claude Code |
| anomaly-alerthoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 86 | Claude Code, Codex |
| transcript-grephoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 73 | Claude Code, Codex |
| regression-watchhoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 82 | Claude Code, Codex |
| hook-inventoryhoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 71 | Claude Code, Codex |
| event-tracehoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 73 | Claude Code, Codex |
| api-error-reporthoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 72 | Claude Code, Codex |