AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Coarse Extract

skill-felipe-so-coarse-ink-claude-code-coarse-extract · by Felipe-SO

Coarse pipeline steps 1-2 — extract a paper file to markdown and parse its section structure. Writes _extracted.md and _sections.json to .coarse_cache/.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-felipe-so-coarse-ink-claude-code-coarse-extract

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access Used
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-felipe-so-coarse-ink-claude-code-coarse-extract)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Coarse Extract? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

/coarse-extract — Extract and Parse Structure

Usage: /coarse-extract papers/paper.pdf

Argument ($ARGUMENTS) is the path to the paper. All paths are relative to the workspace root d:/Dropbox/Research/Coarse Reviewer/.

Path setup

Derive a slug from the filename: lowercase, spaces→hyphens, no extension. e.g. papers/my-paper.pdf → slug = my-paper

  • PAPER_PATH = $ARGUMENTS
  • EXTRACTED = .coarse_cache/_extracted.md
  • SECTIONS_JSON = .coarse_cache/_sections.json

Create .coarse_cache/ if it doesn't exist.


Step 1 — Extract (Python)

Run:

python scripts/coarse_extract.py PAPER_PATH EXTRACTED

This writes the full paper as markdown to EXTRACTED. Uses Mistral OCR via OpenRouter if OPENROUTER_API_KEY is set; otherwise falls back to pymupdf.

If extraction fails, try the pymupdf fallback directly:

python -c "
import fitz, sys
doc = fitz.open(sys.argv[1])
text = '\n\n'.join(page.get_text() for page in doc)
open(sys.argv[2], 'w', encoding='utf-8').write(text)
" PAPER_PATH EXTRACTED

Then read EXTRACTED into your context with the Read tool.

Garble check: After reading EXTRACTED, scan the first 3000 characters for OCR artifacts — spaced-out characters (e.g. T h e o r e m), garbled symbols (ˆ b, ∈ˆ, HTML entities like <), or lines that are clearly noise. If you find more than a few isolated artifacts, warn the user: the PDF may have been scanned or image-only. The downstream review steps include an OCR-artifact notice to the reviewer, but severe garbling will hurt review quality. Advise the user to check whether a text-native PDF is available.


Step 2 — Parse Structure (Python)

Run:

python scripts/coarse_structure.py EXTRACTED SECTIONS_JSON

This writes a JSON array of section objects to SECTIONS_JSON. Each section has:

  • number, title, text, section_type (abstract/introduction/related_work/

methodology/results/discussion/conclusion/appendix/references/other)

  • math_content (bool — set to false by this script; will be set in classify step)
  • claims (list of theorem/lemma/proposition statements found by regex)
  • definitions (list of definition statements found by regex)

Read SECTIONS_JSON and confirm the section list looks correct.


Done. Next: /coarse-classify

Source & license

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

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

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.