Folder harvest
npx -y skills add cprima-agents/cpm-agent-skills --skill folder-harvestAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Convert mixed-format files in one or more source folders into markdown-ready output for reading, analysis, or elicitation. Produces a sibling <foldername>_harvested/ folder containing manifest.json, inventory.md, and converted files organised by type. Converts .msg, .docx, .pdf, .xlsx/.xls by extension; copies images as-is. Use when the user points at a folder of source files and wants them prepared for later analysis — e.g. "harvest this testdata folder", "convert these docs for reading", "prepare these mails for analysis", or "I have a folder of mixed files, read them".
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.3 KB, 692 tokens by cl100k_base, as published. Nobody here has run it
folder-harvest
Rule: Hints describe folder context for interpretation only. They must never affect which converter is used or how any file is transformed.
Invocation
uv run skills/folder-harvest/scripts/harvest.py <folder> [<folder> ...] \
[--hint <folder>=<label>] [--no-recursive] [--dry-run]
Examples:
# Single folder with a hint
uv run skills/folder-harvest/scripts/harvest.py ./testdata --hint ./testdata=testdata
# Multiple folders
uv run skills/folder-harvest/scripts/harvest.py ./mails ./docs \
--hint ./mails=emails --hint ./docs=process-docs
# Flat (top-level files only)
uv run skills/folder-harvest/scripts/harvest.py ./testdata --no-recursive
# Preview without writing
uv run skills/folder-harvest/scripts/harvest.py ./testdata --dry-run
Supported formats
| Extension | Category | Kind | Notes |
|---|---|---|---|
.msg | mails | email_message | Attachments listed, not extracted |
.docx | docs | word_document | Paragraphs + tables; no images/OLE |
.pdf | docs | pdf_document | Text only; no OCR for scanned pages |
.xlsx | sheets | spreadsheet | Cached values; capped at 500 rows/sheet |
.xls | sheets | spreadsheet | Same output contract as .xlsx |
.png .jpg .jpeg | images | image | Copied as-is |
Output structure
<source_name>_harvested/
├── manifest.json ← machine-readable contract (schema_version: 1)
├── inventory.md ← human-readable table of all files
├── mails/
│ └── subdir/example.msg.md
├── docs/
│ ├── brief.docx.md
│ └── subdir/policy.pdf.md
├── sheets/
│ └── cases.xlsx.md
└── images/
└── screenshot.png
Collision: if <source>_harvested/ already exists, the new folder is named
<source>_harvested_2, _harvested_3, etc.
Known limitations
- No OCR: scanned PDFs and image-only pages produce empty or partial text.
- Attachments:
.msgattachment filenames are listed; content is not extracted. - Dotfiles skipped: files starting with
.are skipped. Windows hidden-attribute files are not detected in v0.1. - Office temp files skipped: files starting with
~$are skipped. - Folders inside
*_harvested*: skipped to avoid processing prior output.
After harvesting
Summarise for the user:
- Source folders harvested
- Output folder(s) created
- File counts by extension
- Any errors or unsupported files
Then ask: "Shall I read the harvested folder now?" — or proceed directly if the user's intent implies it.
What ships with it: 7 files
15.9 KB alongside SKILL.md, 7 of them executable
scripts/
- converters/docx_to_md.pyruns1.6 KB
- converters/images.pyruns217 B
- converters/__init__.pyruns0 B
- converters/msg_to_md.pyruns1.0 KB
- converters/pdf_to_md.pyruns569 B
- converters/xlsx_to_md.pyruns3.4 KB
- harvest.pyruns9.2 KB