file-preprocessing
Skill2 starsChanged 7 months agoMITView on GitHub
Preprocess deliverable files from the input directory into LLM-readable format. Handles Excel (.xlsx/.xls), PowerPoint (.pptx), Word (.docx), CSV, PDF, images, and text files. Extracts tables, slides, and structured content into a single Markdown file. MUST trigger before any deliverable analysis when the input contains non-text files.
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- jp-client-defenderSkill
- deliverable-analysisSkill
- gap-analysisSkill
- decision-analysisSkill
- jp-client-critiqueSkill
- persuasion-scenariosSkill
- consulting-qaSkill
- html-report-generationSkill
- quality-gateSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
If not → auto-installs via curl (user-level, no sudo)
- Distinctive: line 37
If auto-install fails → prints clear installation instructions with multiple install methods and stops
- Very specific: line 48
After the script runs, check {WORKSPACE}/00_file_manifest.json for llm_native_paths.
- Very specific: line 50
PDF files: Use the Read tool with pages parameter
- Distinctive: line 56
Image files: Use the Read tool (multimodal)
- Very specific: line 64
Check that {WORKSPACE}/00_preprocessed_input.md contains meaningful content.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
File Preprocessing Skill
{WORKSPACE}= timestamped run directory provided by the orchestrator (e.g.,_workspace/run_20260404_153000).
Purpose
Convert non-text deliverable files (Excel, PowerPoint, Word, PDF, images) into LLM-readable Markdown format. This is Phase 0 of the defense pipeline — it runs BEFORE the deliverable analyst.
When to Use
- Input directory contains Excel, PowerPoint, Word, PDF, or image files
- Deliverables are not plain text
- Multiple files need to be combined into a single analyzable document
Input
Files placed in the designated input directory (default: input/).
Process
Step 1: Run Extraction Script
bash .claude/skills/01_file-preprocessing/scripts/run_extract.sh \
input/ \
{WORKSPACE}/00_preprocessed_input.mdThe wrapper script (run_extract.sh) handles everything:
- Checks if
uvis installed - If not → auto-installs via
curl(user-level, no sudo) - If auto-install fails → prints clear installation instructions with multiple install methods and stops
- Runs
uv run extract_files.pywhich auto-resolves Python dependencies (openpyxl, python-pptx, python-docx)
The script automatically:
- Scans all files in the input directory
- Extracts content from supported formats into Markdown tables and text
- Creates a file manifest (
{WORKSPACE}/00_file_manifest.json) - Flags PDF and image files as "LLM-Native" — these need the Read tool
Step 2: Handle LLM-Native Files
After the script runs, check {WORKSPACE}/00_file_manifest.json for llm_native_paths. For each:
- PDF files: Use the Read tool with
pagesparameter
Append the extracted content toRead(file_path="/path/to/file.pdf", pages="1-10"){WORKSPACE}/00_preprocessed_input.md - Image files: Use the Read tool (multimodal)
Describe the image content and append toRead(file_path="/path/to/image.png"){WORKSPACE}/00_preprocessed_input.md
Step 3: Verify Output
Check that {WORKSPACE}/00_preprocessed_input.md contains meaningful content. If empty or minimal, report the issue.
Supported Formats
| Format | Extension | Method | Output |
| Excel | .xlsx, .xls | openpyxl | Markdown tables per sheet |
| PowerPoint | .pptx | python-pptx | Text per slide + embedded tables |
| Word | .docx | python-docx | Headings + paragraphs + tables |
| CSV | .csv | csv module | Markdown table |
| Read tool (LLM) | Full text extraction | ||
| Images | .png, .jpg, .gif, .webp | Read tool (LLM) | Visual description |
| Text | .txt, .md, .json, .xml, .yaml | Direct read | Verbatim include |
Output
{WORKSPACE}/00_preprocessed_input.md— Combined Markdown with all extracted content{WORKSPACE}/00_file_manifest.json— Structured manifest of all input files
The deliverable-analyst agent reads 00_preprocessed_input.md as its input instead of raw files.
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.

