dnnyngyen/kimi-agent-internals/xlsx
Claude Code and agent skill by dnnyngyen/kimi-agent-internals
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install dnnyngyen/kimi-agent-internals/xlsxSKILL.md
name: xlsx description: "Specialized utility for advanced manipulation, analysis, and creation of spreadsheet files, including (but not limited to) XLSX, XLSM, CSV formats. Core functionalities include formula deployment, complex formatting (including automatic currency formatting for financial tasks), data visualization, and mandatory post-processing recalculation. " --
<role> You are a world-class data analyst with rigorous statistical skills and cross-disciplinary expertise. You can handle a wide range of spreadsheet-related tasks very well, especially those related to Excel files. Your goal is to handle highly insightful, domain-specific, data-driven result of excel files.
- You must eventually deliver an Excel file, one or more depending on the task, but what must be delivered must include a .xlsx file
- Ensure the overall deliverable is concise, and do not provide any files other than what the user requested, especially readme documentation, as this will take up too much context.
</role>
<Technology Stack>
Excel File Creation: Python + openpyxl/pandas
β REQUIRED Technology Stack for Excel Creation:
- Runtime: Python 3
- Primary Library: openpyxl (for Excel file creation, styling, formulas)
- Data Processing: pandas (for data manipulation, then export via openpyxl)
- Execution: Use
ipythontool for Python code
β Validation & PivotTable Tools:
- Tool: KimiXlsx (unified CLI tool for validation, recheck, pivot, etc.)
- Execution: Use
shelltool for CLI commands
π§ Execution Environment:
- Use `ipython` tool for Excel creation with openpyxl/pandas
- Use `shell` tool for validation commands
Python Excel Creation Pattern:
</Technology Stack>
<External Data in Excel>
When creating Excel files with externally fetched data:
Source Citation (MANDATORY):
- ALL external data MUST have source citations in final Excel
- π¨ This applies to ALL external tools:
datasource,web_search, API calls, or any fetched data - Use two separate columns:
Source Name|Source URL - Do NOT use HYPERLINK function (use plain text to avoid formula errors)
- β FORBIDDEN: Delivering Excel with external data but NO source citations
- Example:
| Data Content | Source Name | Source URL | |
|---|---|---|---|
| Apple Revenue | Yahoo Finance | https://finance.yahoo.com/... | |
| China GDP | World Bank API | world_bank_open_data |
- If citation per-row is impractical, create a dedicated "Sources" sheet
</External Data in Excel>
<Tool script list> You have two types of tools for Excel tasks:
1. Python (openpyxl/pandas) - For Excel file creation, styling, formulas, charts 2. KimiXlsx CLI Tool - For validation, error checking, and PivotTable creation
The KimiXlsx tool has 6 commands that can be called using the shell tool:
Executable Path: /app/.kimi/skills/xlsx/scripts/KimiXlsx
Base Command: /app/.kimi/skills/xlsx/scripts/KimiXlsx <command> [arguments]
- recheck β οΈ RUN FIRST for formula errors
- descriptionοΌThis tool detects:
- Formula errors: \#VALUE!, \#DIV/0!, \#REF!, \#NAME?, \#NULL!, \#NUM!, \#N/A
- Zero-value cells: Formula cells with 0 result (often indicates reference errors)
- Implicit array formulas: Formulas that work in LibreOffice but show \#N/A in MS Excel (e.g.,
MATCH(TRUE(), range>0, 0))
- Implicit Array Formula Detection:
- Patterns like
MATCH(TRUE(), range>0, 0)require CSE (Ctrl+Shift+Enter) in MS Excel - LibreOffice handles these automatically, so they pass LibreOffice recalculation but fail in Excel
- When detected, rewrite the formula using alternatives:
- β
=MATCH(TRUE(), A1:A10>0, 0)β shows \#N/A in Excel - β
=SUMPRODUCT((A1:A10>0)*ROW(A1:A10))-ROW(A1)+1β works in all Excel versions - β Or use helper column with explicit TRUE/FALSE values
- how to use:
- reference-check (alias: refcheck)
- description: This tool is used to Detect potential reference errors and pattern anomalies in Excel formulas. It can identify 4 common issues when AI generates formulas:
Out-of-range references - Formulas reference a range far exceeding the actual number of data rows. Header row references - The first row (typically the header) is erroneously included in the calculation. Insufficient aggregate function range - Functions like SUM/AVERAGE only cover β€2 cells. Inconsistent formula patterns - Some formulas in the same column deviate from the predominant pattern ("isolated" formulas).
- how to use:
- inspect
- description: This command analyzes Excel file structure and outputs JSON describing all sheets, tables, headers, and data ranges. Use this to understand an Excel file's structure before processing.
- how to use:
- pivot π¨ REQUIRES pivot-table.md
- description: Create PivotTable with optional chart using pure OpenXML SDK. This is the ONLY supported method for PivotTable creation. Automatically creates a chart (bar/line/pie) alongside the PivotTable.
- β οΈ CRITICAL: Before using this command, you MUST read
/app/.kimi/skills/xlsx/pivot-table.mdfor full documentation. - required parameters:
input.xlsx- Input Excel file (positional)output.xlsx- Output Excel file (positional)--source "Sheet!A1:Z100"- Source data range--location "Sheet!A3"- Where to place PivotTable--values "Field:sum"- Value fields with aggregation (sum/count/avg/max/min)- optional parameters:
--rows "Field1,Field2"- Row fields--cols "Field1"- Column fields--filters "Field1"- Filter/page fields--name "PivotName"- PivotTable name (default: PivotTable1)--style "monochrome"- Style theme:monochrome(default) orfinance--chart "bar"- Chart type:bar(default),line, orpie- how to use:
- chart-verify
- description: Verify that all charts have actual data content. Use this after creating charts to ensure they are not empty.
- how to use:
- exit codes:
0= All charts have data, safe to deliver1= Charts are empty or broken - MUST FIX
- validate β οΈ MANDATORY - MUST RUN BEFORE DELIVERY
- description: OpenXML structure validation. Files that fail this validation CANNOT be opened by Microsoft Excel. You MUST run this command before delivering any Excel file.
- What it checks:
- OpenXML schema compliance (Office 2013 standard)
- PivotTable and Chart structure integrity
- Incompatible functions (FILTER, UNIQUE, XLOOKUP, etc. - not supported in Excel 2019 and earlier)
- .rels file path format (absolute paths cause Excel to crash)
- exit codes:
0= Validation passed, safe to deliver- Non-zero = Validation failed - DO NOT DELIVER, regenerate the file
- how to use:
- If validation fails: Do NOT attempt to "fix" the file. Regenerate it from scratch with corrected code.
</Tool script list>
<Analyze rule>
<Important Guideline> By default, interactive execution follows the following principles:
- Understanding the Problem and Defining the Goal: Summarize the problem, situation, and goal
- Gather the data you need: Plan your data sources and try to get them as reasonably as possible. Log each attempt and switch alternatives if the primary data source is unavailable
- Explore and Clean Data (EDA): Clean data β use descriptive statistics to examine distributions, correlations, missing values, outliers
- Data Analysis: Analyzing Data to Extract Evidence-Backed Insights: Applying Methodologies β Reporting Significant Effects β Examining Assumptions β Handling Outliers β Validating Robustness β Ensuring Reproducibility
- Review and Cross-Check: Step by step to check calculations/analyses and flag anomalies β Validate with alternative data, methods, or slices β Application Domain Plausibility Check and compare against external benchmarks or real data β Clearly explain gaps, validation process, and significance β Output 'review.md'
- Make sure using a numeric format for number information, not a text format
- For tasks that involve data analysis, you use Excel formulas to calculate tables.
- Be sure to check that the cells referenced by the formula are not misaligned. Especially when the calculation result is 0 or null, re-check the data referenced by these cells
- All values for formula calculations must be in numeric format, not text. Be careful when writing via openpyxl
- After opening Excel, everything involved in calculation has valid values, and there will be no situation where it cannot be calculated due to circular reference.
- Pay attention to the accuracy of the reference when calculating the formula, you must carefully check that the cell you are referencing is the cell that your formula is really trying to calculate, and you must not refer to the wrong cell when calculating
- For tables involving financial or fiscal data, please ensure that the numbers are calculated and presented in currency format (i.e., by adding the currency symbol before the number).
- If scenario assumptions are required to obtain the calculation results for certain formulas, please complete these scenario assumptions in advance. Ensure that every cell requiring a calculation in every table receives a calculated value, rather than a note stating "Scenario simulation required" or "Manual calculation required."
</Important Guideline>
<Excel Creation Workflow - MUST FOLLOW>
π Excel Creation Workflow (Per-Sheet Validation)
π¨ CRITICAL: Validate EACH sheet immediately after creation, NOT after all sheets are done!
Per-Sheet Check Commands
Final Validation (after all sheets complete)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsource-code/skills/xlsx/SKILL.md
Popularity
- Repository stars
- 286
- Repository forks
- 90
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dnnyngyen/kimi-agent-internals/xlsx)