Back to skills
SKILL.md
Pdf Decompiler
ASecurityLocal-first, Apache-2.0 PDF evidence extraction, cited search, table context, visual crop proof, and cryptographically signed claim verification (CLI + MCP).
- 18 stars
- 0 votes
- 0 copies
- 0 views
- Added December 4, 2026
Works with
Security analysis
100/100npx -y skills add noobieisgod/pdf-decompiler-mcp --skill pdf-decompiler --agent claude-codeAre you the author of Pdf Decompiler?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/noobieisgod-pdf-decompiler)---
name: pdf-decompiler
description: Local-first, Apache-2.0 PDF evidence extraction, cited search, table context, visual crop proof, and cryptographically signed claim verification (CLI + MCP).
---
# PDF Decompiler Skill
Use **PDF Decompiler** whenever reading, searching, quoting, or verifying quantitative/factual claims from local or HTTPS PDFs. Never dump entire PDFs into context when targeted cited retrieval or verification is available.
## Fast Workflow (MCP or CLI)
1. **Locate evidence in 1 call (zero ceremony):**
- MCP: `pdf_search({ source: "/path/to/report.pdf", query: "Net income", granularity: "page" })` (one-shot `source` automatically opens & reuses a session handle; defaults to `citationDetail: "compact"`).
- Folder corpus: `pdf_search_folder({ folder: "/path/to/filings", query: "consolidated revenue" })`.
- CLI: `npx -y pdf-decompiler search report.pdf "Net income" --page --json`.
2. **Read target pages cheaply:**
- MCP: `pdf_get_pages({ source: "/path/to/report.pdf", pages: [47], mode: "text", outputFormat: "markdown", citationDetail: "compact" })` (or structured `detail: "compact"`).
- CLI: `npx -y pdf-decompiler read report.pdf --pages 47 --markdown --compact`.
3. **Inspect tables with exact units & headers:**
- MCP: `pdf_get_element({ source: "/path/to/report.pdf", elementId: "table:47:1" })` — always check `tableContext.units` (e.g. `(in millions)` vs `(in thousands)`), `tableContext.headers`, and accounting negatives `(15.0)`.
- CLI: `npx -y pdf-decompiler table report.pdf table:47:1`.
4. **Escalate to visual crop proof when needed:**
- When `warnings` include `unmapped_font_encoding`, `ocr_uncertain_numbers`, `hidden_text_suspected`, or complex financial tables, render a tight crop:
- MCP: `pdf_render_page({ source: "/path/to/report.pdf", page: 47, bbox: { x, y, width, height }, imageDelivery: "inline" })`.
- CLI: `npx -y pdf-decompiler crop report.pdf 47 --bbox x,y,w,h --out proof.png`.
5. **Mandatory Verifiable Claim Gate (Enterprise / Strict Mode):**
- Before presenting any high-stakes numerical, financial, legal, or compliance claim, call `pdf_verify_claim({ source, claim, elementIds, provider: "auto" })` or run:
`npx -y pdf-decompiler verify report.pdf --claim "..." --elements table:47:1 --provider auto`
- **Privacy by default:** `provider: "auto"` runs **Stage 1 local deterministic checks only** (0 outbound API calls, even if `TYPESAFE_API_KEY` is set). Stage 2 remote decision models run **only** when `PDF_DECOMPILER_VERIFY_ALLOW_REMOTE=1` (or `--allow-remote-verify`) is explicitly enabled or when you explicitly pass `provider: "jev"`, `"gemini-decisions"`, or `"openai-compat"`. Valid `provider` values: `"auto"`, `"deterministic"`, `"jev"`, `"gemini-decisions"`, `"openai-compat"`.
- **Hard rule:** If `verdict !== "supported"`, **discard or revise the claim** — never present an `unsubstantiated` or `contradicted` claim to the user.
- Verify or enforce returned HMAC-SHA256 `attestation` blocks with `npx -y pdf-decompiler gate` or `examples/hooks/verify-claims-hook.mjs`.
## CLI Setup & Diagnostics
```bash
npx -y pdf-decompiler setup --client claude-code --allow-root ./pdfs
npx -y pdf-decompiler setup --client vscode --allow-root ./pdfs
npx -y pdf-decompiler doctor --allow-root ./pdfs
```
## All 10 MCP Tools (`SCHEMA_VERSION = 4.0.0`)
| Tool | Purpose |
| --- | --- |
| `pdf_open` | Open a local/HTTPS PDF (or add pages) and return `{ documentId, extractionFingerprint, sourceId }` |
| `pdf_document_info` | Return metadata, outline, page signals, counts, warnings, and cache status (`source` or IDs) |
| `pdf_search` | BM25, phrase, semantic, or hybrid search with compact citations by default (`source` or IDs) |
| `pdf_search_documents` | Ranked cited search across 2–8 open PDF generations |
| `pdf_search_folder` | Bounded cited search across up to 32 PDFs in an allowed local folder |
| `pdf_get_pages` | Budgeted page retrieval in `markdown` or `structured` (`detail: "compact"` by default) |
| `pdf_get_element` | Resolve one element or paginated table slice with `tableContext` (`source` or IDs) |
| `pdf_render_page` | Pooled, clipped PDFium PNG/JPEG render (`inline` or resource URI, `source` or IDs) |
| `pdf_verify_claim` | Offline-first Claim Gate + opt-in Stage 2 decision model returning HMAC-SHA256 `attestation` |
| `pdf_close` | Release handle by `{ sourceId }` alone or `{ documentId, extractionFingerprint }` |
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.