$npx -y skills add waterfeet/DoroPet_V3 --skill excel-xlsxCreate, inspect, and edit Microsoft Excel workbooks and XLSX files with reliable formulas, dates, types, formatting, recalculation, and template preservation. Use when (1) the task is about Excel, .xlsx, .xlsm, .xls, .csv, or .tsv; (2) formulas, formatting, workbook str
| 1 | ## When to Use |
| 2 | |
| 3 | Use when the main artifact is a Microsoft Excel workbook or spreadsheet file, especially when formulas, dates, formatting, merged cells, workbook structure, or cross-platform behavior matter. |
| 4 | |
| 5 | ## Core Rules |
| 6 | |
| 7 | ### 1. Choose the workflow by job, not by habit |
| 8 | |
| 9 | - Use `pandas` for analysis, reshaping, and CSV-like tasks. |
| 10 | - Use `openpyxl` when formulas, styles, sheets, comments, merged cells, or workbook preservation matter. |
| 11 | - Treat CSV as plain data exchange, not as an Excel feature-complete format. |
| 12 | - Reading values, preserving a live workbook, and building a model from scratch are different spreadsheet jobs. |
| 13 | |
| 14 | ### 2. Dates are serial numbers with legacy quirks |
| 15 | |
| 16 | - Excel stores dates as serial numbers, not real date objects. |
| 17 | - The 1900 date system includes the false leap-day bug, and some workbooks use the 1904 system. |
| 18 | - Time is fractional day data, so formatting and conversion both matter. |
| 19 | - Date correctness is not enough if the number format still displays the wrong thing to the user. |
| 20 | |
| 21 | ### 3. Keep calculations in Excel when the workbook should stay live |
| 22 | |
| 23 | - Write formulas into cells instead of hardcoding derived results from Python. |
| 24 | - Use references to assumption cells instead of magic numbers inside formulas. |
| 25 | - Cached formula values can be stale, so do not trust them blindly after edits. |
| 26 | - Check copied formulas for wrong ranges, wrong sheets, and silent off-by-one drift before delivery. |
| 27 | - Absolute and relative references are part of the logic, so copied formulas can be wrong even when they still "work". |
| 28 | - Test new formulas on a few representative cells before filling them across a whole block. |
| 29 | - Verify denominators, named ranges, and precedent cells before shipping formulas that depend on them. |
| 30 | - A workbook should ship with zero formula errors, not with known `#REF!`, `#DIV/0!`, `#VALUE!`, `#NAME?`, or circular-reference fallout left for the user to fix. |
| 31 | - For model-style work, document non-obvious hardcodes, assumptions, or source inputs in comments or nearby notes. |
| 32 | |
| 33 | ### 4. Protect data types before Excel mangles them |
| 34 | |
| 35 | - Long identifiers, phone numbers, ZIP codes, and leading-zero values should usually be stored as text. |
| 36 | - Excel silently truncates numeric precision past 15 digits. |
| 37 | - Mixed text-number columns need explicit handling on read and on write. |
| 38 | - Scientific notation, auto-parsed dates, and stripped leading zeros are common corruption, not cosmetic issues. |
| 39 | |
| 40 | ### 5. Preserve workbook structure before changing content |
| 41 | |
| 42 | - Existing templates override generic styling advice. |
| 43 | - Only the top-left cell of a merged range stores the value. |
| 44 | - Hidden rows, hidden columns, named ranges, and external references can still affect formulas and outputs. |
| 45 | - Shared strings, defined names, and sheet-level conventions can matter even when the visible cells look simple. |
| 46 | - Match styles for newly filled cells instead of quietly introducing a new visual system. |
| 47 | - If the workbook is a template, preserve sheet order, widths, freezes, filters, print settings, validations, and visual conventions unless the task explicitly changes them. |
| 48 | - Conditional formatting, filters, print areas, and data validation often carry business meaning even when users only mention the numbers. |
| 49 | - If there is no existing style guide and the file is a model, keep editable inputs visually distinguishable from formulas, but never override an established template to force a generic house style. |
| 50 | |
| 51 | ### 6. Recalculate and review before delivery |
| 52 | |
| 53 | - Formula strings alone are not enough if the recipient needs current values. |
| 54 | - `openpyxl` preserves formulas but does not calculate them. |
| 55 | - Verify no `#REF!`, `#DIV/0!`, `#VALUE!`, `#NAME?`, or circular-reference fallout remains. |
| 56 | - If layout matters, render or visually review the workbook before calling it finished. |
| 57 | - Be careful with read modes: opening a workbook for values only and then saving can flatten formulas into static values. |
| 58 | - If assumptions or hardcoded overrides must stay, make them obvious enough that the next editor can audit the workbook. |
| 59 | |
| 60 | ### 7. Scale the workflow to the file size |
| 61 | |
| 62 | - Large workbooks can fail for boring reasons: memory spikes, padded empty rows, and slow full-sheet reads. |
| 63 | - Use streaming or chunked reads when the file is big enough that loading everything at once becomes fragile. |
| 64 | - Large-file wo |