coarse-ink-claude-code: Skill for Claude Code

.claude/skills/coarse-extract/SKILL.md

coarse-extract is a skill for Claude Code from Felipe-SO/coarse-ink-claude-code. It costs 41 tokens per session (694 once invoked), scanned A, original, MIT.

A two-step research-paper preparation tool that turns a paper file into Markdown text and extracts its section structure. Markdown is plain text with simple formatting marks.

In plain words
What is it for?
Use it to process a paper such as a PDF, save the extracted text, and produce a JSON file listing the paper's sections in the expected cache directory.
Why use it?
It creates a consistent intermediate version of a paper so later review steps can work from readable text and known sections.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

This is Felipe-SO/coarse-ink-claude-code's own configuration. It tells Claude Code how to work on coarse-ink-claude-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything coarse-ink-claude-code configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/coarse_extract.py PAPER_PATH EXTRACTED.

Reuse

Borrowing it

Nothing to install: this file belongs to Felipe-SO/coarse-ink-claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Felipe-SO/coarse-ink-claude-code/main/.claude/skills/coarse-extract/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Felipe-SO/coarse-ink-claude-code

Made for: Claude Code.

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 coarse-extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/felipe-so/coarse-ink-claude-code/coarse-extract.svg)](https://agentmods.dev/skills/felipe-so/coarse-ink-claude-code/coarse-extract)
Your own site
<a href="https://agentmods.dev/skills/felipe-so/coarse-ink-claude-code/coarse-extract"><img src="https://agentmods.dev/badge/skills/felipe-so/coarse-ink-claude-code/coarse-extract.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 694 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.00041 $0.00694
Opus 5 $0.00020 $0.00347
Sonnet 5 $0.00008 $0.00139
Haiku 4.5 $0.00004 $0.00069

Measured 7d ago against content hash 5fc357fd332b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

coarse-extract 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 7d 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.

.claude/skills/coarse-extract/SKILL.md · 79 lines

How it starts

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

/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/<slug>_extracted.md
  • SECTIONS_JSON = .coarse_cache/<slug>_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 &lt;), 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 the full file on GitHub · 79 lines

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. 7d ago First seen · 79 lines · 41 tokens per session scan A 5fc357fd332b

Subscribe to this mod's changes

coarse-extract is a skill published in the GitHub repository Felipe-SO/coarse-ink-claude-code (2 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 694 once invoked, about $0.0002 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.