tablepack
AGENTS.md6 starsChanged 4 months agoMITView on GitHub
Product name: TablePack. Turns PDF tables → Excel packages using MinerU. When the user asks to convert PDFs, always follow this file + skills/pdf-table-to-excel/SKILL.md. Resolve paths via (in order): CLI flags → env vars → config.yaml → defaults. Local machine tip: Path B writes config.yaml; or copy config.example.yaml (gitignored). Output names follow output_language in config.yaml: zh (default) as above, or en → table_crops/, images/, conversion_notes.md / issues.md.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- pdf-table-to-excelSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 4
When the user asks to convert PDFs, always follow this file + skills/pdf-table-to-excel/SKILL.md.
- Very specific: line 52
Strict visual QC: after auto convert: compare each sheet vs 原始表格/ (or PDF).
- Distinctive: line 53
Unrecoverable tables: write markdown explaining why — never fabricate data.
- Very specific: line 78
Prefer incremental: reuse work/mineru_raw/ when present, but re-QC Excel
- Very specific: line 83
Do not commit copyrighted PDFs, personal corpora, or filled output/ / work/
- Very specific: line 84
Do not commit config.yaml with absolute private paths if you prefer (example file only)
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TablePack (pdf-excel) — Agent / operator rules (must follow)
Product name: TablePack. Turns PDF tables → Excel packages using MinerU.
When the user asks to convert PDFs, always follow this file + skills/pdf-table-to-excel/SKILL.md.
Two user paths
| User | What to do |
| Already has MinerU | Use this repo + skill; ensure mineru on PATH or config.yaml → mineru_bin |
| No MinerU yet | Run scripts/install_mineru.ps1 (Windows) or scripts/install_mineru.sh (Unix), activate .venv-mineru, then same skill/CLI. See docs/INSTALL.md |
Multimodal requirement
- Auto pipeline (
python -m pdf_excel): text/CLI is enough. - Quality control / sheet repair: requires a vision-capable model that can open
原始表格/screenshots (or PDF pages). - Text-only models: may run packaging, but must not claim visual QC was done.
Environment
Resolve paths via (in order): CLI flags → env vars → config.yaml → defaults.
| Item | Default / note |
| Source PDFs | pdf/ |
| Output packages | output/ |
| MinerU cache | work/mineru_raw/ |
| MinerU CLI | MINERU_BIN or config.yaml → mineru_bin (auto-discover if on PATH) |
| Backend | pipeline by default; tables on (-t true); language ch unless configured |
| Code entry | python -m pdf_excel or convert_pipeline.py |
Local machine tip: Path B writes config.yaml; or copy config.example.yaml (gitignored).
Hard requirements (never skip)
- MinerU is the primary parser (helpers OK for repair only).
- One PDF → one Excel, same basename.
- All tables of one PDF in one workbook as different sheets.
- Package structure:
output/<PDF_STEM>/
├── <PDF_STEM>.xlsx
├── 原始表格/ # table screenshots (required)
├── 图片/ # non-table figures
└── 转换说明.md # success
or 问题说明.md # fail / partial failOutput names follow
output_languageinconfig.yaml:zh(default) as above, oren→table_crops/,images/,conversion_notes.md/issues.md.
- Strict visual QC after auto convert: compare each sheet vs
原始表格/(or PDF). Fix misaligned columns, bad headers, merges, suspicious numbers immediately. - Unrecoverable tables: write markdown explaining why — never fabricate data.
- PDFs with no tables: still emit folder + placeholder xlsx +
问题说明.md+ keep figures when possible.
QC checklist (every PDF)
- Sheet count matches real tables (no merged captions across tables)
- Headers / row-col counts match source (rowspan/colspan readable after expand)
- Symbols/subscripts correct (e.g. 3₂, 8#, Ro)
- Cell values match print; if print itself conflicts → keep print + note in md
原始表格/complete with readable names (表N_标题)图片/has in-document figures- Success →
转换说明.md; fail/partial →问题说明.md
Known pitfalls
- Landscape / sideways tables → whole-grid shift → rotate crop + OCR + manual rebuild
- Multi-level headers / merges → HTML may need hand fix
- Caption glue (table 2+3 one caption) → split sheet names
- Chart/image only, no
tabletype → problem note, no fake tables - Empty
table_body/ missingimg_path→ drop node, document (pipeline default) - OCR noise:
Al{2O_3→Al2O3,w1%→w/%
Interaction defaults
- “再转一批 / 继续转 / 新 PDF” → full pipeline + QC
- Prefer incremental: reuse
work/mineru_raw/when present, but re-QC Excel - Batch order: MinerU all → convert packages → per-table visual fix
Privacy when contributing / open-sourcing
- Do not commit copyrighted PDFs, personal corpora, or filled
output//work/ - Do not commit
config.yamlwith absolute private paths if you prefer (example file only) - Local-only fix scripts with private numbers stay gitignored (
fix_batch*.py, etc.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

