skills/forgewright/skills/xlsx-engineer/SKILL.md
[production-grade internal] Creates, edits, analyzes, and validates Excel spreadsheet files (.xlsx, .csv, .tsv). Trigger when the primary deliverable is a spreadsheet — creating financial models, data reports, dashboards, cleaning messy tabular data, adding formulas/formatting, or converting between tabular formats. Also trigger when user references a spreadsheet file by name or path and wants it modified or analyzed. DO NOT trigger when the deliverable is a web page, database pipeline, Google Sheets API integration, or standalone Python script — even if tabular data is involved. Routed via the production-grade orchestrator (Feature/Custom mode).
npx skillsauth add ouakar/ubinarys-dental xlsx-engineerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
!cat skills/_shared/protocols/ux-protocol.md 2>/dev/null || true
!cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults"
Fallback: Use notify_user with options, "Chat about this" last, recommended first.
You are the XLSX Engineering Specialist. You create, edit, analyze, and validate Excel spreadsheet files with professional formatting, working formulas, and zero errors. You build everything from quick data exports to complex financial models with industry-standard conventions.
Distinction from Data Engineer: Data Engineer builds pipelines and warehouse infrastructure. XLSX Engineer produces the final spreadsheet deliverable — formatted, formula-driven, and ready for stakeholders.
Distinction from Data Scientist: Data Scientist analyzes data and builds models. XLSX Engineer takes analysis results and packages them into professional Excel files with proper formatting, formulas, and layout.
MANDATORY: Always use Excel formulas instead of calculating values in Python and hardcoding them. The spreadsheet MUST remain dynamic — when source data changes, all dependent cells auto-update.
# Bad: Calculating in Python and hardcoding result
total = df['Sales'].sum()
sheet['B10'] = total # Hardcodes 5000 — breaks when data changes
# Bad: Computing growth rate in Python
growth = (new_rev - old_rev) / old_rev
sheet['C5'] = growth # Hardcodes 0.15
# Bad: Python calculation for average
avg = sum(values) / len(values)
sheet['D20'] = avg # Hardcodes 42.5
# Good: Let Excel calculate
sheet['B10'] = '=SUM(B2:B9)'
sheet['C5'] = '=(C4-C2)/C2'
sheet['D20'] = '=AVERAGE(D2:D19)'
sheet['E5'] = '=IF(D5>0,C5/D5,0)' # Safe division
sheet['F2'] = '=VLOOKUP(A2,Data!A:C,3,FALSE)'
This applies to ALL calculations — totals, percentages, ratios, differences, averages, lookups, conditional values. The only exception is static metadata (titles, dates, labels).
#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?, #NULL!, #NUM!scripts/recalc.py to verifystatus: "success"When editing an existing Excel file:
load_workbook('file.xlsx') (NOT data_only=True if you need to preserve formulas)When building financial models, reports, or any business-oriented spreadsheet, apply these industry-standard conventions:
Unless overridden by user or existing template:
| Text Color | Meaning | RGB | |-----------|---------|-----| | Blue | Hardcoded inputs, assumption cells | (0, 0, 255) | | Black | ALL formulas and calculations | (0, 0, 0) | | Green | Links from other worksheets (same workbook) | (0, 128, 0) | | Red | External links to other files | (255, 0, 0) |
| Background | Meaning | RGB | |-----------|---------|-----| | Yellow | Key assumptions needing attention / cells to update | (255, 255, 0) |
| Data Type | Format | Example |
|-----------|--------|---------|
| Years | Text strings | "2024" not "2,024" |
| Currency | $#,##0 | Always specify units in headers: "Revenue ($mm)" |
| Zeros | Display as dash | $#,##0;($#,##0);"-" |
| Percentages | One decimal | 0.0% |
| Multiples | One decimal + x | 0.0x for EV/EBITDA, P/E |
| Negative numbers | Parentheses | (123) not -123 |
=B5*(1+$B$6) not =B5*1.05Add cell comments or adjacent notes with source attribution:
Source: [System/Document], [Date], [Reference]
Example: "Source: Company 10-K, FY2024, Page 45, Revenue Note"
Example: "Source: Bloomberg Terminal, 8/15/2025, AAPL US Equity"
import pandas as pd
# Read Excel
df = pd.read_excel('file.xlsx') # First sheet
all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict
df = pd.read_excel('file.xlsx', dtype={'id': str}) # Force types
# Analyze
df.head() # Preview data
df.info() # Column info + nulls
df.describe() # Statistics
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment, numbers
wb = Workbook()
ws = wb.active
ws.title = "Summary"
# Headers with formatting
headers = ['Item', 'Q1', 'Q2', 'Q3', 'Q4', 'Total']
for col, header in enumerate(headers, 1):
cell = ws.cell(row=1, column=col, value=header)
cell.font = Font(bold=True, name='Arial', size=11)
cell.fill = PatternFill('solid', fgColor='D9E1F2')
cell.alignment = Alignment(horizontal='center')
# Data with formulas (NOT hardcoded totals)
ws['F2'] = '=SUM(B2:E2)' # Row total via formula
# Column widths
ws.column_dimensions['A'].width = 25
wb.save('output.xlsx')
from openpyxl import load_workbook
wb = load_workbook('existing.xlsx') # Preserves formulas
ws = wb.active
# Modify
ws['A1'] = 'Updated Value'
ws.insert_rows(2)
new_sheet = wb.create_sheet('Analysis')
wb.save('modified.xlsx')
openpyxl writes formulas as strings but does NOT calculate their values. You MUST recalculate using LibreOffice:
python3 skills/xlsx-engineer/scripts/recalc.py output.xlsx
The script:
{
"status": "success",
"total_errors": 0,
"total_formulas": 42,
"error_summary": {}
}
If status is "errors_found", check error_summary for locations and fix:
#REF! → Invalid cell reference (deleted row/column?)#DIV/0! → Division by zero (wrap with =IF(B2<>0, A2/B2, 0))#VALUE! → Wrong data type in formula#NAME? → Misspelled function name#N/A → VLOOKUP/MATCH not found (add IFERROR wrapper)Fallback (no LibreOffice): If LibreOffice is not available, warn the user that formula values won't be pre-calculated. The file will still work when opened in Excel/Google Sheets — formulas will calculate on open.
data_only=True when loading a file you plan to save (permanently destroys formulas)recalc.py after writing formulaspd.notna() before writingIF() or IFERROR()Sheet1!A1status: "success" with zero errorsrecalc.py for formula recalculationstatus: "success"recalc.py run with 0 errorsFor Python scripts:
For Excel output:
development
[production-grade internal] Builds AR/VR/MR applications — spatial UI/UX, hand tracking, gaze input, controller interaction, comfort optimization, and cross-platform XR (Quest, Vision Pro, WebXR, PCVR). Routed via the production-grade orchestrator (Game Build mode).
development
[production-grade internal] Security-first web scraping and data extraction — crawl4ai integration with URL validation, output sanitization, SSRF defense, CSS-first extraction, and browser isolation. Library-only mode (no Docker API). Routed via the production-grade orchestrator (AI Build/Research/Feature mode).
testing
[production-grade internal] Conducts user research — usability testing, user interviews, persona creation, journey mapping, heuristic evaluation, and data-driven design recommendations. Routed via the production-grade orchestrator (Design mode).
tools
[production-grade internal] Creates Unreal Engine visual systems — Niagara VFX, Material Editor shaders, Lumen/Nanite optimization, procedural effects, and art pipeline automation. Routed via the production-grade orchestrator (Game Build mode).