investigate

investigate is a skill for Claude Code from TimSimpsonJr/magpie. It costs 99 tokens per session (2,301 once invoked), scanned A, original, MIT.

A document-investigation workflow for turning a trustworthy ingested document, such as a converted PDF, into findings with exact citations. It treats extracted claims as unverified until they are checked and approved by a person.

In plain words
What is it for?
Extracting findings from documents, verifying AI-generated claims, fact-checking source material, adding citation anchors, redacting sensitive content, and publishing approved findings.
Why use it?
It helps prevent unsupported or misread claims from being published as facts. Each finding is tied back to its source location and passes independent checks plus a human review step.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the magpie plugin — 13 skills, 2 agents, 1 MCP server shipped together

Good fit Extracting findings from documents, verifying AI-generated claims, fact-checking source material, adding citation anchors, redacting sensitive content, and publishing approved findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/timsimpsonjr/magpie/investigate
Install

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.

Any agent
npx skills add TimSimpsonJr/magpie --skill investigate
Clone the repo
git clone --depth 1 https://github.com/TimSimpsonJr/magpie

Made for: Claude Code.

Or install magpie, the plugin that ships this one along with the rest of its 13 skills, 2 agents, 1 MCP server.

Wrote 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.

agentmods badge for investigate

README.md
[![agentmods](https://agentmods.dev/badge/skills/timsimpsonjr/magpie/investigate/github.svg)](https://agentmods.dev/skills/timsimpsonjr/magpie/investigate)
Your own site
<a href="https://agentmods.dev/skills/timsimpsonjr/magpie/investigate"><img src="https://agentmods.dev/badge/skills/timsimpsonjr/magpie/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.

agentmods 80×15 button for investigate

Your own site · 80×15
<a href="https://agentmods.dev/skills/timsimpsonjr/magpie/investigate"><img src="https://agentmods.dev/badge/skills/timsimpsonjr/magpie/investigate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,301 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.02301
Opus 5 $0.00049 $0.01151
Sonnet 5 $0.00020 $0.00460
Haiku 4.5 $0.00010 $0.00230

Measured 10d ago against content hash 3fc1a9868ab8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

investigate 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 10d 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.

skills/investigate/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

investigate

investigate is the verification gate that sits between a trustworthy ingested document and a published finding. It turns the document into human-gated, citation-anchored, redacted findings by treating every LLM extraction as unverified source material -- the ProPublica posture. The skill does not trust its own extractor: it stamps each claim with an exact citation anchor (the engine scripts/citation.py build_anchor), re-checks each claim two independent ways, and then routes every claim through a mandatory solo human gate before anything is published. The semantic re-check is advisory only; in Layer 0-1 the human gate is the only real verifier.

Call one engine: scripts/citation.py is the pure citation-anchor record + resolver. The skill orchestrates extract -> verify -> human gate -> redacted Librarian output around it. The skill is the only place that touches the publish edge (redact_note) and the keyword guard (derive.keyword_mask); citation.py stays free of both. No .mcp.json ships with this skill.

0. Refuse a non-trustworthy document (safety-critical, checked first)

The only upstream input is one ingest IngestResult plus its DoclingDocument JSON. Before doing anything else, check the boolean trustworthy_for_extraction on that result.

  • ingest sets trustworthy_for_extraction as not (review or partial) (scripts/ingest.py). It is false for BOTH a review decision (handwriting, garbled, or weak-signal pages dominate) AND a PARTIAL_SUCCESS conversion.
  • If trustworthy_for_extraction is false, STOP. A non-trustworthy document is evidence for human inspection, never an automated-extraction source. There is no override flag in v1.

Key on the boolean, never on the decision string. Do NOT key on doc_decision == review: that would let a flagged partial-success document leak through. The boolean is the one correct seam.

1. Extract (LLM, schema-constrained -- not a script, not an ML model)

The extractor reads the DoclingDocument .text and emits a schema-constrained list of {claim_text, verbatim_quote, block_self_ref}. The contract on each quote:

Read the full file on GitHub · 178 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 10d ago First seen · 178 lines · 99 tokens per session scan A 3fc1a9868ab8

Subscribe to this mod's changes

investigate is a skill published in the GitHub repository TimSimpsonJr/magpie (2 stars, last pushed 3mo ago), licensed MIT. It adds 99 tokens to every session and 2,301 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

pdf-table-extractor-brief

Produces a structured extraction plan and clean spreadsheet template for pulling tabular data out of a PDF document — identifying the table structure, defining column headers, flagging extraction pitfalls, and providing a ready-to-use template that ensures the data lands in a consistent, analysable format.

ur-grue/autopunk-media-skills · 61 tokens

pdf-design

Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.

jamditis/claude-skills-journalism · 28 tokens

document-design

Creates print-ready HTML that exports to PDF. Use to make a proposal, report, one-pager, newsletter, slides, or flyer.

jamditis/claude-skills-journalism · 31 tokens

data-table-formatter

Formats raw or messy data into a clean, publication-ready table with appropriate headers, sorted rows, consistent number formatting, and a source note — ready to drop into an article, report, or web page.

ur-grue/autopunk-media-skills · 46 tokens

foia-request-writer

Drafts legally complete public records requests (federal FOIA and all 50 state laws), administrative appeals, and redaction challenge strategies for U.S. government records.

ur-grue/autopunk-media-skills · 40 tokens

osint-tool-catalog

Produces a categorised catalog of open-source intelligence tools relevant to a journalist's investigation, with practical guidance on what each tool does, when to use it, and what its limitations are.

ur-grue/autopunk-media-skills · 43 tokens