excel-parser
БесплатноЗапускает вложенные скриптыНе проверенSmart Excel/CSV file parsing with intelligent routing based on file complexity analysis. Analyzes file structure (merged cells, row count, table layout) using…
Об этом скилле
Excel Parser
Table of Contents
- Overview
- Core Philosophy: Scout Pattern
- When to Use This Skill
- Processing Workflow
- Complexity Scoring Rules
- Path A: Pandas Standard Mode
- Path B: HTML Semantic Mode
- Best Practices
- Troubleshooting
- Dependencies
- Resources
Overview
Provide intelligent routing strategies for parsing Excel/CSV files by analyzing complexity and choosing the optimal processing path. The skill implements a "Scout Pattern" that scans file metadata before processing to balance speed (Pandas) with accuracy (semantic extraction).
Core Philosophy: Scout Pattern
Before processing data, deploy a lightweight "scout" to analyze file metadata and make intelligent routing decisions:
- Metadata Scanning - Use
openpyxlto scan file structure without loading data - Complexity Scoring - Calculate score based on merged cells, row count, and layout
- Path Selection - Choose between Pandas (fast) or HTML (accurate) processing
- Optimized Execution - Execute with the most appropriate tool for the file type
Key Principle: "LLM handles metadata decisions, Pandas/HTML processes bulk data"
When to Use This Skill
Use excel-parser when:
- Processing Excel/CSV files with unknown structure or varying complexity
- Handling files ranging from simple data tables to complex financial reports
- Need to optimize between processing speed and extraction accuracy
- Working with files that may contain merged cells, multi-level headers, or irregular layouts
Skip this skill when:
- File structure is already known and documented
- Processing simple, well-structured tables with confirmed format
- Using predefined scripts for specific file formats
Processing Workflow
Step 1: Analyze File Complexity
Use the scripts/complexity_analyzer.py to scan file metadata:
python scripts/complexity_analyzer.py <file_path> [sheet_name]
What it analyzes (without loading data):
- Merged cell distribution (shallow vs deep in the table)
- Row count and data continuity
- Empty row interruptions (indicates multi-table layouts)
Output (JSON format):
{
"is_complex": false,
"recommended_strategy": "pandas",
"reasons": ["No deep merges detected", "Row count exceeds 1000, forcing Pandas mode"],
"stats": {
"total_rows": 5000,
"deep_merges": 0,
"empty_interruptions": 0
}
}
Step 2: Route to Optimal Strategy
Based on complexity analysis:
- is_complex = false → Use Path A (Pandas Standard Mode)
- is_complex = true → Use Path B (HTML Semantic Mode)
Step 3: Execute Processing
Follow the selected path's workflow to extract data.
Complexity Scoring Rules
Rule 1: Deep Merged Cells
- Condition: Merged cells appearing beyond row 5
- Interpretation: Complex table structure (not just header formatting)
- Decision: Mark as complex if >2 deep merges detected
- Example: Financial reports with merged category labels in data region
Rule 2: Empty Row Interruptions
- Condition: Multiple empty rows within the table
- Interpretation: Multiple sub-tables in single sheet
- Decision: Mark as complex if >2 empty row interruptions found
- Example: Summary table + detail table in one sheet
Rule 3: Row Count Override
- Condition: Total rows >1000
- Interpretation: Too large for HTML processing (token explosion)
- Decision: Force Pandas mode regardless of complexity
- Rationale: HTML conversion would exceed token limits
Rule 4: Default (Standard Table)
- Condition: No deep merges, continuous data, moderate size
- Interpretation: Standard data table
- Decision: Use Pandas for optimal speed
Path A: Pandas Standard Mode
When: Simple/large tables (most common case)
Strategy: Agent analyzes ONLY the first 20 rows to determine header position, then use Pandas to read full data at native speed.
Workflow:
Sample First 20 Rows
- Read only the first 20 rows using
pd.read_excel(..., nrows=20) - Convert to CSV format for analysis
- Read only the first 20 rows using
Determine Header Position
- Examine the sampled rows to identify which row contains the actual column headers
- Common patterns: Row 0 (standard), Row 1-2 (if title rows exist), Row with distinct column names
Read Full Data
- Use
pd.read_excel(..., header=<detected_row>)to load complete data - The header parameter ensures proper column naming
- Use
Token Cost: ~500 tokens (only 20 rows analyzed) Processing Speed: Very fast (Pandas native speed)
For implementation details, see
references/smart_excel_router.py
Path B: HTML Semantic Mode
When: Complex/irregular tables (merged cells, multi-level h
Установить excel-parser в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл excel-parser?
Smart Excel/CSV file parsing with intelligent routing based on file complexity analysis. Analyzes file structure (merged cells, row count, table layout) using lightweight metadata scanning, then recommends optimal processing strategy - either high-speed Pandas mode for standard tables or semantic HTML mode for complex reports. Use when processing Excel/CSV files with unknown or varying structure where optimization between speed and accuracy is needed.
Как установить скилл excel-parser?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл excel-parser запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic