feat(optional-skills): port Anthropic financial-services skills as optional finance bundle (#21180)

Adds 7 optional skills under optional-skills/finance/ adapted from
anthropics/financial-services (Apache-2.0):

  excel-author        — openpyxl conventions: blue/black/green cells,
                        formulas over hardcodes, named ranges, balance
                        checks, sensitivity tables. Ships recalc.py.
  pptx-author         — python-pptx for model-backed decks (pitch,
                        IC memo, earnings note) that bind every number
                        to a source workbook cell.
  dcf-model           — institutional DCF (49KB skill): projections,
                        WACC, terminal value, Bear/Base/Bull scenarios,
                        5x5 sensitivity tables. Ships validate_dcf.py.
  comps-analysis      — comparable company analysis: operating metrics,
                        multiples, statistical benchmarking.
  lbo-model           — leveraged buyout: S&U, debt schedule, cash
                        sweep, exit multiple, IRR/MOIC sensitivity.
  3-statement-model   — fully-integrated IS/BS/CF with balance-check
                        plugs. Ships references/ for formatting,
                        formulas, SEC filings.
  merger-model        — accretion/dilution analysis for M&A.

All seven are optional (not active by default). Users install via
'hermes skills install official/finance/<skill>'.

Hermesification:
- Stripped every Office JS / Office Add-in / mcp__office__*
  branch — skills assume headless openpyxl only.
- Replaced Cowork MCP data-source instructions with 'MCP first (via
  native-mcp), fall back to web_search/web_extract against SEC EDGAR
  and user-provided data'.
- Swapped Claude tool references (Bash, Read, Write, Edit, mcp__*)
  for Hermes-native equivalents and Python library calls.
- Canonical Hermes frontmatter (name/description/version/author/
  license/metadata.hermes.{tags,related_skills}).
- Descriptions tightened to 187-238 chars, trigger-first.
- Attribution preserved: author field credits 'Anthropic (adapted by
  Nous Research)', license: Apache-2.0, each SKILL.md links back to
  the upstream source directory.

Verification:
- All 7 discovered by OptionalSkillSource with source_id='official'
- Bundle fetch includes support files (scripts, references, troubleshooting)
- related_skills cross-refs all resolve within the bundle
- No Claude product / Cowork / Office JS / /mnt/skills leakage
  remains in body text (bounded mentions only in attribution blocks)

Source: https://github.com/anthropics/financial-services (Apache-2.0)
This commit is contained in:
Teknium 2026-05-07 04:58:39 -07:00 committed by GitHub
parent 11b9b146f1
commit fce58cbe2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 4172 additions and 0 deletions

View file

@ -0,0 +1,118 @@
# Formatting Standards Reference
| Element | Format |
|---------|--------|
| Hard-coded inputs | Blue font |
| Formulas | Black font |
| Links to other sheets | Green font |
| Check cells | Red if error, green if balanced |
| Negative values | Parentheses, not minus signs |
| Currency | No decimals for large figures, 2 decimals for per-share |
| Percentages | 1 decimal place |
| Headers | Bold, bottom border |
| Units row | Include units row below headers ($ millions, %, etc.) |
## Visual Separation Guidelines
- Thin vertical border between historical and projected columns
- Thick bottom border after section totals (e.g., Total Assets)
- Single bottom border for subtotals
- Double bottom border for grand totals
## Total and Subtotal Row Formatting
All total and subtotal rows must use **bold font formatting** for their numerical values to clearly distinguish aggregated figures from individual line items.
### Income Statement (P&L) Tab
| Row | Formatting |
|-----|------------|
| Gross Revenue | Bold |
| Total Cost of Revenue | Bold |
| Gross Profit | Bold |
| Total SG&A | Bold |
| EBITDA | Bold |
| EBIT | Bold |
| EBT | Bold |
| Net Profit After Tax | Bold |
### Balance Sheet Tab
| Row | Formatting |
|-----|------------|
| Total Current Assets | Bold |
| Total Non-Current Assets | Bold |
| Total Other Assets | Bold |
| Total Assets | Bold |
| Total Current Liabilities | Bold |
| Total Non-Current Liabilities | Bold |
| Total Equity | Bold |
| Total Liabilities and Equity | Bold |
### Cash Flow Statement Tab
| Row | Formatting |
|-----|------------|
| Cash Generated from Operations Before Working Capital Changes | Bold |
| Total Working Capital Changes | Bold |
| Net Cash Generated from Operations | Bold |
| Net Cash Flow from Investing Activities | Bold |
| Net Cash Flow from Financing Activities | Bold |
| Closing Cash Balance | Bold |
**Note:** This list is non-exhaustive. Apply bold formatting to any row that represents a total, subtotal, or summary calculation across the model.
## Balance Sheet Check Row Formatting
The Balance Sheet check row (below Total Liabilities and Equity) uses conditional number formatting that displays non-zero values in red. When the balance sheet balances correctly (check = 0), the values display in black or standard formatting.
| Check Value | Font Color |
|-------------|------------|
| = 0 (balanced) | Black (standard) |
| ≠ 0 (error) | Red |
**Implementation:** Apply custom number format `[Red][<>0]0.00;[Red][<>0](0.00);0.00` or use Excel conditional formatting with the rule "Cell Value ≠ 0" → Red font.
## Margin Row Formatting
| Element | Format |
|---------|--------|
| Margin % rows | Indent, italics, 1 decimal place |
| Positive trend | No special formatting (or subtle green) |
| Negative trend | Flag for review (subtle yellow) |
| Below peer average | Consider highlighting for discussion |
## Credit Metric Formatting
| Element | Format |
|---------|--------|
| Leverage multiples | 1 decimal with "x" suffix (e.g., 2.5x) |
| Percentages | 1 decimal with "%" suffix |
| Net Debt negative | Parentheses, indicates net cash position |
| Section header | Bold, "CREDIT METRICS" |
| Separator line | Thin border above credit metrics section |
## Credit Metric Threshold Colors
| Metric | Green | Yellow | Red |
|--------|-------|--------|-----|
| Total Debt / EBITDA | < 2.5x | 2.5x-4.0x | > 4.0x |
| Net Debt / EBITDA | < 2.0x | 2.0x-3.5x | > 3.5x |
| Interest Coverage | > 4.0x | 2.5x-4.0x | < 2.5x |
| Debt / Total Cap | < 40% | 40%-60% | > 60% |
| Current Ratio | > 1.5x | 1.0x-1.5x | < 1.0x |
| Quick Ratio | > 1.0x | 0.75x-1.0x | < 0.75x |
## Conditional Formatting for Checks Tab
- Cell contains pass indicator → Green fill
- Cell contains fail indicator → Red fill
- Cell contains warning → Yellow fill
- Difference cells = 0 → Light green fill
- Difference cells ≠ 0 → Light red fill
## Margin Reasonability Flags
- Gross Margin < 0% ERROR: Review COGS
- Gross Margin > 80% → WARNING: Verify revenue/COGS
- EBITDA Margin < 0% FLAG: Operating losses
- EBITDA Margin > 50% → WARNING: Unusually high
- Net Margin < 0% FLAG: Net losses (may be acceptable in growth phase)
- Net Margin > Gross Margin → ERROR: Formula issue

View file

@ -0,0 +1,292 @@
# Formula Reference
**IMPORTANT:** Use the formulas outlined in this reference document unless otherwise specified by the user.
---
## Core Linkages
```
Balance Sheet: Assets = Liabilities + Equity
Net Income: IS Net Income → CF Operations (starting point)
Cash Flow: ΔCash = CFO + CFI + CFF
Cash Tie-Out: Ending Cash (CF) = Cash (BS Asset)
Cash Monthly/Annual: Closing Cash (Monthly) = Closing Cash (Annual)
Retained Earnings: Prior RE + Net Income - Dividends = Ending RE
Equity Raise: ΔCommon Stock/APIC (BS) = Equity Issuance (CFF)
Year 0 Equity: Equity Raised (Year 0) = Beginning Equity (Year 1)
```
## Gross Profit Calculation
**IMPORTANT:** Gross Profit must be calculated from Net Revenue, not Gross Revenue.
```
Net Revenue - Cost of Revenue = Gross Profit
```
| Term | Definition |
|------|------------|
| Gross Revenue | Total revenue before any deductions |
| Net Revenue | Gross Revenue - Returns - Allowances - Discounts |
| Cost of Revenue | Direct costs attributable to production of goods/services sold |
| Gross Profit | Net Revenue - Cost of Revenue |
**Note:** Always use Net Revenue (also called "Net Sales" or simply "Revenue" on most financial statements) as the starting point for profitability calculations. Gross Revenue overstates the true top-line performance.
## Margin Formulas
```
Gross Margin % = Gross Profit / Net Revenue
EBITDA = EBIT + D&A (or = Gross Profit - OpEx)
EBITDA Margin % = EBITDA / Net Revenue
EBIT Margin % = EBIT / Net Revenue
Net Income Margin % = Net Income / Net Revenue
```
## Credit Metric Formulas
```
Total Debt = Current Portion of Debt + Long-Term Debt
Net Debt = Total Debt - Cash
Total Debt / EBITDA = Total Debt / EBITDA (from IS)
Net Debt / EBITDA = Net Debt / EBITDA (from IS)
Interest Coverage = EBITDA / Interest Expense (from IS)
Net Int Exp % Debt = Net Interest Expense / Long-Term Debt
Debt / Total Cap = Total Debt / (Total Debt + Total Equity)
Debt / Equity = Total Debt / Total Equity
Current Ratio = Total Current Assets / Total Current Liabilities
Quick Ratio = (Total Current Assets - Inventory) / Total Current Liabilities
```
## Forecast Formulas (% of Net Revenue Method)
```
Cost of Revenue (Forecast) = Net Revenue × Cost of Revenue % Assumption
S&M (Forecast) = Net Revenue × S&M % Assumption
G&A (Forecast) = Net Revenue × G&A % Assumption
R&D (Forecast) = Net Revenue × R&D % Assumption
SBC (Forecast) = Net Revenue × SBC % Assumption
```
## Working Capital Formulas
```
Accounts Receivable
Prior AR
+ Revenue (from IS)
- Cash Collections (plug)
= Ending AR
DSO = (AR / Revenue) × 365
Inventory
Prior Inventory
+ Purchases (plug)
- COGS (from IS)
= Ending Inventory
DIO = (Inventory / COGS) × 365
Accounts Payable
Prior AP
+ Purchases (from Inventory calc)
- Cash Payments (plug)
= Ending AP
DPO = (AP / COGS) × 365
Net Working Capital = AR + Inventory - AP
ΔWC = Current NWC - Prior NWC
```
## D&A Schedule Formulas
```
Beginning PP&E (Gross)
+ CapEx
= Ending PP&E (Gross)
Beginning Accumulated Depreciation
+ Depreciation Expense
= Ending Accumulated Depreciation
PP&E (Net) = Gross PP&E - Accumulated Depreciation
```
## Debt Schedule Formulas
```
Beginning Debt Balance
+ New Borrowings
- Repayments
= Ending Debt Balance
Interest Expense = Avg Debt Balance × Interest Rate
(Use beginning balance to avoid circularity, or iterate if circular refs enabled)
```
## Retained Earnings Formula
```
Beginning Retained Earnings
+ Net Income (from IS)
+ Stock-Based Compensation (SBC) (from IS)
- Dividends
= Ending Retained Earnings
```
## NOL (Net Operating Loss) Schedule Formulas
```
NOL CARRYFORWARD SCHEDULE
Beginning NOL Balance (Year 1 / Formation = 0)
+ NOL Generated (if EBT < 0, then ABS(EBT), else 0)
- NOL Utilized (limited by taxable income and utilization cap)
= Ending NOL Balance
STARTING BALANCE RULE
For a new business or first modeled period:
Beginning NOL Balance = 0
NOL can only increase through realized losses (EBT < 0)
NOL cannot be created from thin air or assumed
NOL UTILIZATION CALCULATION
Pre-Tax Income (EBT)
If EBT > 0:
NOL Available = Beginning NOL Balance
Utilization Limit = EBT × 80% (post-2017 federal limit)
NOL Utilized = MIN(NOL Available, Utilization Limit)
Taxable Income = EBT - NOL Utilized
If EBT ≤ 0:
NOL Utilized = 0
Taxable Income = 0
NOL Generated = ABS(EBT)
TAX CALCULATION WITH NOL
Taxes Payable = MAX(0, Taxable Income × Tax Rate)
(Taxes cannot be negative; losses create NOL asset instead)
DEFERRED TAX ASSET (DTA) FOR NOL
DTA - NOL Carryforward = Ending NOL Balance × Tax Rate
ΔDTA = Current DTA - Prior DTA
(Increase in DTA = non-cash benefit on CF)
(Decrease in DTA = non-cash expense on CF)
```
## Balance Sheet Structure
```
ASSETS
Cash (from CF ending cash)
Accounts Receivable (from WC)
Inventory (from WC)
Total Current Assets
PP&E, Net (from DA)
Deferred Tax Asset - NOL (from NOL schedule)
Total Non-Current Assets
Total Assets
LIABILITIES
Accounts Payable (from WC)
Current Portion of Debt (from Debt)
Total Current Liabilities
Long-Term Debt (from Debt)
Total Liabilities
EQUITY
Common Stock
Retained Earnings (from RE schedule)
Total Equity
CHECK: Assets - Liabilities - Equity = 0
```
## Cash Flow Statement Structure
```
CASH FROM OPERATIONS (CFO)
Net Income (LINK: IS)
+ D&A (LINK: DA schedule)
+ Stock-Based Compensation (SBC) (LINK: IS or Assumptions)
- ΔDTA (Deferred Tax Asset) (LINK: NOL schedule; increase in DTA = use of cash)
- ΔAR (LINK: WC)
- ΔInventory (LINK: WC)
+ ΔAP (LINK: WC)
= CFO
CASH FROM INVESTING (CFI)
- CapEx (LINK: DA schedule)
= CFI
CASH FROM FINANCING (CFF)
+ Debt Issuance (LINK: Debt)
- Debt Repayment (LINK: Debt)
+ Equity Issuance (LINK: BS Common Stock/APIC)
- Dividends (LINK: RE schedule)
= CFF
Net Change in Cash = CFO + CFI + CFF
Beginning Cash
+ Net Change in Cash
= Ending Cash (LINK TO: BS Cash)
```
## Income Statement Structure
```
Net Revenue
Growth %
(-) Cost of Revenue
% of Net Revenue
────────────────
Gross Profit (= Net Revenue - Cost of Revenue)
Gross Margin %
(-) S&M
% of Net Revenue
(-) G&A
% of Net Revenue
(-) R&D
% of Net Revenue
(-) D&A
(-) SBC
% of Net Revenue
────────────────
EBIT
EBIT Margin %
EBITDA
EBITDA Margin %
(-) Interest Expense
────────────────
EBT (Pre-Tax Income)
(-) NOL Utilization (from NOL schedule, reduces taxable income)
────────────────
Taxable Income
(-) Taxes (Taxable Income × Tax Rate)
────────────────
Net Income
Net Income Margin %
```
## Check Formulas
```
BS Balance Check: = Assets - Liabilities - Equity (must = 0)
Cash Tie-Out: = BS Cash - CF Ending Cash (must = 0)
RE Roll-Forward: = Prior RE + NI + SBC - Div - BS RE (must = 0)
DTA Tie-Out: = NOL Schedule DTA - BS DTA (must = 0)
Equity Raise Tie-Out: = ΔCommon Stock/APIC (BS) - Equity Issuance (CFF) (must = 0)
Year 0 Equity Tie-Out: = Equity Raised (Year 0) - Beginning Equity (Year 1) (must = 0)
Cash Monthly vs Annual: = Closing Cash (Monthly) - Closing Cash (Annual) (must = 0)
NOL Utilization Cap: = NOL Utilized ≤ EBT × 80% (must be TRUE for post-2017)
NOL Non-Negative: = Ending NOL Balance ≥ 0 (must be TRUE)
NOL Starting Balance: = Beginning NOL (Year 1) = 0 (must be TRUE for new business)
NOL Accumulation: = NOL increases only when EBT < 0 (losses generate NOL)
```

View file

@ -0,0 +1,125 @@
# SEC Filings Data Extraction Reference
**When to Use:** Only reference this file when a model template specifically requires pulling data from SEC filings (10-K, 10-Q). For templates that provide data directly or use other data sources, this reference is not needed.
---
## Extracting Data from SEC Filings (10-K / 10-Q)
When populating a model template with public company data, extract financials directly from SEC filings.
### Step 1: Locate the Filing
1. Use SEC EDGAR: `https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=[TICKER]&type=10-K`
2. For quarterly data, use `type=10-Q`
### Step 2: Identify Filing Currency
Before extracting data, identify the reporting currency:
- Check the cover page or header for reporting currency
- Look at statement headers (e.g., "in thousands of U.S. dollars")
- Review Note 1 (Summary of Significant Accounting Policies)
**Common Currency Indicators**
| Indicator | Currency |
|-----------|----------|
| $, USD | US Dollar |
| €, EUR | Euro |
| £, GBP | British Pound |
| ¥, JPY | Japanese Yen |
| ¥, CNY, RMB | Chinese Yuan |
| CHF | Swiss Franc |
| CAD, C$ | Canadian Dollar |
Set model currency to match filing; document in Assumptions tab.
### Step 3: Navigate to Financial Statements
Within the 10-K or 10-Q, locate:
- **Item 8** (10-K) or **Item 1** (10-Q): Financial Statements
- Key sections to extract:
- Consolidated Statements of Operations (Income Statement)
- Consolidated Balance Sheets
- Consolidated Statements of Cash Flows
- Notes to Financial Statements (for schedule details)
### Step 4: Data Extraction Mapping
**Income Statement (from Consolidated Statements of Operations)**
| Filing Line Item | Model Line Item |
|------------------|-----------------|
| Net revenues / Net sales | Revenue |
| Cost of goods sold | COGS |
| Selling, general and administrative | SG&A |
| Depreciation and amortization | D&A |
| Interest expense, net | Interest Expense |
| Income tax expense | Taxes |
| Net income | Net Income |
**Balance Sheet (from Consolidated Balance Sheets)**
| Filing Line Item | Model Line Item |
|------------------|-----------------|
| Cash and cash equivalents | Cash |
| Accounts receivable, net | AR |
| Inventories | Inventory |
| Property, plant and equipment, net | PP&E (Net) |
| Total assets | Total Assets |
| Accounts payable | AP |
| Short-term debt / Current portion of LT debt | Current Debt |
| Long-term debt | LT Debt |
| Retained earnings | Retained Earnings |
| Total stockholders' equity | Total Equity |
**Cash Flow Statement (from Consolidated Statements of Cash Flows)**
| Filing Line Item | Model Line Item |
|------------------|-----------------|
| Net income | Net Income |
| Depreciation and amortization | D&A |
| Changes in accounts receivable | ΔAR |
| Changes in inventories | ΔInventory |
| Changes in accounts payable | ΔAP |
| Capital expenditures | CapEx |
| Proceeds from issuance of common stock | Equity Issuance |
| Proceeds from / Repayments of debt | Debt activity |
| Dividends paid | Dividends |
### Step 5: Extract Supporting Detail from Notes
For schedules, pull from Notes to Financial Statements:
- **Note: Debt** → Maturity schedule, interest rates, covenants
- **Note: Property, Plant & Equipment** → Gross PP&E, accumulated depreciation, useful lives
- **Note: Revenue** → Segment breakdowns, geographic splits
- **Note: Leases** → Operating vs. finance lease obligations
### Step 6: Historical Data Requirements
Extract 3 years of historical data minimum:
- 10-K provides 3 years of IS/CF, 2 years of BS
- For 3rd year BS, pull from prior year's 10-K
- Use 10-Qs to fill in quarterly granularity if needed
### Data Extraction Checklist
- Identify reporting currency and scale (thousands, millions)
- 3 years historical Income Statement
- 3 years historical Cash Flow Statement
- 3 years historical Balance Sheet
- Verify IS Net Income = CF starting Net Income (each year)
- Verify BS Cash = CF Ending Cash (each year)
- Extract debt maturity schedule from notes
- Extract D&A detail or useful life assumptions
- Note any non-recurring / one-time items to normalize
### Handling Common Filing Variations
| Variation | How to Handle |
|-----------|---------------|
| D&A embedded in COGS/SG&A | Pull D&A from Cash Flow Statement |
| "Other" line items are material | Check notes for breakdown |
| Restatements | Use restated figures, note in assumptions |
| Fiscal year ≠ calendar year | Label with fiscal year end (e.g., FYE Jan 2025) |
| Non-USD reporting currency | Adapt model currency to match filing |