# Claim Extractor

> Activate when the orchestrator needs the paper's verifiable claims separated from prose so each can be tested against the simulator.

- **Type:** Skill
- **Install:** `agentstack add skill-leventilo-mobius-claim-extractor`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [leventilo](https://agentstack.voostack.com/s/leventilo)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [leventilo](https://github.com/leventilo)
- **Source:** https://github.com/leventilo/mobius/tree/main/skills/claim-extractor

## Install

```sh
agentstack add skill-leventilo-mobius-claim-extractor
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# claim-extractor

## Purpose and scope

This skill walks the paper body, the figure captions, and the surrounding
context of every equation, and returns a list of paper-anchored numerical
claims that downstream skills (`simspec-author`, `science-integrity`,
`paper-diff`) can compare against simulation telemetry.

The skill does NOT extract equations (that is `paper-parser`), does not
classify regimes (`physics-interpreter`), and does not generate code
(`primitive-generator`). It is a typed-extract stage: paper-parser artifacts
in, validated `numerical_claims[]` out, every claim traceable to a verbatim
source quote.

## Input

The skill expects two artifacts on disk in the current working directory:

- `paper.json` from `paper-parser` — the full structured paper record with
  `equations[]`, `figures[]`, body text, and the paper-level metadata.
- `text_body.json` (optional) — the segmented paper body keyed by section
  anchor. When absent, the skill reads `paper.json` body text inline.

## Algorithm

1. Concatenate body text (skipping References / Bibliography), all figure
   captions, and the surrounding context of every equation.
2. Chunk into ~4000-token segments with 500-token overlap.
3. For each chunk, call Opus 4.7 with a strict extraction prompt (no formula
   symbols, no page numbers, no years).
4. Merge chunk results, deduplicate by `(value, unit_ucum, source_quote[:50])`.
5. Normalize units via Pint loaded with UCUM-compatible definitions. When a
   unit cannot be parsed, keep the raw string and lower the confidence.
6. Assign a stable `id` to every claim (snake-case derived from the symbol or
   the description; collisions resolved with a numeric suffix).

## Output format (mandatory)

You MUST emit your final output as a single fenced ```json block at the END
of your reply, with NO prose after the closing fence. The orchestrator parses
that block by regex (`/```(?:json)?\s*\n([\s\S]*?)\n\s*```/`) and ignores
everything else in your text content.

The canonical artifact for `claim-extractor` (consumed downstream as
`ClaimsJson` in `server/src/types.ts`):

```json
{
  "numerical_claims": [
    {
      "id": "delta_y",
      "symbol": "\\Delta y",
      "description": "fringe spacing on the screen",
      "value": 1.96,
      "unit_ucum": "mm",
      "tolerance": 0.05,
      "formula": "\\lambda L / d",
      "figure_ref": "Fig. 3",
      "source_quote": "the measured fringe spacing was 1.96 mm at L = 1 m",
      "section": "Results",
      "confidence": 0.92
    }
  ]
}
```

The required fields per claim are `id`, `value`, `unit_ucum`, and
`source_quote` (consumed by `server/src/types.ts:ClaimsJson`). The other
fields (`symbol`, `description`, `tolerance`, `formula`, `figure_ref`,
`section`, `confidence`) are recommended and consumed by downstream skills
(narration bijection, science-integrity claim_match, paper-diff). When the
paper has zero numerical claims, emit `{ "numerical_claims": [] }` — an empty
array is a valid, honest output and downstream skills tolerate it.

If the input is degenerate (`paper.json` missing, body text empty, model
context exceeded), emit a fenced JSON block carrying a single `error` field:

```json
{ "error": "paper.json missing; cannot extract claims without parsed body" }
```

DO NOT emit narration, summaries, or follow-up questions after the closing
fence — they break the orchestrator's downstream consumption and get
silently dropped.

## Hand-off

`simspec-author` reads `numerical_claims[]` into `paper.numerical_claims[]`.
`science-integrity` (`check_claim_match`) compares each `value` to a measured
quantity in the simulation telemetry. `narration` (R5 bijection) requires
that every claim id appear either in `narration.claims_referenced[]` or be
acknowledged inline by its numerical value within 5 % tolerance.

## Red flags

Never invent a claim. If the body text contains no recognisable numerical
assertion, emit `{ "numerical_claims": [] }` and stop — fabrication is the
single most catastrophic failure mode for downstream verification.

Never strip the verbatim `source_quote`. The user must be able to trace each
claim back to the paper.

Never reuse a claim `id` across two distinct claims. Collisions get a numeric
suffix.

Never emit a value without a unit. If the paper truly cites a dimensionless
quantity, mark it `"unit_ucum": "1"`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [leventilo](https://github.com/leventilo)
- **Source:** [leventilo/mobius](https://github.com/leventilo/mobius)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-leventilo-mobius-claim-extractor
- Seller: https://agentstack.voostack.com/s/leventilo
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
