$npx -y skills add aitytech/agentkits-marketing --skill xlsxComprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Read
| 1 | # XLSX Spreadsheet Processing |
| 2 | |
| 3 | ## Language & Quality Standards |
| 4 | |
| 5 | **CRITICAL**: Respond in the same language the user is using. If Vietnamese, respond in Vietnamese. If Spanish, respond in Spanish. |
| 6 | |
| 7 | **Standards**: Token efficiency, sacrifice grammar for concision, list unresolved questions at end. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | # Requirements for Outputs |
| 12 | |
| 13 | ## All Excel files |
| 14 | |
| 15 | ### Zero Formula Errors |
| 16 | - Every Excel model MUST be delivered with ZERO formula errors (#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?) |
| 17 | |
| 18 | ### Preserve Existing Templates (when updating templates) |
| 19 | - Study and EXACTLY match existing format, style, and conventions when modifying files |
| 20 | - Never impose standardized formatting on files with established patterns |
| 21 | - Existing template conventions ALWAYS override these guidelines |
| 22 | |
| 23 | ## Financial models |
| 24 | |
| 25 | ### Color Coding Standards |
| 26 | Unless otherwise stated by the user or existing template |
| 27 | |
| 28 | #### Industry-Standard Color Conventions |
| 29 | - **Blue text (RGB: 0,0,255)**: Hardcoded inputs, and numbers users will change for scenarios |
| 30 | - **Black text (RGB: 0,0,0)**: ALL formulas and calculations |
| 31 | - **Green text (RGB: 0,128,0)**: Links pulling from other worksheets within same workbook |
| 32 | - **Red text (RGB: 255,0,0)**: External links to other files |
| 33 | - **Yellow background (RGB: 255,255,0)**: Key assumptions needing attention or cells that need to be updated |
| 34 | |
| 35 | ### Number Formatting Standards |
| 36 | |
| 37 | #### Required Format Rules |
| 38 | - **Years**: Format as text strings (e.g., "2024" not "2,024") |
| 39 | - **Currency**: Use $#,##0 format; ALWAYS specify units in headers ("Revenue ($mm)") |
| 40 | - **Zeros**: Use number formatting to make all zeros "-", including percentages (e.g., "$#,##0;($#,##0);-") |
| 41 | - **Percentages**: Default to 0.0% format (one decimal) |
| 42 | - **Multiples**: Format as 0.0x for valuation multiples (EV/EBITDA, P/E) |
| 43 | - **Negative numbers**: Use parentheses (123) not minus -123 |
| 44 | |
| 45 | ### Formula Construction Rules |
| 46 | |
| 47 | #### Assumptions Placement |
| 48 | - Place ALL assumptions (growth rates, margins, multiples, etc.) in separate assumption cells |
| 49 | - Use cell references instead of hardcoded values in formulas |
| 50 | - Example: Use =B5*(1+$B$6) instead of =B5*1.05 |
| 51 | |
| 52 | #### Formula Error Prevention |
| 53 | - Verify all cell references are correct |
| 54 | - Check for off-by-one errors in ranges |
| 55 | - Ensure consistent formulas across all projection periods |
| 56 | - Test with edge cases (zero values, negative numbers) |
| 57 | - Verify no unintended circular references |
| 58 | |
| 59 | #### Documentation Requirements for Hardcodes |
| 60 | - Comment or in cells beside (if end of table). Format: "Source: [System/Document], [Date], [Specific Reference], [URL if applicable]" |
| 61 | - Examples: |
| 62 | - "Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]" |
| 63 | - "Source: Company 10-Q, Q2 2025, Exhibit 99.1, [SEC EDGAR URL]" |
| 64 | - "Source: Bloomberg Terminal, 8/15/2025, AAPL US Equity" |
| 65 | - "Source: FactSet, 8/20/2025, Consensus Estimates Screen" |
| 66 | |
| 67 | # XLSX creation, editing, and analysis |
| 68 | |
| 69 | ## Overview |
| 70 | |
| 71 | A user may ask you to create, edit, or analyze the contents of an .xlsx file. You have different tools and workflows available for different tasks. |
| 72 | |
| 73 | ## Important Requirements |
| 74 | |
| 75 | **LibreOffice Required for Formula Recalculation**: You can assume LibreOffice is installed for recalculating formula values using the `recalc.py` script. The script automatically configures LibreOffice on first run |
| 76 | |
| 77 | ## Reading and analyzing data |
| 78 | |
| 79 | ### Data analysis with pandas |
| 80 | For data analysis, visualization, and basic operations, use **pandas** which provides powerful data manipulation capabilities: |
| 81 | |
| 82 | ```python |
| 83 | import pandas as pd |
| 84 | |
| 85 | # Read Excel |
| 86 | df = pd.read_excel('file.xlsx') # Default: first sheet |
| 87 | all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict |
| 88 | |
| 89 | # Analyze |
| 90 | df.head() # Preview data |
| 91 | df.info() # Column info |
| 92 | df.describe() # Statistics |
| 93 | |
| 94 | # Write Excel |
| 95 | df.to_excel('output.xlsx', index=False) |
| 96 | ``` |
| 97 | |
| 98 | ## Excel File Workflows |
| 99 | |
| 100 | ## CRITICAL: Use Formulas, Not Hardcoded Values |
| 101 | |
| 102 | **Always use Excel formulas instead of calculating values in Python and hardcoding them.** This ensures the spreadsheet remains dynamic and updateable. |
| 103 | |
| 104 | ### ❌ WRONG - Hardcoding Calculated Values |
| 105 | ```python |
| 106 | # Bad: Calculating in Python and |