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.5 | $0.00030 | $0.00404 |
| Sonnet 5.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 2mo 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.
- 2mo 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 1mo ago), licensed MIT. It adds 74 tokens to every session and 1,011 once invoked, about $0.0003 per session on Opus 5.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.
document-granular-decompose compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| document-granular-decomposetiangong-ai/skills | Skill | 9 | 1mo ago | MIT | A | 74 | Claude Code, Codex |
| apify-youtube-transcript-scrapersickn33/agentic-awesome-skills | Skill | 49k | today | MIT | A | 48 | Claude Code |
| foundry-hosted-agent-validationmicrosoft/agent-framework | Skill | 15k | today | MIT | A | 82 | Claude Code, Codex |
| report-to-pdfasgeirtj/system_prompts_leaks | Skill | 71k | 2d ago | CC0-1.0 | A | 17 | Claude Code, Codex |
| pdf-extract-create-workflowHKUDS/OpenSpace | Skill | 7.9k | 4d ago | MIT | A | 22 | Claude Code, Codex |
| document-direct-pythonHKUDS/OpenSpace | Skill | 7.9k | 4d ago | MIT | A | 20 | Claude Code, Codex |
| pdf-text-extraction-fallback-85d5caHKUDS/OpenSpace | Skill | 7.9k | 4d ago | MIT | A | 25 | Claude Code, Codex |