Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tiangong-ai/skills --skill document-granular-decomposegit clone --depth 1 https://github.com/tiangong-ai/skillsWrote 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.
[](https://agentmods.dev/skills/tiangong-ai/skills/document-granular-decompose)<a href="https://agentmods.dev/skills/tiangong-ai/skills/document-granular-decompose"><img src="https://agentmods.dev/badge/skills/tiangong-ai/skills/document-granular-decompose/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tiangong-ai/skills/document-granular-decompose"><img src="https://agentmods.dev/badge/skills/tiangong-ai/skills/document-granular-decompose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high System Prompt Leakage · line 71 Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00074 | $0.01011 |
| Opus 5 | $0.00037 | $0.00505 |
| Sonnet 5 | $0.00015 | $0.00202 |
| Haiku 4.5 | $0.00007 | $0.00101 |
Grade A, and why
document-granular-decompose 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Document Granular Decompose
Core Goal
- Parse a local document through
POST /mineru_with_images. - Always force
return_txt=true. - Read environment variables for endpoint, request identity, and model routing:
UNSTRUCTURED_API_BASE_URL(example:https://your-unstructured-host:7770)UNSTRUCTURED_AUTH_TOKENUNSTRUCTURED_PROVIDER(optional)UNSTRUCTURED_MODEL(optional)
- Return only plain fulltext (prefer API
txt; fallback to joinedresult[].text).
Triggering Conditions
- Need robust document fulltext extraction for PDF/Office/image files.
- Need image-aware MinerU parsing but only textual output for downstream chunking/search/summarization.
- Need to standardize provider/model/token input via environment variables instead of ad-hoc command parameters.
Workflow
- Prepare environment variables.
export UNSTRUCTURED_AUTH_TOKEN="your-fastapi-bearer-token"
export UNSTRUCTURED_API_BASE_URL="https://your-unstructured-host:7770"
# Optional routing overrides. Omit them to let the server choose its defaults.
export UNSTRUCTURED_PROVIDER="vllm"
export UNSTRUCTURED_MODEL="Qwen/Qwen3.5-122B-A10B-FP8"
- Run extraction and print fulltext to stdout.
python3 scripts/mineru_fulltext_extract.py \
--file "/absolute/path/to/document.pdf"
- Save fulltext to a local file when needed.
python3 scripts/mineru_fulltext_extract.py \
--file "/absolute/path/to/document.pdf" \
--output "/absolute/path/to/fulltext.txt"
Request Contract
- Endpoint resolution:
--api-urlif provided- else
UNSTRUCTURED_API_BASE_URL + /mineru_with_images - else fail fast with missing environment variable error
- Method:
POSTmultipart form. - Query params:
- Force
return_txt=true(always set by script).
- Force
- Form fields sent:
file(required)provider(optional, fromUNSTRUCTURED_PROVIDERwhen set)model(optional, fromUNSTRUCTURED_MODELwhen set)
- Header sent:
Authorization: Bearer $UNSTRUCTURED_AUTH_TOKEN
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 96 lines · 74 tokens per session scan A d43b9d64657e
document-granular-decompose is a skill published in the GitHub repository tiangong-ai/skills (9 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 1,011 once invoked, about $0.0004 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.
Other skills, from other repositories
pydicom
Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.
pdf-extract-create-workflow
Complete PDF lifecycle: download, extract, and generate structured documents with reportlab.
document-direct-python
Use direct Python execution for reliable document creation including spreadsheets, PDFs, and structured reports.
parse-document
Convert a PDF, scan, image of a page, or office file to clean markdown through the connected Superlinked MCP edge, so the source document is not read into model context directly. Use when the user asks to read, parse, OCR, extract from, summarize, or answer questions about a document.