agentleFS
HHC225HHC225/Japanese-Client-Breaker/.claude/skills/01_file-preprocessing/skill.md

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.

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

    If not → auto-installs via curl (user-level, no sudo)

    line 36
  2. Distinctive:

    If auto-install fails → prints clear installation instructions with multiple install methods and stops

    line 37
  3. Very specific:

    After the script runs, check {WORKSPACE}/00_file_manifest.json for llm_native_paths.

    line 48
  4. Very specific:

    PDF files: Use the Read tool with pages parameter

    line 50
  5. Distinctive:

    Image files: Use the Read tool (multimodal)

    line 56
  6. Very specific:

    Check that {WORKSPACE}/00_preprocessed_input.md contains meaningful content.

    line 64

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

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

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.md

The wrapper script (run_extract.sh) handles everything:

  1. Checks if uv is installed
  2. If not → auto-installs via curl (user-level, no sudo)
  3. If auto-install fails → prints clear installation instructions with multiple install methods and stops
  4. Runs uv run extract_files.py which 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 pages parameter
    Read(file_path="/path/to/file.pdf", pages="1-10")
    Append the extracted content to {WORKSPACE}/00_preprocessed_input.md
  • Image files: Use the Read tool (multimodal)
    Read(file_path="/path/to/image.png")
    Describe the image content and append to {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

FormatExtensionMethodOutput
Excel.xlsx, .xlsopenpyxlMarkdown tables per sheet
PowerPoint.pptxpython-pptxText per slide + embedded tables
Word.docxpython-docxHeadings + paragraphs + tables
CSV.csvcsv moduleMarkdown table
PDF.pdfRead tool (LLM)Full text extraction
Images.png, .jpg, .gif, .webpRead tool (LLM)Visual description
Text.txt, .md, .json, .xml, .yamlDirect readVerbatim 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.

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.