geronimo-iia/agent-skills/research-extraction

Claude Code and agent skill by geronimo-iia/agent-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Deep extraction of research corpora into structured knowledge documents using a Workflow-driven subagent/reviewer pattern. Use when you have raw source documents (theses, papers, reports) and need structured extraction across multiple axes (architecture, messages, algorithms, forms, etc.) with confidence-annotated claims, cross-document tracing, and reviewer-gated progression. Do NOT use for single-paper analysis — use research-paper instead.

Install

npx vskill@latest install geronimo-iia/agent-skills/research-extraction

SKILL.md

Research Extraction

Apply kb-conventions skill for annotation markers, KB directory layout, frontmatter schema, and synthesis impact rules.

Multi-axis, confidence-annotated extraction from a research corpus using a Workflow that fans out extractor subagents and gates progression through a reviewer agent after each axis.

Prerequisites

Add to .claude/settings.json (or .claude/settings.local.json) before running:

json
{
"permissions": {
"allow": [
"Bash(xberg *)",
"Bash(uvx marker-pdf *)",
"Bash(curl *)",
"Bash(mkdir *)",
"Bash(cp *)",
"Bash(cat *)"
]
}
}

For fully unattended runs (CI, cron), launch the Claude Code session with --dangerously-skip-permissions instead.

When to use

  • Multiple raw source files (theses, papers, reports) covering one system
  • Claims must be traceable to exact source sections with confidence markers
  • Extraction spans multiple axes too large for one context window
  • You want reviewer-gated, disk-persisted progression (not manual session seeds)
  • Resuming a partial run — pass resumeFromRunId (preferred over manual restart; completed phases return from cache instantly)

Core architecture

Workflow
phase("Step 0")
→ extractor agent: reads ALL sources, writes reading summary + working memory dump
→ reviewer agent: checks summary completeness, returns confirmed facts JSON
phase("Axis N") [sequential, one per axis]
→ extractor agent: reads seed (confirmed facts from prior phases), writes extract-<axis>.md
→ reviewer agent: runs checklist, returns {pass: bool, issues: string[], confirmed_facts: ...}
→ if !pass: re-run extractor with issues until pass (max 2 retries)
phase("Formalization")
→ extractor agent: reads all confirmed extract-*.md, produces code sketches
→ reviewer agent: checks sketch coverage

Each phase writes its output to disk before the next begins. Reviewer is a separate agent — independent read of the output file, no shared context with extractor.

Invoking the skill

Before building args, ask the user two questions:

  1. "Should the workflow continue past phase failures, or halt on first failure?" — sets continueOnFailure
  2. "Should a writing quality (anti-slop) pass run over each output document?" — if yes, set antislopSkillPath to the absolute path of anti-slop/SKILL.md Set continueOnFailure: true for unattended/autonomous runs, false (default) for interactive runs where you want to inspect failures immediately.

When the user says "run research extraction on <corpus>", execute this workflow:

javascript
// In main agent — invoke Workflow tool with this script
export const meta = {
name: 'research-extraction',
description: 'Multi-axis extraction from research corpus with reviewer gating',
phases: [
{ title: 'Acquisition', detail: 'Acquire, extract, and create source.md per source' },
{ title: 'Step 0', detail: 'Reading summary + working memory dump' },
{ title: 'Architecture', detail: 'extract-architecture.md' },
{ title: 'Messages', detail: 'extract-messages.md' },
{ title: 'Algorithms', detail: 'extract-algorithms.md' },
{ title: 'Forms', detail: 'extract-forms.md' },
{ title: 'Formalization', detail: 'Code sketches for all SKETCH NEEDED markers' },
{ title: 'Anti-slop', detail: 'Writing quality pass over all axis output files' },
],
}
// args = {
// topic: string, // absolute path to topic directory root
// rawSources: { // sources to acquire, extract, and register
// slug: string, // directory name under topic/sources/
// path?: string, // local file path (provide path OR url)
// url?: string, // remote URL to download
// type?: string, // llm-wiki type: paper|article|book-chapter|... (default: paper)
// }[],
// kb: string[], // absolute paths to knowledge base files to cross-ref
// outputDir: string, // where to write extract-*.md files (use topic/drafts/)
// axes: { // per-axis config (order = execution order)
// name: string, // e.g. "Architecture"
// outputFile: string, // absolute path for this axis output
// extractionSpec: string, // what to extract (H2/H3 structure, tables, etc.)
// }[],
// continueOnFailure?: boolean, // if true, log failed phases and continue instead of halting
// antislopSkillPath?: string, // absolute path to anti-slop/SKILL.md; if provided, runs a final anti-slop pass over all axis output files
// }
// ── Helpers ───────────────────────────────────────────────────────────────────
const STATUS_FILE = `${args.outputDir}/extraction-status.md`
async function writeStatus(currentPhase, completed, failed, notes) {
const lines = [
`# Extraction status`,
``,
`phase: ${currentPhase}`,
`completed: [${completed.join(', ')}]`,
`failed: [${failed.join(', ')}]`,
notes ? `notes: ${notes}` : '',
].filter(Boolean)
await agent(`Write this exact content to ${STATUS_FILE}:\n\n${lines.join('\n')}`,
{ label: 'write-status', phase: currentPhase })
}
async function writeIssues(phaseName, issues) {
const path = `${args.outputDir}/review-issues-${phaseName.toLowerCase().replace(/ /g, '-')}.md`
const content = `# Review issues — ${phaseName}\n\n${issues.map(i => `- ${i}`).join('\n')}`
await agent(`Write this exact content to ${path}:\n\n${content}`,
{ label: `write-issues:${phaseName}`, phase: phaseName })
}
const completedPhases = []
const failedPhases = []
const CONFIDENCE_RULES = `
Every non-trivial claim carries one of three markers placed after the source citation:
| Marker | Meaning |
|---|---|
| [DIRECT] | Verbatim or near-verbatim — copy exact passage into fenced quote block |
| [INFERRED] | Derived from 2+ passages — name all exact section numbers + one-sentence reasoning |
| [SPECULATIVE] | Not grounded in specific passage — follow with > ⚠ SPECULATIVE: block |
Rules:
- [SPECULATIVE] never in a table cell without > ⚠ SPECULATIVE: block immediately below
- [INFERRED] requires exact section numbers — if unavailable, downgrade to [SPECULATIVE]
- [DIRECT] requires exact quoted passage in fenced quote block
Divergence/absence markers:
- > ⚠ DIVERGES FROM KB: — contradicts or extends the knowledge base
- > ✦ NEW: — not present in knowledge base
- > ∅ NOT FOUND IN SOURCES: — source is silent (do not omit — absence is data)
`
// Shared quality rules — used by both extractor self-check and reviewer checklist.
const QUALITY_RULES = `
- Every section has at least one [DIRECT] or [INFERRED] citation in its body OR in the first H3 sub-section beneath it (citations in sub-sections satisfy the parent requirement — do not fail a section whose content lives in labelled sub-sections that each carry their own citations; sections whose primary content is a structural comparison or data-flow table satisfy this requirement via table column attribution such as Document/Source/paper-ref columns — do not require inline [DIRECT]/[INFERRED] markers in the prose of such sections)
- No [SPECULATIVE] claim without > ⚠ SPECULATIVE: block immediately below
- No [INFERRED] claim without exact source section numbers (§N.N) or exact heading in quotes for wiki files (§"Heading Name") — if unavailable, downgrade to [SPECULATIVE]
- Every silent extraction point marked > ∅ NOT FOUND IN SOURCES: as a standalone blockquote (not only in a table cell)
- Every ∅ in a table cell also has a standalone > ∅ NOT FOUND IN SOURCES: blockquote immediately after the table
- Cross-document data-flow table Document column cites original sources (thesis, paper, wiki/ slug) — NOT the current extraction file itself
- All DIVERGES FROM KB and NEW flags present where needed
`
const hasKB = (args.kb || []).length > 0
const QUALITY_RULES_FOR_REVIEWER = hasKB
? QUALITY_RULES
: QUALITY_RULES.split('\n').filter(l => !l.includes('DIVERGES FROM KB')).join('\n')
const AXIS_REVIEWER_CHECKLIST = `
Reviewer checklist — return JSON {pass: bool, issues: string[]}:
${QUALITY_RULES_FOR_REVIEWER}
- Cross-document data-flow table present and complete at end of document
- File written to disk and non-empty
- Return ALL issues found — be exhaustive. Do not stop at 3–5. A pass means zero issues remain.
`
const FORM_REVIEWER_CHECKLIST = `
Reviewer checklist — return JSON {pass: bool, issues: string[]}:
- Every <!-- SKETCH NEEDED: ... --> placeholder has a corresponding sketch in ## Rust Sketches (formalization pass) at the end of its file
- Each sketch cites the claim it formalizes with section reference and confidence marker [DIRECT], [INFERRED], or [SPECULATIVE]
- No sketches appear outside the ## Rust Sketches (formalization pass) section
- Files are written to disk and non-empty
- Return ALL issues found — be exhaustive. Do not stop at 3–5. A pass means zero issues remain.
`
const STEP0_REVIEWER_CHECKLIST = `
Reviewer checklist — return JSON {pass: bool, issues: string[]}:
- Reading summary has exactly one paragraph per source file
- Each paragraph states: scope, contradictions noticed, axes the source is silent on
- Working memory dump is comprehensive — includes named entities, message types,
equations, agent names, algorithm names, each marked with source section number
- Both files are non-empty and written to disk
- Return ALL issues found — be exhaustive. A pass means zero issues remain.
`
const RESULT_SCHEMA = {
type: 'object',
properties: {
pass: { type: 'boolean' },
issues: { type: 'array', items: { type: 'string' } },
confirmed_facts: { type: 'string' }, // markdown block — facts to carry forward
confirmed_absences: { type: 'string' }, // markdown block — sources silent on this axis
divergences: { type: 'string' }, // markdown block — DIVERGES FROM KB / NEW flags
},
required: ['pass', 'issues'],
}
// ── Acquisition phase: acquire, extract, source.md per source ─────────────────
phase('Acquisition')
const acquiredSources = await parallel(args.rawSources.map(src => async () => {
const sourceDir = `${args.topic}/sources/${src.slug}`
const extractedPath = `${sourceDir}/extracted.md`
const sourceMdPath = `${sourceDir}/source.md`
await agent(`
You are a source acquisition assistant running research-paper Steps 1–3 for one source.
Source slug: ${src.slug}
Source dir: ${sourceDir}
${src.url ? `URL: ${src.url}` : ''}
${src.path ? `Local path: ${src.path}` : ''}
Type: ${src.type || 'paper'}
## Step A — Check if already acquired
If ${extractedPath} already exists, skip to Step C (source.md only).
## Step B — Acquire and extract (only if ${extractedPath} does not exist)
1. Run: mkdir -p ${sourceDir}
2. Acquire:
${src.url ? ` curl -L "${src.url}" -o "${sourceDir}/original.pdf"` : ` cp "${src.path}" "${sourceDir}/original.pdf"`}
3. Detect PDF type:
xberg detect "${sourceDir}/original.pdf"
4. Extract:
- Machine-readable: xberg extract "${sourceDir}/original.pdf" --content-format markdown --output "${extractedPath}"
- Scanned/image:
uvx marker-pdf marker_single "${sourceDir}/original.pdf" --output_dir "${sourceDir}/marker-out/"
then: mv "${sourceDir}/marker-out/original/original.md" "${extractedPath}"
(marker-pdf writes <input-stem>.md inside <output_dir>/<input-stem>/ — move it to extracted.md)
## Step C — Create source.md (skip if ${sourceMdPath} already exists)
Write ${sourceMdPath} with this frontmatter:
\`\`\`yaml
---
title: "<infer from PDF title page, URL, or filename>"
type: ${src.type || 'paper'}
summary: ""
tldr: ""
status: draft
last_updated: "<today YYYY-MM-DD>"
tags: []
read_when: []
sources: []
concepts: []
confidence: 0.5
claims: []
---
\`\`\`
Leave summary, tldr, tags, claims, concepts empty — populated after analysis.
`, { label: `acquire:${src.slug}`, phase: 'Acquisition' })
return extractedPath
}))

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/geronimo-iia/agent-skills/research-extraction/badge)](https://verified-skill.com/skills/geronimo-iia/agent-skills/research-extraction)

Something wrong with this skill or its page? Tell us.