agentleFS
shali10shali10/awesome-agent-skills/skills/large-file-data-analysis/SKILL.md

large-file-data-analysis

Skill1 starsChanged 2 months agoMITView on GitHub

Use when analyzing, transforming, or extracting insights from massive Excel spreadsheets (10k-100k+ rows) and large PDF/Word documents without causing context overflow.

The file

Files
SKILL.md

Large File & Spreadsheet Data Analysis Engine

Overview

High-performance data analysis skill tailored for AI Agents. It provides streaming ingestion pipelines via openpyxl(read_only=True) and automatic Parquet conversion, enabling memory-safe querying of 100,000+ row datasets in constant <50MB RAM.

When to Use & When NOT to Use

When to Use

  • Excel spreadsheets (.xlsx/.xls) with ≥10,000 rows or multiple dense sheets.
  • Multi-megabyte PDF, Word, or CSV datasets requiring statistical aggregation.
  • Generating schema summaries and targeted slices without loading raw data into LLM context.

When NOT to Use

  • Small tables (<100 rows) where standard markdown tables or direct pandas reads are fine.
  • Visual chart rendering without data extraction (use image/visualization tools).

Streaming Extraction Pattern

import openpyxl

def stream_excel_summary(file_path: str, sample_rows: int = 5):
    wb = openpyxl.load_workbook(filename=file_path, read_only=True, data_only=True)
    summary = {}
    
    for sheet in wb.sheetnames:
        ws = wb[sheet]
        rows = ws.iter_rows(values_only=True)
        try:
            header = next(rows)
        except StopIteration:
            continue
            
        row_count = 0
        samples = []
        for row in rows:
            row_count += 1
            if len(samples) < sample_rows:
                samples.append(row)
                
        summary[sheet] = {
            "columns": header,
            "total_rows": row_count,
            "sample_rows": samples
        }
    wb.close()
    return summary

Common Pitfalls

  1. Loading large Excel files in write/full mode: Standard load_workbook builds a massive DOM in memory. Always use read_only=True and data_only=True.
  2. Dumping thousands of rows into prompt context: Extract aggregates, schemas, and summary distributions in code first; return only the high-signal findings to LLM context.
  3. Mismatched data types in columns: Large datasets often have mixed type cells (e.g. numeric IDs parsed as floats); sanitize column types during streaming.

Verification Checklist

  • Memory footprint remains < 50MB during streaming iteration.
  • Summary output reports total row count, column list, and non-null distributions.
  • No raw multi-megabyte payloads are passed directly into prompt context.

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.