$npx -y skills add kv0906/pm-kit --skill xlsxUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); cre
| 1 | # Requirements for Outputs |
| 2 | |
| 3 | ## All Excel files |
| 4 | |
| 5 | ### Professional Font |
| 6 | - Use a consistent, professional font (e.g., Arial, Times New Roman) for all deliverables unless otherwise instructed by the user |
| 7 | |
| 8 | ### Zero Formula Errors |
| 9 | - Every Excel model MUST be delivered with ZERO formula errors (#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?) |
| 10 | |
| 11 | ### Preserve Existing Templates (when updating templates) |
| 12 | - Study and EXACTLY match existing format, style, and conventions when modifying files |
| 13 | - Never impose standardized formatting on files with established patterns |
| 14 | - Existing template conventions ALWAYS override these guidelines |
| 15 | |
| 16 | ## Financial models |
| 17 | |
| 18 | ### Color Coding Standards |
| 19 | Unless otherwise stated by the user or existing template |
| 20 | |
| 21 | #### Industry-Standard Color Conventions |
| 22 | - **Blue text (RGB: 0,0,255)**: Hardcoded inputs, and numbers users will change for scenarios |
| 23 | - **Black text (RGB: 0,0,0)**: ALL formulas and calculations |
| 24 | - **Green text (RGB: 0,128,0)**: Links pulling from other worksheets within same workbook |
| 25 | - **Red text (RGB: 255,0,0)**: External links to other files |
| 26 | - **Yellow background (RGB: 255,255,0)**: Key assumptions needing attention or cells that need to be updated |
| 27 | |
| 28 | ### Number Formatting Standards |
| 29 | |
| 30 | #### Required Format Rules |
| 31 | - **Years**: Format as text strings (e.g., "2024" not "2,024") |
| 32 | - **Currency**: Use $#,##0 format; ALWAYS specify units in headers ("Revenue ($mm)") |
| 33 | - **Zeros**: Use number formatting to make all zeros "-", including percentages (e.g., "$#,##0;($#,##0);-") |
| 34 | - **Percentages**: Default to 0.0% format (one decimal) |
| 35 | - **Multiples**: Format as 0.0x for valuation multiples (EV/EBITDA, P/E) |
| 36 | - **Negative numbers**: Use parentheses (123) not minus -123 |
| 37 | |
| 38 | ### Formula Construction Rules |
| 39 | |
| 40 | #### Assumptions Placement |
| 41 | - Place ALL assumptions (growth rates, margins, multiples, etc.) in separate assumption cells |
| 42 | - Use cell references instead of hardcoded values in formulas |
| 43 | - Example: Use =B5*(1+$B$6) instead of =B5*1.05 |
| 44 | |
| 45 | #### Formula Error Prevention |
| 46 | - Verify all cell references are correct |
| 47 | - Check for off-by-one errors in ranges |
| 48 | - Ensure consistent formulas across all projection periods |
| 49 | - Test with edge cases (zero values, negative numbers) |
| 50 | - Verify no unintended circular references |
| 51 | |
| 52 | #### Documentation Requirements for Hardcodes |
| 53 | - Comment or in cells beside (if end of table). Format: "Source: [System/Document], [Date], [Specific Reference], [URL if applicable]" |
| 54 | - Examples: |
| 55 | - "Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]" |
| 56 | - "Source: Company 10-Q, Q2 2025, Exhibit 99.1, [SEC EDGAR URL]" |
| 57 | - "Source: Bloomberg Terminal, 8/15/2025, AAPL US Equity" |
| 58 | - "Source: FactSet, 8/20/2025, Consensus Estimates Screen" |
| 59 | |
| 60 | # XLSX creation, editing, and analysis |
| 61 | |
| 62 | ## Overview |
| 63 | |
| 64 | 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. |
| 65 | |
| 66 | ## Important Requirements |
| 67 | |
| 68 | **LibreOffice Required for Formula Recalculation**: You can assume LibreOffice is installed for recalculating formula values using the `scripts/recalc.py` script. The script automatically configures LibreOffice on first run, including in sandboxed environments where Unix sockets are restricted (handled by `scripts/office/soffice.py`) |
| 69 | |
| 70 | ## Reading and analyzing data |
| 71 | |
| 72 | ### Data analysis with pandas |
| 73 | For data analysis, visualization, and basic operations, use **pandas** which provides powerful data manipulation capabilities: |
| 74 | |
| 75 | ```python |
| 76 | import pandas as pd |
| 77 | |
| 78 | # Read Excel |
| 79 | df = pd.read_excel('file.xlsx') # Default: first sheet |
| 80 | all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict |
| 81 | |
| 82 | # Analyze |
| 83 | df.head() # Preview data |
| 84 | df.info() # Column info |
| 85 | df.describe() # Statistics |
| 86 | |
| 87 | # Write Excel |
| 88 | df.to_excel('output.xlsx', index=False) |
| 89 | ``` |
| 90 | |
| 91 | ## Excel File Workflows |
| 92 | |
| 93 | ## CRITICAL: Use Formulas, Not Hardcoded Values |
| 94 | |
| 95 | **Always use Excel formulas instead of calculating values in Python and hardcoding them.** This ensures the spreadsheet remains |