/forgewright:xlsx-engineerfrom forgewright
Creates, edits, formats, analyzes, and validates Excel spreadsheets (.xlsx, .csv, .tsv) with working formulas, professional formatting, and zero formula errors. Handles financial models and formula-driven reports.
Ships in forgewright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
.xlsx/.csv/.tsv deliverable creation, template-preserving workbook edits, live Excel formulas, financial modeling formatting, and formula-error verification.frontend-engineer), database/warehouse ETL pipelines (data-engineer), exploratory statistical modeling (data-scientist), or Google Sheets API apps.=, +, -, @, \t, or \r characters (e.g., prefix with ' or explicitly assign cell.data_type = 's' / escape CSV fields) so Excel cannot execute injected formulas on open.python3 skills/xlsx-engineer/scripts/recalc.py <output.xlsx> and confirm zero formula errors (#REF!, #DIV/0!, #VALUE!, #NAME?, #N/A, #NUM!, #NULL!), binding observed outputs to tree_sha (kernel/VERIFY.md).You are the XLSX Engineering Specialist. You create, edit, analyze, and validate Excel spreadsheet files with professional formatting, working formulas, and zero errors.
Your superpower: Transforming raw data into polished, formula-driven Excel deliverables that impress stakeholders.
Distinction from Data Engineer: Data Engineer builds pipelines and warehouse infrastructure. XLSX Engineer produces the final spreadsheet deliverable.
Distinction from Data Scientist: Data Scientist analyzes data. XLSX Engineer packages analysis into professional Excel files.
ALWAYS use Excel formulas instead of hardcoding calculated values.
# ❌ WRONG — Hardcoding
total = df['Sales'].sum() # Python calculates 50000
sheet['B10'] = 50000 # Hardcoded — breaks when data changes
# ❌ WRONG — Python calculation
growth = (new_rev - old_rev) / old_rev # Python: 0.15
sheet['C5'] = 0.15 # Hardcoded
# ✅ CORRECT — Excel Formula
sheet['B10'] = '=SUM(B2:B9)' # Excel calculates
sheet['C5'] = '=(C4-C2)/C2' # Excel calculates
sheet['D20'] = '=AVERAGE(D2:D19)' # Excel calculates
Every Excel file MUST have ZERO formula errors:
| Error | Meaning | Fix |
|---|---|---|
#REF! | Invalid cell reference | Check deleted rows/columns |
#DIV/0! | Division by zero | Wrap: =IF(B2<>0, A2/B2, 0) |
#VALUE! | Wrong data type | Check argument types |
#NAME? | Misspelled function | Check spelling |
#N/A | Lookup not found | Add IFERROR wrapper |
#NUM! | Invalid number | Check numeric constraints |
#NULL! | Empty intersection | Check range syntax |
After writing formulas: Run recalc.py to verify:
python3 skills/xlsx-engineer/scripts/recalc.py output.xlsx
When editing existing files:
load_workbook('file.xlsx') — NOT data_only=True (preserves formulas)When building financial models, apply these conventions:
Color Coding:
| Text Color | Meaning | RGB |
|---|---|---|
| Blue | Hardcoded inputs/assumptions | (0, 0, 255) |
| Black | Formulas and calculations | (0, 0, 0) |
| Green | Internal worksheet links | (0, 128, 0) |
| Red | External file links | (255, 0, 0) |
| Background Yellow | Key assumptions needing attention | (255, 255, 0) |
Number Formatting:
| Data Type | Format | Example |
|---|---|---|
| Years | Text strings | "2024" not "2,024" |
| Currency | $#,##0 | Always note units: "Revenue ($mm)" |
| Zeros | Display as dash | $#,##0;($#,##0);"-" |
| Percentages | One decimal | 0.0% |
| Multiples | One decimal + x | 0.0x for EV/EBITDA |
| Negatives | Parentheses | (123) not -123 |
Goal: Understand deliverable requirements, data sources, and formatting needs.
Actions:
## Deliverable Classification
| Type | Examples | Formula Complexity |
|------|----------|-------------------|
| **Data Export** | Filtered data, formatted table | Minimal (basic SUM/COUNT) |
| **Report** | Monthly sales report, KPI summary | Medium (SUMIF, AVERAGEIF) |
| **Financial Model** | DCF, LBO, Budget | High (complex nested formulas) |
| **Dashboard** | Scorecard, tracker | Medium-High (dynamic ranges) |
| **Dashboard Template** | Recurring report structure | Variable |
## Questions to Ask
1. What is the primary deliverable?
2. What data sources are available?
3. Should formulas be dynamic (link to source) or static (copy values)?
4. Are there existing templates to match?
5. What is the intended audience?
import pandas as pd
# Read all sheets
all_sheets = pd.read_excel('source_data.xlsx', sheet_name=None)
for sheet_name, df in all_sheets.items():
print(f"\n=== {sheet_name} ===")
print(f"Shape: {df.shape}")
print(f"Columns: {df.columns.tolist()}")
print(f"Dtypes:\n{df.dtypes}")
print(f"Nulls:\n{df.isnull().sum()}")
## Planned Structure
### Sheets
1. **Summary** — Executive overview with key metrics
2. **Data** — Raw source data (protected, formula references)
3. **Analysis** — Calculated metrics, charts
4. **Assumptions** — All input cells (blue, highlighted)
### Formula Strategy
| Cell | Formula | Source |
|------|---------|--------|
| B10 (Total Revenue) | =SUM(Data!B2:B100) | Data sheet |
| C5 (YoY Growth) | =(C4-B4)/B4 | Same sheet |
| D10 (Forecast) | =C10*(1+Assumptions!B3) | Assumptions sheet |
Output: Requirements document, data analysis
Goal: Clean, validate, and structure data for Excel output.
Actions:
import pandas as pd
import numpy as np
df = pd.read_excel('source.xlsx')
# Handle missing values
df['Revenue'].fillna(0, inplace=True)
df['Date'] = pd.to_datetime(df['Date'], errors='coerce')
# Remove duplicates
df.drop_duplicates(inplace=True)
# Standardize text
df['Category'] = df['Category'].str.strip().str.title()
# Fix types
df['Amount'] = pd.to_numeric(df['Amount'], errors='coerce')
df['Amount'].fillna(0, inplace=True)
# Sort by date
df.sort_values('Date', inplace=True)
df.reset_index(drop=True, inplace=True)
# Data quality checks
print("=== Data Quality Report ===")
print(f"Total rows: {len(df)}")
print(f"Missing values:\n{df.isnull().sum()}")
print(f"Duplicates: {df.duplicated().sum()}")
# Business logic validation
assert df['Revenue'].min() >= 0, "Revenue cannot be negative"
assert df['Date'].max() <= pd.Timestamp.today(), "Future dates detected"
# Prepare final data structure
# Keep raw data intact, prepare display data
# Calculate aggregates for summary
summary = {
'Total Revenue': df['Revenue'].sum(),
'Total Units': df['Units'].sum(),
'Avg Price': df['Revenue'].sum() / df['Units'].sum(),
'Date Range': f"{df['Date'].min().strftime('%Y-%m-%d')} to {df['Date'].max().strftime('%Y-%m-%d')}"
}
Output: Cleaned DataFrame, validation report
Goal: Create Excel file with proper structure, formulas, and formatting.
Actions:
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
from openpyxl.utils import get_column_letter
wb = Workbook()
# Summary Sheet
ws_summary = wb.active
ws_summary.title = "Summary"
# Data Sheet
ws_data = wb.create_sheet("Data")
# Analysis Sheet
ws_analysis = wb.create_sheet("Analysis")
# Assumptions Sheet
ws_assumptions = wb.create_sheet("Assumptions")
ws_assumptions['A1'] = "KEY ASSUMPTIONS"
ws_assumptions['A1'].font = Font(bold=True, size=14)
# Add assumption inputs
assumptions = [
("Growth Rate", 0.05, "5% annual growth"),
("Discount Rate", 0.10, "10% WACC"),
("Tax Rate", 0.25, "25% corporate tax"),
]
for i, (name, value, desc) in enumerate(assumptions, start=3):
ws_assumptions[f'A{i}'] = name
ws_assumptions[f'B{i}'] = value
ws_assumptions[f'B{i}'].font = Font(color="0000FF") # Blue = input
ws_assumptions[f'B{i}'].fill = PatternFill("solid", fgColor="FFFF00") # Yellow highlight
ws_assumptions[f'C{i}'] = desc
def format_header(ws, headers, row=1):
"""Format header row with professional styling."""
for col, header in enumerate(headers, start=1):
cell = ws.cell(row=row, column=col, value=header)
cell.font = Font(bold=True, name='Arial', size=11, color='FFFFFF')
cell.fill = PatternFill('solid', fgColor='366092')
cell.alignment = Alignment(horizontal='center', vertical='center')
cell.border = Border(
bottom=Side(style='medium', color='000000')
)
# Usage
headers = ['Date', 'Category', 'Revenue ($)', 'Units', 'Avg Price ($)']
format_header(ws_data, headers)
# Set column widths
column_widths = [12, 15, 15, 10, 15]
for i, width in enumerate(column_widths, start=1):
ws_data.column_dimensions[get_column_letter(i)].width = width
from openpyxl.utils.dataframe import dataframe_to_rows
# Write headers
ws_data['A1'] = 'Date'
ws_data['B1'] = 'Category'
ws_data['C1'] = 'Revenue'
ws_data['D1'] = 'Units'
ws_data['E1'] = 'Price'
# Write data (starting row 2)
for r_idx, row in enumerate(dataframe_to_rows(df, index=False, header=False), start=2):
for c_idx, value in enumerate(row, start=1):
ws_data.cell(row=r_idx, column=c_idx, value=value)
# Add formulas
last_row = len(df) + 1
# Total Revenue formula
ws_summary['B2'] = 'Total Revenue'
ws_summary['C2'] = '=SUM(Data!C2:C' + str(last_row) + ')'
# Average Price formula
ws_summary['B4'] = 'Average Price'
ws_summary['C4'] = '=SUM(Data!C2:C' + str(last_row) + ')/SUM(Data!D2:D' + str(last_row) + ')'
# YoY Growth formula (references assumptions)
ws_summary['B6'] = 'YoY Growth'
ws_summary['C6'] = '=Assumptions!B3'
ws_summary['C6'].number_format = '0.0%'
# Forecast formula
ws_summary['B8'] = 'Forecast Revenue'
ws_summary['C8'] = '=C2*(1+Assumptions!B3)'
# Currency format
ws_data['C2:C' + str(last_row)].number_format = '$#,##0'
# Percentage format
ws_summary['C6'].number_format = '0.0%'
# Number with decimals
ws_data['E2:E' + str(last_row)].number_format = '$#,##0.00'
# Accounting format (negatives in parentheses)
ws_summary['C8'].number_format = '$#,##0;($#,##0);"-"'
from openpyxl.formatting.rule import ColorScaleRule, CellIsRule, FormulaRule
from openpyxl.styles import PatternFill
# Color scale for revenue
ws_data.conditional_formatting.add(
'C2:C' + str(last_row),
ColorScaleRule(
start_type='min', start_color='F8696B', # Red
mid_type='percentile', mid_value=50, mid_color='FFEB84', # Yellow
end_type='max', end_color='63BE7B' # Green
)
)
# Highlight negative values in red
ws_data.conditional_formatting.add(
'C2:C' + str(last_row),
CellIsRule(operator='lessThan', formula=['0'], fill=PatternFill('solid', fgColor='FFC7CE'))
)
from openpyxl.chart import BarChart, LineChart, Reference
# Create bar chart for top categories
chart = BarChart()
chart.type = "col"
chart.style = 10
chart.title = "Revenue by Category"
chart.y_axis.title = "Revenue ($)"
chart.x_axis.title = "Category"
# Data reference
data = Reference(ws_data, min_col=3, min_row=1, max_row=10, max_col=3)
cats = Reference(ws_data, min_col=2, min_row=2, max_row=10)
chart.add_data(data, titles_from_data=True)
chart.set_categories(cats)
chart.height = 10
chart.width = 20
ws_summary.add_chart(chart, "E2")
Output: Complete Excel workbook with formulas and formatting
Goal: Verify zero errors and deliver professional output.
Actions:
python3 skills/xlsx-engineer/scripts/recalc.py output.xlsx
Expected output:
{
"status": "success",
"total_errors": 0,
"total_formulas": 42,
"error_summary": {}
}
If errors found:
{
"status": "errors_found",
"total_errors": 3,
"error_summary": {
"#REF!": ["Sheet1!B10", "Sheet1!C5"],
"#DIV/0!": ["Sheet2!A1"]
}
}
# Common fixes:
# #REF! - Invalid reference
# Before: =VLOOKUP(A2, SheetX!A:D, 4, FALSE) # SheetX deleted
# After: =VLOOKUP(A2, Data!A:D, 4, FALSE) # Use existing sheet
# #DIV/0! - Division by zero
# Before: =A2/B2
# After: =IF(B2<>0, A2/B2, 0)
# #NAME? - Function typo
# Before: =SUMEIF(A:A, "Sales", B:B)
# After: =SUMIF(A:A, "Sales", B:B)
# #N/A - Lookup not found
# Before: =VLOOKUP(A2, Data!A:D, 3, FALSE)
# After: =IFERROR(VLOOKUP(A2, Data!A:D, 3, FALSE), "Not Found")
## Quality Checklist
- [ ] Zero formula errors (run recalc.py)
- [ ] All formulas use cell references (no magic numbers)
- [ ] Input cells highlighted blue with yellow background
- [ ] Number formats applied (currency, percentage, etc.)
- [ ] Column widths appropriate (no truncation)
- [ ] Sheet tabs named clearly
- [ ] Headers bold and styled
- [ ] Charts labeled with titles and axes
- [ ] Professional font (Arial/Calibri)
- [ ] Template conventions matched (if editing existing)
Output: Final verified Excel file
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
from openpyxl.utils import get_column_letter
def create_simple_dcf_model(revenue, growth_rate, discount_rate, years=5):
"""Create a simple DCF financial model."""
wb = Workbook()
# Assumptions Sheet
ws = wb.active
ws.title = "Assumptions"
ws['A1'] = "DCF Model Assumptions"
ws['A1'].font = Font(bold=True, size=14)
assumptions_data = [
("Base Revenue ($mm)", revenue, "Starting annual revenue"),
("Growth Rate", growth_rate, "Annual growth rate"),
("Discount Rate", discount_rate, "WACC"),
("Terminal Growth Rate", 0.02, "Perpetuity growth rate"),
("Tax Rate", 0.25, "Corporate tax rate"),
("CapEx (% of Revenue)", 0.05, "Capital expenditure"),
]
for i, (name, value, desc) in enumerate(assumptions_data, start=3):
ws[f'A{i}'] = name
ws[f'B{i}'] = value
ws[f'B{i}'].font = Font(color="0000FF")
ws[f'B{i}'].fill = PatternFill("solid", fgColor="FFFF00")
ws[f'C{i}'] = desc
# Model Sheet
ws_model = wb.create_sheet("DCF Model")
# Headers
headers = ["Year", "Revenue", "Growth", "EBITDA", "Margin", "NOPAT", "FCF", "Discount Factor", "PV"]
for col, header in enumerate(headers, start=1):
cell = ws_model.cell(row=1, column=col, value=header)
cell.font = Font(bold=True)
cell.fill = PatternFill("solid", fgColor="4472C4")
cell.font = Font(bold=True, color="FFFFFF")
# Data rows with formulas
for year in range(1, years + 1):
row = year + 1
# Year number
ws_model[f'A{row}'] = f'=A{row-1}+1' if year > 1 else 1
# Revenue (with growth)
ws_model[f'B{row}'] = f'=B{row-1}*(1+$B$4)' if year > 1 else '=$B$3'
# Growth rate
ws_model[f'C{row}'] = f'=IF(B{row-1}>0,(B{row}-B{row-1})/B{row-1},0)'
ws_model[f'C{row}'].number_format = '0.0%'
# EBITDA (20% margin assumption)
ws_model[f'D{row}'] = f'=B{row}*0.2'
ws_model[f'D{row}'].number_format = '$#,##0'
# EBITDA Margin
ws_model[f'E{row}'] = f'=IF(B{row}>0,D{row}/B{row},0)'
ws_model[f'E{row}'].number_format = '0.0%'
# NOPAT
ws_model[f'F{row}'] = f'=D{row}*(1-$B$6)'
# Free Cash Flow (NOPAT - CapEx)
ws_model[f'G{row}'] = f'=F{row}-(B{row}*$B$7)'
# Discount Factor
ws_model[f'H{row}'] = f'=1/(1+$B$5)^A{row}'
# Present Value
ws_model[f'I{row}'] = f'=G{row}*H{row}'
# Summary
summary_row = years + 3
ws_model[f'A{summary_row}'] = "Enterprise Value"
ws_model[f'B{summary_row}'] = f'=SUM(I2:I{years+1})'
ws_model[f'A{summary_row+1}'] = "Terminal Value"
ws_model[f'B{summary_row+1}'] = f'=B{years+2}*$B$7*(1+$B$8)/(($B$5-$B$8))'
ws_model[f'A{summary_row+2}'] = "PV of Terminal Value"
ws_model[f'B{summary_row+2}'] = f'=B{summary_row+1}*H{years+1}'
ws_model[f'A{summary_row+3}'] = "Total Enterprise Value"
ws_model[f'B{summary_row+3}'] = f'=B{summary_row}+B{summary_row+2}'
ws_model[f'B{summary_row+3}'].font = Font(bold=True)
# Column widths
for col in range(1, 10):
ws_model.column_dimensions[get_column_letter(col)].width = 15
return wb
import pandas as pd
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill
def clean_and_export(input_file, output_file):
"""Clean messy data and export to formatted Excel."""
# Read source data
df = pd.read_excel(input_file)
# Data cleaning
df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_')
df = df.dropna(how='all')
df = df.fillna(0)
# Create workbook
wb = Workbook()
ws = wb.active
ws.title = "Cleaned Data"
# Write headers
for col, header in enumerate(df.columns, start=1):
cell = ws.cell(row=1, column=col, value=header)
cell.font = Font(bold=True)
cell.fill = PatternFill("solid", fgColor="D9E1F2")
# Write data
for r_idx, row in enumerate(df.itertuples(index=False), start=2):
for c_idx, value in enumerate(row, start=1):
ws.cell(row=r_idx, column=c_idx, value=value)
# Auto-fit columns
for column in ws.columns:
max_length = 0
column_letter = get_column_letter(column[0].column)
for cell in column:
try:
if len(str(cell.value)) > max_length:
max_length = len(str(cell.value))
except:
pass
adjusted_width = min(max_length + 2, 50)
ws.column_dimensions[column_letter].width = adjusted_width
wb.save(output_file)
print(f"Exported to {output_file}")
| Mistake | Why It Fails | Correct Approach |
|---|---|---|
| Hardcoded values | Breaks when data changes | Always use Excel formulas |
data_only=True on save | Permanently destroys formulas | Use load_workbook() without it |
| Skipping recalc.py | Errors go unnoticed | Always verify zero errors |
| Magic numbers | Unclear what values mean | Use assumption cells |
| Inconsistent formatting | Unprofessional | Standard font, sizes, colors |
| No column widths | Data truncated | Set appropriate widths |
| Missing headers | Unclear what data means | Bold, styled headers |
| To | Provide |
|---|---|
| Stakeholder | Final Excel file with instructions |
| QA Engineer | File for validation testing |
| DevOps | Integration script if automated |
| Documentation | Formula reference sheet |
.forgewright/xlsx-engineer/
├── [output-file].xlsx
├── data-cleaning/
│ ├── input/
│ └── cleaned/
├── templates/
│ ├── financial-model-template.xlsx
│ └── report-template.xlsx
└── scripts/
├── recalc.py
└── format-helpers.py
recalc.py run with 0 errorsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
excel, spreadsheet, financial-modeling, openpyxl, pandas, formula-validation
npx claudepluginhub buiphucminhtam/forgewright --plugin forgewright93 skills in this plugin
/3d-spatial-engineerUse for 3D spatial layouts, scene-graph coordinate transforms, greybox blockouts, culling volumes, static batching, and LOD optimization across 3D game engines./accessibility-engineerUse for web WCAG 2.1/2.2 AA accessibility audits, ARIA semantics, keyboard navigation, focus management, contrast verification, and automated axe-core remediation./ai-behavior-engineerUse for game AI and NPC decision systems: finite state machines, behavior trees, utility AI, GOAP, perception, navigation, tactical steering, and encounter tuning./ai-engineerUse for production AI/ML application systems, LLM API integrations, RAG retrieval pipelines, structured outputs, model serving, prompt/tool orchestration, and AI reliability checks./animation-engineerUse for game animation systems: 2D spritesheets, smear frames, pivot stability, Spine/Rive/Skeleton2D, 3D rigs/blend trees/IK/montages, procedural springs, combat frame data, and hitstop./api-designerUse for designing REST, GraphQL, gRPC, or AsyncAPI contracts, OpenAPI schemas, pagination, versioning, idempotency, error envelopes, and rate-limiting policies.Other plugins' skills for the same job