Calculate monthly COGS, cost percentages, and manager bonuses (COGS + Top Line) using NET SALES for accuracy and detailed inventory data for restaurant locations.
This Skill automates monthly P&L cost analysis and bonus calculations for restaurant locations using NET SALES for accuracy and actual COGS data (Beginning Inventory + Purchases - Ending Inventory formula). It calculates cost percentages by bonus category, determines COGS bonuses using tiered structures, evaluates Top Line sales bonuses with eligibility rules, and provides actionable insights.
Now uses NET SALES instead of GROSS SALES for precise bonus calculations:
When to use this Skill:
NET SALES (Gross Sales Report):
GROSS SALES (Food Usage Report):
Uses TWO PDFs to combine the best data from each - COGS from Usage + NET Sales from Breakdown!
Required Files:
Example:
foodUsageReport (15).pdf → Inventory costs + COGS detailsCantina_Gross_Sales_09_10_25.pdf → NET sales dataWhy Both Are Essential:
Key Benefits:
PDF Workflow (New):
python3 pnl_analyzer_pdf.py foodUsageReport.pdf grossSales.pdf 4656
PDF Detection:
.pdf formatSingle Food Usage Report PDF - Uses GROSS SALES (includes discounts)
Example: foodUsageReport__10_.pdf (October 2025)
When user uploads only foodUsageReport.pdf:
PDF Workflow (Legacy):
python3 pnl_analyzer_pdf.py /path/to/foodUsageReport.pdf 4656
⚠ Warning: This uses gross sales which can overstate revenue by $40,000+ for liquor
Two input methods available:
Usage Report + P&L Report:
Contains inventory data with columns:
Contains both sales AND COGS data - Can be processed standalone!
Sales Data (INCOME section):
COGS Data (COST OF GOODS SOLD section):
File Format:
" ","Actual (Location)","% of Sales (Location)","Budget","Variance"
"Beer","$43,561.13","8.9%","",""
"Food","$104,829.63","21.4%","",""
"Beer","$5,991.14","13.8%","",""
Advantage: Single file contains both sales AND COGS - no separate usage report needed!
Just the P&L Report containing both sales and COGS:
When to use:
controllableProfitAndLoss[Location].csvProcessing: Direct analysis without separate usage calculations
Note: If OAK/WB layouts differ, update PNLCOORDS in pnl-engine.py
User says:
"Run P&L for Cantina, October 2025. E11even reimbursement was $4,656."
Then uploads 2 files:
foodUsageReport (15).pdfCantina_Gross_Sales_09_10_25.pdfClaude:
python3 pnl_analyzer_pdf.py foodUsage.pdf grossSales.pdf 4656User says:
"Run P&L for Cantina, October 2025. E11even reimbursement was $4,656."
Then uploads 1 file:
foodUsageReport (15).pdfClaude:
python3 pnl_analyzer_pdf.py foodUsage.pdf 4656User says:
"Run all 3 locations, September 2025. Cantina reimb $4,656, others none."
Uploads 6 files:
foodUsageReport_Cantina.pdf, foodUsageReport_OAK.pdf, etc.)Cantina_Gross_Sales.pdf, OAK_Gross_Sales.pdf, etc.)Claude processes each location with accurate NET SALES and provides comparison summary
User says:
"Run all 3 locations, September 2025. Cantina reimb $4,656, others none."
Uploads 3 files (3 usage reports only)
Claude processes each location with GROSS SALES (warns about accuracy) and provides comparison summary
User says:
"Compare Cantina: September vs October"
Uploads 4 files:
foodUsageReport_Sep.pdf + Cantina_Gross_Sales_Sep.pdffoodUsageReport_Oct.pdf + Cantina_Gross_Sales_Oct.pdfClaude shows trend analysis using accurate NET SALES data
User says:
"Compare Cantina: September vs October"
Uploads 2 files:
foodUsageReport_Sep.pdffoodUsageReport_Oct.pdfClaude shows trend analysis using GROSS SALES (with accuracy warnings)
Formula: Beginning Inventory + Purchases - Ending Inventory = Usage COGS Percentage: Usage ÷ Category Sales = COGS %
Example:
Food bucket:
Liquor/NA Bev bucket:
Beer/Wine bucket:
See resources/bonus_reference.md for complete tier structure.
Cantina:
OAK:
White Buffalo:
Reimbursements apply only to Liquor/NA Bev COGS, never to Food or Beer/Wine.
When a reimbursement is provided, the report shows three lines:
Common reimbursements:
If no reimbursement mentioned, default to $0.
Structure responses like this:
📊 [LOCATION] P&L ANALYSIS — [MONTH YEAR]
━━━ SALES PERFORMANCE ━━━
Total Sales: $XXX,XXX
├─ Food: $XX,XXX
├─ Liquor: $XX,XXX
├─ Beer: $XX,XXX
├─ Wine: $XX,XXX
└─ N/A Bev: $XX,XXX
━━━ COST PERFORMANCE ━━━
Food COGS: XX.X% (Target: XX%)
├─ Usage: $XX,XXX ÷ Sales: $XX,XXX
├─ Variance: ±X.X%
├─ $ Impact: $X,XXX
└─ Bonus: $X,XXX ✓/✗
Liquor COGS: XX.X% (Target: XX%)
├─ Raw Usage: $XX,XXX
├─ Reimbursement: -$X,XXX [if applicable]
├─ Adjusted Usage: $XX,XXX
├─ COGS %: $XX,XXX ÷ $XX,XXX = XX.X%
├─ Variance: ±X.X%
├─ $ Impact: $X,XXX
└─ Bonus: $X,XXX ✓/✗
Beer COGS: XX.X% (Target: XX%)
├─ Usage: $XX,XXX ÷ Sales: $XX,XXX
├─ Variance: ±X.X%
├─ $ Impact: $X,XXX
└─ Bonus: $X,XXX ✓/✗
Wine COGS: XX.X% (Target: XX%)
├─ Usage: $XX,XXX ÷ Sales: $XX,XXX
├─ Variance: ±X.X%
├─ $ Impact: $X,XXX
└─ Bonus: $X,XXX ✓/✗
N/A Bev COGS: XX.X%
├─ Usage: $XX,XXX ÷ Sales: $XX,XXX
└─ Note: High % typical (ice/mixers)
━━━ BONUS CATEGORY TOTALS ━━━
Liquor/NA Bev Combined: XX.X% (Target: XX%)
├─ Combined Sales: $XXX,XXX (Liquor + NA Bev)
├─ Combined Usage: $XX,XXX (adjusted for reimbursements)
├─ Variance: ±X.X%
├─ $ Impact: $X,XXX
└─ Bonus: $X,XXX ✓/✗
━━━ BONUS SUMMARY ━━━
COGS Bonuses: $XX,XXX
Top Line Bonus: $X,XXX (XX% tier)
├─ Eligibility: [Qualified/Not Qualified]
└─ Reason: [X of 3 COGS targets met]
TOTAL BONUS: $XX,XXX
━━━ KEY INSIGHTS ━━━
[3-5 bullet points]
If Qualified:
If Not Qualified (2+ COGS missed):
When showing bonuses, explain the tier achieved in plain English.
Example for Cantina Liquor/NA at 12.1%: ✅ "Hit the $1,800 tier (12.5-13.49%). Just 0.6% away from the $8,400 tier—that's about $2,000 in savings needed."
Example for OAK Food at 31%: ✅ "Missed all bonus tiers—need to get under 30.5% (target: 30%). Cost $1,700 in bonus potential."
The Skill uses three processing options:
1. pnl_analyzer_pdf.py - PDF processor (RECOMMENDED)
Usage:
python3 pnl_analyzer_pdf.py /path/to/foodUsageReport.pdf 4656
2. pnl-engine.py - CSV calculation engine (LEGACY)
3. pnl-wrapper.py - CSV auto-detection (LEGACY)
Execute like this:
Auto-detection (searches uploads folder):
python3 pnl-wrapper.py --location CANTINA --period 2025-10 --reimb 4656
Two-file method:
python3 pnl-wrapper.py --location CANTINA --period 2025-10 --usage "/path/to/usage.csv" --pnl "/path/to/pnl.csv" --reimb 4656
Single P&L method:
python3 pnl-wrapper.py --location WB --period 2025-11 --pnl "/path/to/controllableProfitAndLoss[White Buffalo].csv" --reimb 0
PDF Workflow creates:
pnl_analysis_complete.json - Machine-readable analysisCSV Workflow creates:
pnl_detail_[LOCATION]_[PERIOD].csv - Full breakdownpnl_summary_[LOCATION]_[PERIOD].txt - Text summaryDashboard generates:
After generating output, offer to:
pl-dashboard-final.html provides:
When to use:
How to deploy:
Output: Interactive charts + downloadable reports
If only 1 file uploaded (CSV mode): First check if it's a complete P&L report:
controllableProfitAndLoss[Location].csv with both INCOME and COGS sections → Process standalonefoodUsageReport.csv → Request P&L file"I can process this in two ways:
Option 1: Upload both files:
- Usage Report (foodUsageReport.csv)
- P&L Report (controllableProfitAndLoss[Location].csv)
Option 2: Just the P&L Report if it contains both sales and COGS data (like your White Buffalo file)"
If no files uploaded:
"Please upload either:
- Single PDF: foodUsageReport.pdf (recommended)
- Complete P&L CSV: controllableProfitAndLoss[Location].csv (with sales + COGS)
- Two CSVs: usage + P&L reports (legacy method)"
If pnl-engine.py fails:
If location unclear:
"Which location is this for? (Cantina / OAK / White Buffalo)"
If user uploads 6 files at once (3 usage + 3 P&L):
User:
"Run full COGS report for Cantina, 2-month period Sep 1 through Oct 31. E11even reimbursement = $14,832." [Uploads foodUsageReport.pdf]
Claude: [Detects PDF, calculates 2-month COGS with proper category breakdown]
📊 CANTINA P&L ANALYSIS — SEP-OCT 2025 (2 MONTHS)
━━━ SALES PERFORMANCE ━━━ Total Sales: $1,294,583.99 ├─ Food: $136,177.17 ├─ Liquor: $932,449.82 ├─ Beer: $211,900.00 ├─ Wine: $5,112.00 └─ N/A Bev: $8,945.00
━━━ COST PERFORMANCE ━━━
Food COGS: 34.4% (Target: 29%) ⚠️ ├─ Usage: $46,844.37 ÷ Sales: $136,177.17 ├─ Variance: +5.4% ├─ $ Impact: $7,353 over target └─ Bonus: $0 (missed all tiers)
Liquor COGS: 11.4% (Target: 13%) ✅ ├─ Raw Usage: $121,461.88 ├─ E11even Reimbursement: -$14,832.00 ├─ Adjusted Usage: $106,629.88 ├─ COGS %: $106,629.88 ÷ $932,449.82 = 11.4% ├─ Variance: -1.6% ├─ $ Impact: $14,919 under target └─ Bonus: $X,XXX (hit tier)
Beer COGS: 19.9% (Target: 25%) ✅ ├─ Usage: $42,078.63 ÷ Sales: $211,900.00 ├─ Variance: -5.1% ├─ $ Impact: $10,807 under target └─ Bonus: $X,XXX (hit tier)
Wine COGS: 26.2% (Target: 25%) ⚠️ ├─ Usage: $1,339.96 ÷ Sales: $5,112.00 ├─ Variance: +1.2% ├─ $ Impact: $61 over target
N/A Bev COGS: 79.5% ├─ Usage: $7,112.59 ÷ Sales: $8,945.00 └─ Note: High % typical (ice/mixers)
━━━ BONUS CATEGORY TOTALS ━━━
Liquor/NA Bev Combined: 11.3% (Target: 13%) ✅ ├─ Combined Sales: $941,394.82 (Liquor + NA Bev) ├─ Combined Usage: $106,629.88 (after $14,832 reimbursement) ├─ Variance: -1.7% ├─ $ Impact: $16,004 under target └─ Bonus: $X,XXX (hit tier)
Beer/Wine Combined: 20.2% (Target: 25%) ✅ ├─ Combined Sales: $217,012.00 (Beer + Wine) ├─ Combined Usage: $43,418.59 ├─ Variance: -4.8% ├─ $ Impact: $10,417 under target └─ Bonus: $X,XXX (hit tier)
━━━ TOTALS ━━━ Total Adjusted COGS: $204,005.43 (15.8%) Monthly Average: $102,002.72 (15.8%)
Potential if all targets hit: $14,070 Opportunity cost: $10,560
Key Insights:
November Action Plan:
User:
"Compare all 3 locations for September." [Uploads 6 files]
Claude: [Processes all 3]
SEPTEMBER 2025 — ALL LOCATIONS
Best Performer: Cantina ├─ Total Bonus: $14,200 ├─ All categories under target └─ Top Line: Qualified ($3,500)
Needs Attention: OAK ├─ Total Bonus: $2,000 ├─ Food 1.2% over (missed $1,700 tier) └─ Top Line: Not qualified (2 misses)
White Buffalo: ├─ Total Bonus: $8,800 ├─ Liquor/NA strong (9.8% vs 11.5%) └─ Beer/Wine at target
Action Items:
When asked "What can this skill do?" provide these 10 example prompts:
"Run full COGS analysis for [Location], [Month/Period]. E11even reimbursement = $X,XXX."
"Compare all 3 locations for [Month]. Show me who's winning and who needs help."
"What if Cantina's food cost was 28% instead of 34%? Show me the bonus impact."
"Analyze the last 3 months for OAK. What's the trend?"
"Calculate bonuses if we hit all targets vs. current performance for White Buffalo."
"Show me which category is costing us the most money across all locations."
"Break down the $14,832 E11even reimbursement impact on Cantina's liquor bonus tiers."
"What specific changes does each location need to unlock their next bonus tier?"
"Compare Cantina's September vs October and predict November performance."
"Show me a complete executive summary I can present to ownership about all locations."
Usage: Simply say any of these prompts after uploading your foodUsageReport PDF(s) or CSV files.
After using this Skill, users should:
See resources/bonus_reference.md for complete bonus tier structure, targets, and Top Line thresholds for all locations.
When user uploads files, auto-detect and execute:
Dual PDF Mode (Preferred) - If user uploads BOTH:
*foodUsageReport*.pdf AND *Gross*Sales*.pdfpython3 pnl_analyzer_pdf.py foodUsage.pdf grossSales.pdf [reimbursement]Single PDF Mode (Legacy) - If user uploads ONLY:
*foodUsageReport*.pdfpython3 pnl_analyzer_pdf.py foodUsage.pdf [reimbursement]CSV Mode (Legacy) - If user uploads:
*foodUsageReport*.csv AND *controllableProfitAndLoss*.csvpython3 pnl_wrapper.py --location [LOC] --period [YYYY-MM] --reimb [AMT]*foodUsageReport*.pdf, *Food*Usage*.pdf*Gross*Sales*.pdf, *Sales*Breakdown*.pdf*foodUsageReport*.csv, *usage*.csv*controllableProfitAndLoss*.csv, *P&L*.csv