agentleFS
kujiangmudaokujiangmudao/tablepack/AGENTS.md

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.

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
  1. Very specific:

    When the user asks to convert PDFs, always follow this file + skills/pdf-table-to-excel/SKILL.md.

    line 4
  2. Very specific:

    Strict visual QC: after auto convert: compare each sheet vs 原始表格/ (or PDF).

    line 52
  3. Distinctive:

    Unrecoverable tables: write markdown explaining why — never fabricate data.

    line 53
  4. Very specific:

    Prefer incremental: reuse work/mineru_raw/ when present, but re-QC Excel

    line 78
  5. Very specific:

    Do not commit copyrighted PDFs, personal corpora, or filled output/ / work/

    line 83
  6. Very specific:

    Do not commit config.yaml with absolute private paths if you prefer (example file only)

    line 84

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

UserWhat to do
Already has MinerUUse this repo + skill; ensure mineru on PATH or config.yaml → mineru_bin
No MinerU yetRun 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.

ItemDefault / note
Source PDFspdf/
Output packagesoutput/
MinerU cachework/mineru_raw/
MinerU CLIMINERU_BIN or config.yaml → mineru_bin (auto-discover if on PATH)
Backendpipeline by default; tables on (-t true); language ch unless configured
Code entrypython -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)

  1. MinerU is the primary parser (helpers OK for repair only).
  2. One PDF → one Excel, same basename.
  3. All tables of one PDF in one workbook as different sheets.
  4. Package structure:
output/<PDF_STEM>/
  ├── <PDF_STEM>.xlsx
  ├── 原始表格/          # table screenshots (required)
  ├── 图片/              # non-table figures
  └── 转换说明.md        # success
      or 问题说明.md     # fail / partial fail

Output names follow output_language in config.yaml: zh (default) as above, or en → table_crops/, images/, conversion_notes.md / issues.md.

  1. Strict visual QC after auto convert: compare each sheet vs 原始表格/ (or PDF). Fix misaligned columns, bad headers, merges, suspicious numbers immediately.
  2. Unrecoverable tables: write markdown explaining why — never fabricate data.
  3. 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 table type → problem note, no fake tables
  • Empty table_body / missing img_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.yaml with absolute private paths if you prefer (example file only)
  • Local-only fix scripts with private numbers stay gitignored (fix_batch*.py, etc.)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.