Claude skills · v1.1
Sector Lens: a Claude skill that reads and compares stocks the way a sector specialist would
Five sector sheets (banks, tech, semiconductors, energy, healthcare) with the metrics that matter, where comparisons between companies break, red flags and what analysts ask. Check up on one company, compare up to five, preview an earnings report, or draw a comparison chart you can post.
Get the skill
Free with the newsletter.
Enter your email and the ZIP downloads straight away. Two short issues a week on AI tools for traders and finance. Already a subscriber? Use the same address.
Who it's for
- Analysts and researchers comparing companies inside a sector
- Traders who want to know which metrics matter before earnings
- Anyone who has been misled by a generic side-by-side table
What it produces
- Company check-up: market snapshot (price, market cap, trailing and forward P/E with the earnings basis), key metrics with sources, a red-flag check and what analysts are likely to ask
- Peer comparison of two to five companies: market snapshot, side-by-side sector metrics with a Comparable? column, and a "Where this comparison is misleading" section
- Earnings preview: the five or six metrics and questions to watch, without predicting results
- Comparison chart as a PNG for a post or slide, drawn only from metrics that are actually comparable
- Plain-English explanation of any sector metric, with the comparison traps
Ground rules built in
- Your documents first, web search second, never numbers from memory. Every figure has a source; market data has a date and time.
- Company labels stay next to the number: GAAP, adjusted, managed basis, organic. Nothing is blended.
- No buy, sell or hold calls, no price targets, no "better" or "cheaper" verdicts.
Try saying
- “Compare JPMorgan, Bank of America and Wells Fargo for last quarter. Here are their earnings releases.”
- “Give me a check-up on Micron using this 10-Q.”
- “Nvidia reports next week. What should I watch?”
- “Make a chart of that comparison I can post.”
Install
Watch it done in under two minutes, or follow the steps.
Claude app
- Turn on code execution: Settings → Capabilities → “Code execution and file creation”. On Team and Enterprise plans an admin controls this.
- Go to Customize → Skills, click “+”, then “Create skill” → “Upload a skill”.
- Upload the ZIP and make sure the skill is switched on. The desktop app uses the same skills.
Claude Code
- Unzip and copy the
sector-lensfolder to~/.claude/skills/, so the file sits at~/.claude/skills/sector-lens/SKILL.md. - It is then available in every project on that computer. Skills installed this way don't carry over to the Claude app; upload the ZIP there too if you use both.
What's inside
Plain-text instructions plus one short script, shown in full below. Nothing connects to outside services. Read every file here before you install it.
SKILL.mdThe instructions Claude follows: pick the sector sheet, data rules, the five task templates, the pre-delivery check.
--- name: sector-lens description: Read and compare public companies the way a specialist in their industry would, using a sector sheet for banks, tech (software, cloud and internet), semiconductors, energy, or healthcare. Each sheet covers the metrics that matter, where comparisons between companies break, red flags, and what analysts ask. Use this whenever someone wants to analyze, check up on, or compare stocks or companies in these sectors, asks which metrics matter for a bank, software, chip, oil and gas, pharma, biotech or health insurer stock, wants a peer comparison or a comparison chart or graph to share, wants to know what to watch in an upcoming earnings report, or asks about a sector metric like NIM, CET1, ARR, net revenue retention, book-to-bill, breakeven oil price or medical loss ratio. Also use it alongside the earnings call skill when the call is from one of these sectors. Made by Hands Off (handsoff.finance). metadata: version: "1.1" publisher: Hands Off (handsoff.finance) --- # Sector Lens Generic stock tools put numbers side by side as if every company measured them the same way. They often don't. One company's "adjusted" margin leaves out stock-based pay and another's doesn't, fiscal years end in different months, and a bank's capital ratio means little without knowing that bank's own requirement. This skill reads companies through the lens of their industry, so the reader knows which numbers matter and which comparisons can't be trusted. Readers use this to make decisions with real money. Accuracy and honesty about gaps matter more than a full-looking table. ## Step 1: Pick the sector sheet Read the sheet for the company's sector before doing anything else. Each sheet lists the sub-industries it covers. | Sector | Sheet | Covers | |---|---|---| | Banks | `references/banks.md` | Large and regional banks, card lenders, investment banks, custody banks | | Tech | `references/tech.md` | Software and SaaS, cloud platforms, internet and advertising platforms | | Semiconductors | `references/semiconductors.md` | Chip designers, manufacturers, foundries, memory, equipment makers | | Energy | `references/energy.md` | Integrated oil majors, producers (E&P), midstream pipelines, refiners, oilfield services | | Healthcare | `references/healthcare.md` | Pharma, biotech, health insurers (managed care), medical devices, hospitals, life-science tools | - **Company spans more than one sector or sub-industry** (for example, a tech platform that also designs chips): use the sheet for its largest business, and say which parts of the company the lens doesn't fit well. - **Peers from different sub-industries** (a card lender against a regional bank, a biotech against a health insurer): warn that their core metrics aren't comparable, and compare only what is. - **Sector not covered** (utilities, retail, industrials, insurance and others): say so, use only general measures (growth, margins, cash flow, debt, dilution), and don't invent sector-specific benchmarks. ## Step 2: Follow the data rules 1. **Use the user's documents first.** Filings, earnings releases, supplements and transcripts the user provides are the best source. Cite which document and section each number comes from. 2. **Web search is second.** If no documents are given and web search is available, look up figures from the company's own filings or releases where possible. Give the source and date for every number. 3. **Never fill in numbers from memory.** Your knowledge of company financials is incomplete and may be out of date, and a confident wrong number is the worst outcome for this reader. If you can't find a figure, write "not found" and move on. 4. **Keep the company's labels.** Write GAAP, adjusted, non-GAAP, managed basis, organic, or fully taxable-equivalent next to a number when the company uses it. Don't convert or blend figures. 5. **Label anything you calculate.** Simple calculations from cited figures (a growth rate, a ratio of two reported numbers) are fine, but mark them "calculated" and say what went into them. If the inputs were rounded, say the result is approximate. Don't fill a missing figure with a number from a different kind of source; leave it blank and say why. 6. **Match the periods.** Compare the same calendar periods. Many companies have fiscal years that don't end in December (the sheets list common ones). If the periods don't line up, say so in the comparison notes. 7. **Market data carries a timestamp.** Share price, market cap and P/E change every minute, so each one needs its source and the date (and time, if the source shows it) it was taken. Use the user's documents or web search, never memory. Write P/E as trailing or forward and say which earnings basis it uses (GAAP, adjusted or consensus); the same company can show two very different multiples. When earnings are negative or near zero, write "n/m" (not meaningful) instead of a number. If you can't find a figure, write "not found." 8. **No recommendations.** Don't say which stock to buy, sell or hold, give price targets, or call one "better" or "cheaper" as a verdict. Describe what the numbers show, what would have to go right or wrong, and what to check. If asked for a pick, say this is a research aid, not investment advice, and give the factual read instead. ## Step 3: Do the task ### A. Company check-up (one company) ``` # [Company] ([TICKER]): [sector] check-up Period: [quarter or year] · Sources: [documents or searches used, with dates] ## Market snapshot | Share price | Market cap | P/E (trailing, [basis]) | P/E (forward, [basis]) | As of | |---|---|---|---|---| One row, with the source and time taken. "n/m" when earnings are negative; "not found" when you can't source it. **In three lines** - [What stands out in the key metrics] - [The main strength, in numbers] - [The main thing to watch, in numbers] ## Key metrics | Metric | Latest | Prior period | What it means here | Source | |---|---|---|---|---| ## Red-flag check | Check (from the sector sheet) | Status | Evidence | |---|---|---| Status is one of: Clear, Watch, Flag, Not checked. Use "Not checked" when you don't have the data. Never mark a check Clear without evidence. ## What analysts are likely to ask - [Two to four questions from the sector sheet that fit this company now] ## What this check-up didn't cover - [Missing data, periods, or documents] --- A research aid, not investment advice. Check figures against the company's filings. Made with the Hands Off sector skill · handsoff.finance ``` ### B. Peer comparison (two to five companies) ``` # [Companies]: [sector] comparison Period: [period] · Sources: [list] ## Market snapshot | | [Co. A] | [Co. B] | [Co. C] | |---|---|---|---| | Share price | | | | | Market cap | | | | | P/E (trailing, [basis]) | | | | | P/E (forward, [basis]) | | | | As of [date and time] · Source: [where the quotes came from] Share price is for reference and never comparable across companies. Market cap is comparable. P/E is comparable only when the earnings basis matches; if one company's multiple is on adjusted earnings and another's on GAAP, say so under the table. ## Side by side | Metric | [Co. A] | [Co. B] | [Co. C] | Comparable? | |---|---|---|---|---| "Comparable?" is Yes, Roughly (explain briefly), or No (explain briefly). ## Where this comparison is misleading - [Every mismatch: definitions, fiscal periods, business mix, one-time items, acquisitions, accounting basis. This section is the point of the skill, so be thorough.] ## What would have to be true **[Co. A]:** [Two or three things that must go right for the optimistic case, and the number that would show it going wrong] **[Co. B]:** ... ## What this comparison didn't cover - ... --- A research aid, not investment advice. Check figures against the company's filings. Made with the Hands Off sector skill · handsoff.finance ``` Keep the side-by-side table to the eight to twelve sector metrics that matter most; the market snapshot sits above it and doesn't count toward that. A shorter table people can trust beats a long one they can't. ### C. Earnings preview (what to watch) For a company reporting soon: list the five or six metrics and questions from the sector sheet that matter most for this company right now, the guidance management gave last time if the user provides it or you can find and cite it, and what would count as a change. Don't predict the results. ### D. Comparison chart When the user asks for a chart or graph, or wants something to post or share, read `references/charts.md` and use `scripts/compare_chart.py` to make a PNG. After a peer comparison, offer a chart in one line. Charts only show metrics marked Yes or Roughly comparable, with the same values and footnotes as the table, so build the comparison first. ### E. Explain a metric Explain it in plain English, show how it's calculated, say where to find it in filings, and give the comparison traps from the sheet. Use a real example only if you have a cited figure. ## Step 4: Check before you hand it over - Every number has a source, and the source says what you say it does. If you can run code and have the documents, check figures with a quick text search rather than from memory. - Every "Comparable? Yes" holds up: same definition, same period, same basis. - The market snapshot has an "as of" date and source, and each P/E says trailing or forward and on what earnings basis. - No "Clear" status without evidence. - No sentence that reads as a recommendation. ## Working with the earnings call skill If the earnings call digest skill is also installed and the user is working with a call transcript from one of these sectors, use the sector sheet's "Questions analysts ask" and "Red flags" to decide what to look for in the call, and use the sector's plain-English definitions in the digest.
references/banks.mdLarge and regional banks, card lenders, investment banks, custody banks.
# Banks Sheet version 1.0, October 2026. Peer lists are examples only; check that a company is still independent and listed before using it. ## Contents 1. What this sheet covers 2. How banks make money 3. Key metrics 4. Where comparisons break 5. Red flags 6. Questions analysts ask 7. Example peer groups ## 1. What this sheet covers - **Universal / money-center banks**: lending, deposits, investment banking, trading, wealth management. - **Regional banks**: mostly lending and deposits, more commercial real estate exposure. - **Card and consumer lenders**: credit cards and consumer loans, with much higher normal loss rates. - **Investment banks and brokers**: mostly fees and trading, less traditional lending. - **Custody and trust banks**: fees for holding and servicing assets, plus deposits. Not covered: insurers, asset managers, fintech payment companies, and exchanges. Their metrics are different. ## 2. How banks make money Two main sources. **Net interest income**: earning more on loans and securities than the bank pays on deposits and borrowing. **Noninterest income (fees)**: investment banking, trading, card fees, wealth management, service charges. Then subtract **expenses** and the **provision for credit losses** (money set aside for loans that may not be repaid). Rates, loan growth, deposit costs and credit quality drive most of the story. ## 3. Key metrics | Metric | Plain meaning | Where to find it | Comparison trap | |---|---|---|---| | Net interest income (NII) | Interest earned minus interest paid | Earnings release, supplement | Some banks report NII "excluding Markets" or on a "managed" or fully taxable-equivalent (FTE) basis. Compare the same basis. | | Net interest margin (NIM) | NII as a percentage of average interest-earning assets | Supplement | FTE vs. non-FTE, and how each bank defines earning assets. Card-heavy banks naturally run higher NIMs. | | Noninterest income | Fees: investment banking, trading, cards, wealth, service charges | Release, segment tables | Trading revenue swings a lot quarter to quarter; banks split "markets" revenue differently (fixed income vs. equities). | | Efficiency ratio (or overhead ratio) | Expenses divided by revenue; lower is better | Release, supplement | Some banks adjust for one-time items or use FTE revenue. Fee-heavy banks naturally run higher ratios. | | Provision for credit losses | Money set aside this quarter for expected loan losses: net charge-offs plus reserve build (or minus a release) | Release | A reserve release lifts earnings without any change in the business. Separate charge-offs from reserve moves. | | Net charge-off (NCO) rate | Loans written off, minus recoveries, as an annualized percentage of average loans | Supplement, by loan type | Card loans normally run several percent; commercial loans far lower. Compare by loan type, not just the total. | | Allowance for credit losses (ACL) ratio | Reserves as a percentage of loans | Supplement | Banks report different measures: the allowance for loan (and lease) losses, or the allowance for credit losses, which can also cover unused credit lines. Note which one each bank uses. The level also depends on loan mix and each bank's economic assumptions under CECL accounting. | | Nonperforming loans / criticized loans | Loans not being paid as agreed, or that the bank has internally flagged as weak | Supplement, 10-Q | Definitions of "criticized" vary. Watch the trend more than the level. | | Deposits and deposit mix | Total deposits, and the share that pays no interest | Release, supplement | Period-end vs. average balances. A falling share of noninterest-bearing deposits raises funding costs. | | Deposit cost and deposit beta | Interest paid on deposits; beta is the share of rate changes passed on to depositors | Supplement, call commentary | Betas are often given only on calls, with different time windows. | | Loan-to-deposit ratio | Loans as a percentage of deposits | Calculated from the balance sheet | A high ratio means more reliance on other, often costlier, funding. | | CET1 ratio | Core capital as a percentage of risk-weighted assets | Release, capital disclosures | Each bank has its own minimum (including its stress capital buffer and, for the largest banks, a G-SIB surcharge). Compare the cushion above each bank's own requirement, not the raw ratio. Standardized and advanced approaches give different numbers. | | ROTCE / ROE | Profit relative to shareholders' equity (ROTCE excludes goodwill and intangibles) | Release | Banks with large past acquisitions show bigger gaps between ROE and ROTCE. Some figures are adjusted. | | Tangible book value per share (TBVPS) | Equity minus goodwill and intangibles, per share | Release | Unrealized losses on available-for-sale bonds reduce it; losses on held-to-maturity bonds don't, but are disclosed in the 10-Q. | | Securities portfolio (AFS / HTM) | Bonds the bank holds, split into available-for-sale and held-to-maturity | 10-Q | Large unrealized losses relative to capital matter if the bank needs to sell. | | Commercial real estate (CRE) exposure | Loans backed by offices, retail, apartments and other property | 10-Q, supplement | Office loans are the area of most concern; banks group CRE categories differently. | ## 4. Where comparisons break - **Business mix.** A card lender, a regional commercial lender and an investment bank have very different normal NIMs, loss rates and efficiency ratios. Compare within the same type, or say clearly that you're comparing across types. - **Reporting basis.** Managed vs. reported, FTE vs. not, NII including or excluding trading. Use the same basis for every bank, or flag it. - **Capital requirements.** Each bank's required CET1 differs. A 12% ratio can be a large cushion for one bank and a thin one for another. - **One-time items.** Securities losses from selling bonds, legal reserves, FDIC special assessments, gains on stake sales. Note them and show figures with and without when the bank provides both. - **Size category.** US rules sort banks into categories by size, with different capital and liquidity requirements. Regional banks and the largest banks face different rules. - **Fiscal periods.** Most large US banks use the calendar year, which makes this one of the easier sectors to line up. ## 5. Red flags | Check | What to look for | |---|---| | Deposits leaving | Total or noninterest-bearing deposits falling quarter after quarter, or more reliance on brokered deposits or Federal Home Loan Bank borrowing | | Margin squeeze | Deposit costs rising faster than loan yields; NIM falling for several quarters | | Credit getting worse | NCO rate, nonperforming loans or criticized loans rising, especially in card or CRE | | Reserves not keeping up | Charge-offs rising while the allowance ratio falls, or earnings helped by reserve releases | | CRE office exposure | Office loans large relative to capital, or rising problem loans in that book | | Bond losses | Large unrealized losses on held-to-maturity or available-for-sale securities relative to capital | | Thin capital cushion | CET1 close to the bank's own requirement, or buybacks paused without explanation | | Expense creep | Expenses growing faster than revenue for several quarters | | One-time help | Results lifted by gains, reserve releases, or tax items rather than core earnings | ## 6. Questions analysts ask - What does the NII outlook assume about interest rate cuts, and how sensitive is it? - How fast are deposit costs coming down (or going up), and where are deposit balances heading? - What are loan growth trends by category? - How is credit quality in cards, consumer loans and commercial real estate (especially office)? - How much excess capital does the bank have, and what are the plans for buybacks and dividends, given changes to capital rules? - What's the expense outlook, including technology and AI spending? - For banks with investment banking and trading: how do the deal pipeline and trading conditions look? ## 7. Example peer groups - Largest US banks: JPMorgan Chase (JPM), Bank of America (BAC), Citigroup (C), Wells Fargo (WFC) - Investment banks: Goldman Sachs (GS), Morgan Stanley (MS) - Large regional banks: PNC (PNC), U.S. Bancorp (USB), Truist (TFC) - Card lenders: Capital One (COF), American Express (AXP), Synchrony (SYF) - Custody banks: BNY (BK), State Street (STT), Northern Trust (NTRS)
references/tech.mdSoftware and SaaS, cloud platforms, internet and advertising platforms.
# Tech: software, cloud and internet platforms Sheet version 1.0, October 2026. Peer lists are examples only; check that a company is still independent and listed before using it. ## Contents 1. What this sheet covers 2. How these companies make money 3. Key metrics 4. Where comparisons break 5. Red flags 6. Questions analysts ask 7. Example peer groups ## 1. What this sheet covers - **Software and SaaS**: companies selling software by subscription or license (business applications, data, security, developer tools). - **Cloud platforms**: renting computing power and storage (for example, the cloud segments of the largest tech companies). - **Internet and advertising platforms**: search, social media, marketplaces and streaming, mostly paid for by advertising or subscriptions. Not covered here: chipmakers (see `semiconductors.md`), and hardware-led companies such as PC, phone and networking equipment makers, where inventory and unit sales matter more. For a mega-cap with several businesses, apply this sheet to the software, cloud and advertising segments and say which parts it doesn't fit. ## 2. How these companies make money Software companies mostly sell subscriptions, so revenue comes in steadily and the key questions are how fast new customers are added and how much existing customers expand or leave. Cloud platforms charge for usage, so revenue follows customer activity and requires heavy spending on data centers. Advertising platforms earn from ad volume and ad prices, which track the economy and user engagement. Across all three, AI is now both a product and a major cost. ## 3. Key metrics | Metric | Plain meaning | Where to find it | Comparison trap | |---|---|---|---| | Revenue growth (and subscription share) | How fast sales grow, and how much is recurring subscription revenue vs. one-off services | Release, 10-Q | Acquisitions and currency can inflate or hide growth; look for organic or constant-currency figures. | | ARR (annual recurring revenue) | Yearly value of current subscriptions | Release, investor deck | Not a GAAP figure. Each company defines it differently (some include usage, some don't). Don't compare ARR across companies without checking definitions. | | Net revenue retention (NRR, also NDR or dollar-based net expansion) | Revenue from existing customers now vs. a year ago, including upgrades and cancellations; above 100% means existing customers spend more | Release, deck, 10-K | Definitions and time windows vary; some companies only say "above 120%" or report it once a year. | | Gross revenue retention | Share of revenue kept from existing customers, before upgrades | Deck, 10-K (not always disclosed) | Often not disclosed; when missing, say so. | | RPO and cRPO | Contracted revenue not yet recognized (cRPO: the part due in the next 12 months) | 10-Q notes, release | Longer contracts inflate RPO without more annual business; cRPO is the better short-term signal. | | Billings | Revenue plus the change in deferred revenue | Calculated from the cash flow statement or given in the release | Changes in billing terms (annual vs. multi-year upfront) move billings without a real change in demand. | | Gross margin | Revenue minus the direct cost of providing the service | Release | AI features raise computing costs; GAAP vs. non-GAAP gross margin differ by stock pay and amortization. | | Operating margin (GAAP and non-GAAP) | Profit from operations as a percentage of revenue | Release | Non-GAAP usually excludes stock-based pay, which can be a large real cost. Always show both. | | Stock-based compensation (SBC) | Employee pay in shares | Cash flow statement, release | Excluded from non-GAAP profit and free cash flow, but it dilutes shareholders. Show it as a percentage of revenue. | | Share count change (dilution) | Whether the number of shares is growing or shrinking | 10-Q cover page, release | Buybacks can offset SBC; check diluted share count over a year. | | Free cash flow (FCF) and FCF margin | Cash from operations minus capital spending | Cash flow statement | Flattered by SBC (not a cash cost) and by collecting annual payments upfront. Seasonal; compare trailing 12 months. | | Rule of 40 | Revenue growth % plus a profit margin % (often FCF margin) | Calculated | Companies choose which margin to use. State the formula every time. | | Cloud segment growth and operating income | Growth and profit of the cloud business | Segment disclosures | Some companies give only a growth percentage, not dollars; segment definitions change over time. | | Capital expenditure (capex) | Spending on data centers, chips and equipment | Cash flow statement, guidance | Finance leases may be reported separately from capex; check whether the company's capex figure includes them. | | Advertising metrics | Ad revenue growth, ad impressions, price per ad, paid clicks | Release, 10-Q | Each platform reports different measures; they can't be compared directly. | | Users (DAU, MAU) | Daily or monthly active users | Release | Every company defines "active" differently, and some have stopped reporting. | | Large customers | Number of customers above a spending level (such as $100,000 a year) | Release, deck | Thresholds and definitions vary. | ## 4. Where comparisons break - **Fiscal years.** Many tech companies don't use the calendar year. Examples: Microsoft's year ends in June, Oracle's in May, Salesforce, Snowflake and Workday end theirs in January, Adobe's ends around late November or early December. Check each 10-K cover page and compare the same calendar months, or use trailing 12 months. - **Non-GAAP definitions.** What's excluded (stock pay, amortization, restructuring, legal costs) differs by company. Use GAAP for comparisons, or flag differences. - **Company-defined metrics.** ARR, NRR, active users and "large customers" are defined by each company. Treat cross-company comparisons of these as rough at best. - **Business mix.** A pure software company, a cloud platform and an ad business have different normal margins, capex and growth patterns. Compare within type. - **Acquisitions.** Big deals change growth rates, margins (through amortization) and share counts. ## 5. Red flags | Check | What to look for | |---|---| | Customers expanding less | NRR falling for several quarters, or the company stops disclosing it | | Future revenue slowing | cRPO or billings growing more slowly than revenue | | Growing reliance on stock pay | SBC rising as a share of revenue, or diluted share count rising | | Widening GAAP gap | The difference between GAAP and non-GAAP profit growing | | Changed or dropped metrics | A key metric redefined, or no longer reported | | AI costs pressuring margins | Gross margin falling as AI features roll out, without matching price increases | | Capex running ahead | Capex growing much faster than cloud or AI revenue for several quarters | | Cash flow helped by timing | FCF lifted by collecting payments earlier, or by cutting capex temporarily | | Repeated "one-time" charges | Restructuring charges appearing year after year | ## 6. Questions analysts ask - How much revenue is AI bringing in, and when does AI spending pay back? - Is AI changing pricing (for example, from per-seat pricing to usage-based)? - Are sales cycles getting longer, and are deals getting smaller? - Where is net revenue retention heading? - What's the capex plan for next year, and how much of it is for AI? - Are there constraints on chips, power or data center capacity? - What's the margin outlook as AI costs rise? ## 7. Example peer groups - Large platforms: Microsoft (MSFT), Alphabet (GOOGL), Amazon (AMZN), Meta Platforms (META) - Business software: Salesforce (CRM), ServiceNow (NOW), Workday (WDAY), Adobe (ADBE), Oracle (ORCL) - Data and infrastructure software: Snowflake (SNOW), Datadog (DDOG), MongoDB (MDB) - Security software: CrowdStrike (CRWD), Palo Alto Networks (PANW), Zscaler (ZS)
references/semiconductors.mdChip designers, manufacturers, foundries, memory, equipment makers.
# Semiconductors Sheet version 1.0, October 2026. Peer lists are examples only; check that a company is still independent and listed before using it. ## Contents 1. What this sheet covers 2. How chip companies make money 3. Key metrics 4. Where comparisons break 5. Red flags 6. Questions analysts ask 7. Example peer groups ## 1. What this sheet covers - **Fabless designers**: design chips and pay others to make them. - **Integrated manufacturers (IDMs)**: design and make their own chips. - **Foundries**: make chips for other companies. - **Memory makers**: DRAM and NAND, the most price-driven part of the industry. - **Equipment makers**: sell the machines used to make chips. Their demand is their customers' capital spending. - **Analog and power chips**: lower-cost chips used in cars, industrial equipment and devices, with long product lives. ## 2. How chip companies make money Sales depend on demand in each end market (data centers, PCs, phones, cars, industrial) and on the industry cycle: periods of shortage and strong pricing are followed by periods of excess inventory and price cuts. Gross margin is the clearest sign of where a company is in the cycle and how much pricing power it has. Manufacturers carry huge factory costs, so profits swing sharply with how fully factories are used. ## 3. Key metrics | Metric | Plain meaning | Where to find it | Comparison trap | |---|---|---|---| | Revenue by end market or segment | Sales to data center, PC, phone, auto, industrial and other markets | Release, 10-Q segment notes | Each company groups markets differently and regroups them over time. | | Gross margin | Revenue minus the cost to make the chips, as a percentage of revenue | Release | Non-GAAP often excludes acquisition amortization and stock pay, which can be large. Fabless companies and manufacturers have different cost structures. | | Next-quarter guidance | Most chip companies guide revenue and gross margin one quarter ahead | Release, call | Range width matters; a wider range signals less visibility. | | Operating margin and R&D intensity | Operating profit and research spending as a percentage of revenue | Release | GAAP vs. non-GAAP differences as above. | | Inventory and days of inventory | Unsold chips on the balance sheet, and how many days of sales they represent | Balance sheet, 10-Q | A buildup can mean slowing demand or deliberate stocking ahead of a launch; read the explanation. | | Channel inventory | Chips held by distributors and customers | Call commentary | Usually only described qualitatively; not comparable across companies. | | Book-to-bill | New orders divided by shipments; above 1 means orders are outpacing sales | Release (equipment makers and some others) | Many companies don't disclose it. | | Backlog | Orders received but not yet shipped | 10-K, release | Orders can be cancelled or pushed out; definitions vary. | | Customer concentration | Share of revenue from the biggest customers | 10-K (customers above 10% of revenue must be disclosed) | Some customers buy through distributors or contract manufacturers, which can hide the true end customer. | | Capex and factory utilization | Spending on factories, and how fully they're used | Cash flow statement, call | Matters for manufacturers and foundries, much less for fabless designers. | | Memory pricing and bit shipments | Average selling price and volume of memory sold | Call, release | Companies often give only percentage changes, not exact figures. | | China revenue share | Sales to China, including those affected by export controls | 10-K, 10-Q | Revenue is often reported by billing location, which may differ from where chips end up. | | Purchase commitments | Contracts to buy supply or capacity | 10-Q notes | Large commitments can become a burden if demand falls. | ## 4. Where comparisons break - **Fiscal years vary widely.** Examples: Nvidia's year ends in late January, Micron's around the end of August, Broadcom's and Applied Materials' around the end of October, Qualcomm's in late September. Texas Instruments, AMD and Intel use the calendar year. A "Q3" can cover different months for different companies. Line up calendar months, or use trailing 12 months. - **Business models.** Fabless designers, manufacturers, foundries and equipment makers have different margins, capex and cycles. Compare within type. - **Non-GAAP exclusions.** Acquisition amortization is large for companies that grew through deals. Compare GAAP, or flag the difference. - **Memory is its own cycle.** Memory prices can swing sharply in a few quarters, so a memory maker's margin isn't comparable to a logic chip designer's. - **Segment changes.** Companies regroup segments often; check whether past periods were restated. ## 5. Red flags | Check | What to look for | |---|---| | Inventory piling up | Inventory or days of inventory rising faster than revenue, without a stated reason like a product launch | | Customers paying slower | Receivables or days sales outstanding rising faster than revenue | | Margin slipping | Gross margin falling for several quarters, or guided lower | | One customer dominates | A single customer above roughly a quarter of revenue, or concentration rising | | Orders slowing | Book-to-bill below 1 for equipment makers, or backlog shrinking | | Export control exposure | Large China revenue in products subject to export restrictions | | Write-downs | Inventory write-downs or charges for unused capacity | | Heavy commitments | Purchase commitments large relative to expected revenue | | Less visibility | A wider guidance range than usual, or guidance withdrawn | ## 6. Questions analysts ask - How durable is AI and data center demand, and how much visibility does the company have into next year? - Are there supply constraints (advanced packaging, high-bandwidth memory, factory capacity)? - Where is gross margin heading, and what drives it (product mix, pricing, new products ramping)? - How are export controls and China affecting revenue? - Are big customers designing their own chips, and how does that affect demand? - Is the inventory correction in autos and industrial over? - What are the capex plans (for manufacturers), or what do customers' capex plans imply (for equipment makers)? ## 7. Example peer groups - AI and data center chips: Nvidia (NVDA), AMD (AMD), Broadcom (AVGO) - Phones and connectivity: Qualcomm (QCOM) - Manufacturers and foundries: Intel (INTC), Taiwan Semiconductor (TSM) - Memory: Micron (MU) - Equipment: ASML (ASML), Applied Materials (AMAT), Lam Research (LRCX), KLA (KLAC) - Analog and power: Texas Instruments (TXN), Analog Devices (ADI), Microchip (MCHP)
references/energy.mdOil majors, producers, midstream, refiners, oilfield services.
# Energy: oil and gas
Sheet version 1.0, October 2026. Peer lists are examples only; check that a company is still independent and listed before using it.
## Contents
1. What this sheet covers
2. How energy companies make money
3. Key metrics, all oil and gas companies
4. Key metrics by sub-industry
5. Where comparisons break
6. Red flags
7. Questions analysts ask
8. Example peer groups
## 1. What this sheet covers
- **Integrated majors**: produce oil and gas, refine it, and sell fuels and chemicals.
- **Exploration and production (E&P)**: find and produce oil and gas.
- **Midstream**: pipelines, storage and processing, mostly paid fees for moving volumes.
- **Refiners**: turn crude oil into gasoline, diesel and other products.
- **Oilfield services**: drilling, equipment and services sold to producers.
Not covered: electric and gas utilities, and renewable energy developers. Their economics are driven by regulated returns and contracts, not commodity prices.
## 2. How energy companies make money
For producers, profit is mostly the oil and gas price minus the cost of getting it out of the ground, so results move with commodity prices more than with anything management does in a single quarter. The questions that separate companies are cost per barrel, how much cash they must reinvest to hold production steady, how long their reserves last, and how much cash they return to shareholders. Midstream companies earn fees on volumes, so they're steadier. Refiners earn the gap between crude oil and product prices. Service companies follow producers' spending.
## 3. Key metrics, all oil and gas companies
| Metric | Plain meaning | Where to find it | Comparison trap |
|---|---|---|---|
| Production (boe/d) | Barrels of oil equivalent produced per day | Release, supplement | Gas is converted at 6,000 cubic feet per barrel, but gas is usually worth much less per barrel-equivalent than oil. Check the oil, natural gas liquids and gas mix. |
| Realized prices | What the company actually got for its oil and gas | Release, supplement | Compare against benchmarks (WTI, Brent, Henry Hub). Location and quality differences ("differentials") matter. Hedging can change the realized figure. |
| Unit costs | Operating cost per barrel equivalent (lease operating expense, production costs, cash costs) | Supplement, 10-Q | Companies group costs differently. |
| Capex and reinvestment rate | Capital spending, and capex as a share of operating cash flow | Cash flow statement | Some companies include acquisitions or exploration, some don't. |
| Free cash flow | Operating cash flow minus capex | Cash flow statement | Highly sensitive to the quarter's commodity prices. |
| Breakeven price | The oil price at which the company covers its capex (and sometimes its dividend) | Investor deck, call | Company-defined; check what's included. |
| Shareholder returns | Dividends (base and variable) and buybacks, often a stated share of free cash flow | Release, deck | Frameworks differ: fixed dividend, variable dividend, or buybacks. Compare total cash returned. |
| Net debt and leverage | Debt minus cash, often compared with cash earnings (EBITDA) or capital | Balance sheet, release | Leases and pension obligations may or may not be included. |
| Price sensitivity | How much earnings or cash flow change for each $1 move in oil or gas prices | Deck, 10-K | Not always disclosed. |
| Hedging | The share of future production locked in at set prices | 10-Q notes | Hedges can create large paper gains or losses in a single quarter. |
## 4. Key metrics by sub-industry
| Sub-industry | Metric | Plain meaning and trap |
|---|---|---|
| Producers (E&P and majors) | Proved reserves and reserve life | Oil and gas the company can reasonably expect to produce, and how many years of production that represents at current rates. Set using SEC price rules, so it changes with prices. Check the share that is undeveloped. |
| Producers | Reserve replacement ratio | New reserves added compared with what was produced. Below 100% for several years means the resource base is shrinking. Acquisitions can flatter it. |
| Midstream | Distributable cash flow (DCF) and coverage | Cash available to pay distributions or dividends, and how many times it covers them. Coverage below 1 means payouts exceed cash generated. |
| Midstream | Fee-based share of earnings | How much earnings comes from fixed fees rather than commodity prices. |
| Midstream | Leverage (debt to EBITDA) | How many years of cash earnings it would take to pay off debt. Partnerships (MLPs) and corporations report and pay out differently. |
| Refiners | Refining margin and crack spread | The gap between crude cost and product prices. The benchmark crack spread is not what the company actually earns; check its "capture rate." |
| Refiners | Throughput and utilization | How much crude the refineries process, and how fully they're used. Planned maintenance lowers it temporarily. |
| Oilfield services | International vs. North America revenue, backlog, rig counts | Activity outside North America has tended to be steadier. Backlog definitions vary. |
## 5. Where comparisons break
- **Commodity prices drive the quarter.** Always compare companies over the same period, and don't read a one-quarter change as a change in the business without checking prices.
- **Business mix.** Integrated majors, pure producers, pipelines and refiners have different margins, cycles and payouts. Compare within type.
- **Oil vs. gas mix.** A gas-weighted producer will look cheaper per barrel-equivalent but earns less per barrel-equivalent. Compare oil-weighted with oil-weighted where possible.
- **Accounting standards.** European majors (Shell, BP, TotalEnergies) report under IFRS, not US GAAP, and use different terms and adjusted measures.
- **Payout structures.** Partnerships pay distributions; corporations pay dividends. Tax treatment and coverage measures differ.
- **Hedging.** Two companies with the same production can report very different quarters because of hedges.
## 6. Red flags
| Check | What to look for |
|---|---|
| Reinvesting more to stand still | Reinvestment rate rising while production stays flat |
| Rising costs | Unit costs rising faster than the industry, without an explanation |
| Shrinking resource base | Reserve replacement below 100% for several years, or falling reserve life |
| Payouts beyond cash flow | Dividends and buybacks exceeding free cash flow, funded by debt or asset sales |
| Rising leverage | Net debt growing relative to cash earnings |
| Thin coverage (midstream) | Distribution or dividend coverage near or below 1 |
| Weak capture (refiners) | Capture rate falling, or utilization below peers outside planned maintenance |
| Write-downs | Impairments on assets or reserves |
| Big hedge swings | Large hedging losses, or hedges that limit upside when prices rise |
## 7. Questions analysts ask
- What are next year's capex budget and production targets?
- What's the breakeven, and how does the shareholder return plan change at lower prices?
- How is the integration of recent acquisitions going, and are cost savings on track?
- How much drilling inventory is left, and is well productivity holding up?
- What's the outlook for natural gas demand, including from LNG exports and data centers?
- Are costs for services and equipment rising or falling?
- For refiners: where are margins heading, and how much maintenance is planned?
## 8. Example peer groups
- Integrated majors: ExxonMobil (XOM), Chevron (CVX), Shell (SHEL), BP (BP), TotalEnergies (TTE)
- Producers: ConocoPhillips (COP), EOG Resources (EOG), Occidental (OXY), Devon (DVN)
- Gas-weighted producers: EQT (EQT), Expand Energy (EXE)
- Midstream: Kinder Morgan (KMI), Williams (WMB), Enterprise Products (EPD), Energy Transfer (ET)
- Refiners: Marathon Petroleum (MPC), Valero (VLO), Phillips 66 (PSX)
- Oilfield services: SLB (SLB), Halliburton (HAL), Baker Hughes (BKR)
references/healthcare.mdPharma, biotech, health insurers, medical devices, hospitals, life-science tools.
# Healthcare Sheet version 1.0, October 2026. Peer lists are examples only; check that a company is still independent and listed before using it. Healthcare is several different businesses under one label. Pick the sub-industry first; a drug maker and a health insurer share almost no metrics. ## Contents 1. What this sheet covers 2. Pharma and biotech 3. Health insurers (managed care) 4. Medical devices (medtech) 5. Hospitals and providers 6. Life-science tools 7. Where comparisons break 8. Questions analysts ask 9. Example peer groups ## 1. What this sheet covers Pharma, biotech, health insurers, medical device makers, hospital operators, and life-science tools makers. Not covered: pharmacy and drug distribution, health tech software (use `tech.md` for software metrics), and animal health. ## 2. Pharma and biotech **How they make money:** selling patented drugs. Revenue depends on a few major products and how long their patents last. The pipeline of drugs in development decides what replaces them. | Metric | Plain meaning | Comparison trap | |---|---|---| | Revenue by product | Sales of each major drug | Concentration: a company may depend on one or two drugs. | | Loss of exclusivity (LOE) | When patents expire and cheaper generics or biosimilars can compete | Dates are in the 10-K; revenue can fall sharply in the year after. | | Pipeline | Drugs in development by phase (Phase 1, 2, 3, filed with regulators) | Phase 3 and filed drugs matter most for the next few years. Late-stage counts aren't comparable without looking at market size. | | Upcoming decisions | Trial results and FDA decision dates (PDUFA dates) | Binary events; don't treat a pending decision as an outcome. | | R&D spending | Research spending as a percentage of revenue | Large "acquired in-process R&D" charges from buying drugs or companies can distort single quarters, and are often excluded from non-GAAP figures. | | Gross-to-net | The gap between list price and what the company actually receives after rebates and discounts | Rising discounts can mean volume grows while revenue doesn't. | | Cash runway (pre-revenue biotech) | Cash divided by quarterly cash burn: how long the company can operate without raising money | Raising money usually means issuing new shares (dilution). Check for "going concern" language in the 10-Q. | | Policy exposure | Drugs selected for Medicare price negotiation, and other pricing rules | Check the company's own disclosures; rules change. | **Red flags:** one drug making up most of revenue with patent expiry approaching; late-stage pipeline failures; gross-to-net discounts rising; repeated large acquired R&D charges; for pre-revenue biotech, less than about 12 months of cash, going concern language, or frequent share sales. ## 3. Health insurers (managed care) **How they make money:** collecting premiums from employers, individuals and government programs, and paying members' medical bills. Profit is the small gap between the two, so small changes in medical costs matter a lot. | Metric | Plain meaning | Comparison trap | |---|---|---| | Medical loss ratio (also medical cost ratio, medical benefit ratio, MLR, MCR, MBR) | Medical costs as a percentage of premiums; lower means more profit per premium dollar | Names and exact definitions vary by company. Business mix matters: Medicaid and Medicare Advantage run different normal ratios than commercial plans. | | Membership by segment | Members in commercial, Medicare Advantage, Medicaid and other plans | Growth in low-margin segments can raise revenue while lowering profit. | | Operating cost ratio (SG&A ratio) | Administrative costs as a percentage of revenue | Companies with large service or pharmacy businesses aren't directly comparable. | | Days claims payable | How many days of medical costs the company has reserved for claims not yet paid | A falling number can mean reserves are being stretched. | | Prior-period reserve development | Whether past reserves turned out too high (favorable) or too low (unfavorable) | Unfavorable development means past costs were underestimated. | | Star ratings | Quality ratings for Medicare Advantage plans, which affect bonus payments | Changes take effect with a lag; check company disclosures. | **Red flags:** medical loss ratio above the company's guidance, or rising for several quarters; guidance cut because of higher use of medical services; falling days claims payable; unfavorable reserve development; lower star ratings; exposure to government rate changes in Medicare Advantage or Medicaid. ## 4. Medical devices (medtech) **How they make money:** selling devices and supplies to hospitals and doctors. Growth follows procedure volumes and new product launches. | Metric | Plain meaning | Comparison trap | |---|---|---| | Organic growth | Sales growth excluding acquisitions and currency | Companies define organic slightly differently. | | Procedure volumes | How many surgeries and procedures use the products | Usually described on calls, not reported as numbers. | | New product contribution | Sales from recently launched products | Definitions of "new" vary. | | Gross margin | Revenue minus the cost of making the products | Mix and pricing pressure from hospital buyers matter. | **Red flags:** product recalls; FDA warning letters; slowing organic growth while acquisitions fill the gap; inventory building up at distributors; pricing pressure from large hospital buying groups. ## 5. Hospitals and providers **How they make money:** being paid for patient care by insurers, Medicare, Medicaid and patients. The mix of who pays matters, because commercial insurers usually pay more than government programs. | Metric | Plain meaning | Comparison trap | |---|---|---| | Admissions and same-facility volumes | Patient volumes at hospitals open at least a year | Acquisitions inflate total volume. | | Revenue per admission | Average revenue per patient stay | Driven by payer mix and how sick patients are. | | Payer mix | Share of revenue from commercial insurers, Medicare, Medicaid and uninsured patients | A shift toward government payers or uninsured patients lowers margins. | | Labor costs | Salaries and contract (temporary) labor as a share of revenue | Contract labor costs much more than staff. | **Red flags:** payer mix shifting toward lower-paying sources; rising contract labor; rising bad debt or uncompensated care; exposure to changes in Medicaid enrollment or rates. ## 6. Life-science tools **How they make money:** selling instruments, consumables and services to drug makers, labs and research institutions. Watch: orders and book-to-bill where disclosed, consumables vs. instrument mix (consumables are steadier), demand from biotech customers (which follows biotech funding), academic and government research funding, and China exposure. **Red flags:** orders falling, customers cutting back on instruments, dependence on biotech customers when biotech funding is weak, and changes in government research funding. ## 7. Where comparisons break - **Sub-industries don't mix.** Never compare a drug maker's margins with an insurer's, or a biotech's cash burn with a device maker's profits. - **Non-GAAP exclusions.** Drug makers often exclude acquired R&D and amortization from adjusted earnings, and they don't all exclude the same things. Compare GAAP or flag differences. - **Insurer business mix.** Medicare Advantage, Medicaid and commercial plans have different normal medical loss ratios. Compare insurers with similar mixes, or compare by segment. - **One-time events.** Patent settlements, acquisition charges, litigation and legal reserves can dominate a quarter. - **Fiscal years.** Most large US healthcare companies use the calendar year, but check the 10-K cover page. ## 8. Questions analysts ask - Insurers: Are people using more medical care than expected? How do government rates and star ratings affect next year? Will the company reprice or exit markets? - Pharma: What's the plan for upcoming patent expirations? What major trial results or approvals are coming? How do drug pricing rules and tariffs affect revenue? - Biotech: How long will the cash last? What are the next trial readouts? - Medtech: Are procedure volumes holding up? How are new launches going? - Hospitals: How are volumes, payer mix and labor costs trending? - Topic across sectors: demand for and supply of GLP-1 weight-loss drugs, and their effect on other businesses. ## 9. Example peer groups - Large pharma: Eli Lilly (LLY), Johnson & Johnson (JNJ), Merck (MRK), Pfizer (PFE), AbbVie (ABBV), Bristol Myers Squibb (BMY) - Large biotech: Amgen (AMGN), Gilead (GILD), Vertex (VRTX), Regeneron (REGN) - Health insurers: UnitedHealth (UNH), Elevance (ELV), Cigna (CI), Humana (HUM), Centene (CNC), Molina (MOH) - Medical devices: Medtronic (MDT), Abbott (ABT), Boston Scientific (BSX), Stryker (SYK), Intuitive Surgical (ISRG) - Hospitals: HCA Healthcare (HCA), Tenet (THC), Universal Health Services (UHS) - Life-science tools: Thermo Fisher (TMO), Danaher (DHR), Agilent (A)
references/charts.mdWhen to make a chart, what may go in it, and the JSON spec.
# Comparison charts
Use `scripts/compare_chart.py` to turn a comparison into a clean PNG chart for a post, a newsletter or a slide. It reads a small JSON file and writes an image. It needs Python with matplotlib, which Claude's code environment normally has, and it doesn't connect to the internet.
## When to make a chart
- The user asks for a chart, graph or visual, or wants something to post or share.
- After a peer comparison, offer one in a single line. Don't make one unasked for a one-company check-up.
- If code execution isn't available, say so and give the table only. Don't try to draw charts another way.
## What goes in a chart
The chart must never say more than the table does.
- **Only metrics marked "Yes" or "Roughly" comparable.** The script refuses metrics marked "no." Explain those in the text instead.
- **Every "Roughly" metric needs a `comparable_note`** saying why. The script puts it in a numbered footnote.
- **Every value must match the comparison table exactly**, including rounding.
- **Missing values are `null`.** They show as "not found," never as zero.
- **Use `value_notes` for anything calculated, adjusted or unusual**, such as "calculated from rounded figures" or "62% excluding a $1.2B charge." These become footnotes.
- **Market cap and P/E may go in a chart; share price never.** Price isn't comparable across companies. P/E needs the earnings basis in the metric name ("P/E, trailing GAAP") and the "as of" time in `sources`.
- **Pick the four to six metrics that tell the story.** For bars, the limit is six panels; for trends, four. More than that is hard to read on a phone.
- **Keep company order the same as the table.** Colors follow the company in that order.
- **Title and subtitle describe, never judge.** "JPMorgan, Bank of America and Wells Fargo: third quarter 2026" is right. "JPMorgan dominates" is not.
- **For metrics where lower is better** (efficiency ratio, medical loss ratio, costs), say so in the metric name, for example "Efficiency ratio (lower is better)."
## Chart types
- **`bars`**: one period, one panel per metric, one bar per company. The default.
- **`trend`**: several periods, one line per company per metric. Missing periods show as gaps, not invented lines. Use it only when you have most of the periods; if more than one period in a row is missing for most companies, use bars for the latest period instead.
## The spec
```json
{
"type": "bars",
"title": "JPMorgan, Bank of America and Wells Fargo: third quarter 2026",
"subtitle": "Growth and returns from each bank's 3Q26 filings. Changes are versus 3Q25.",
"companies": ["JPMorgan", "Bank of America", "Wells Fargo"],
"metrics": [
{
"name": "Net interest income, change",
"unit": "%",
"decimals": 1,
"comparable": "yes",
"values": [12.8, 7.9, 4.7],
"value_notes": [null, "calculated from figures rounded to $0.1B", null]
},
{
"name": "Net interest margin",
"unit": "%",
"decimals": 2,
"comparable": "roughly",
"comparable_note": "taxable-equivalent; JPMorgan's includes its trading business",
"values": [2.48, 2.16, 2.43]
}
],
"sources": "JPMorgan 3Q26 earnings supplement; Bank of America 3Q26 press release; Wells Fargo 3Q26 earnings release (SEC filings, Oct. 13–14, 2026).",
"notes": []
}
```
For a trend chart, add `"periods": ["3Q25", "4Q25", "1Q26", "2Q26", "3Q26"]` and give each company a list of values, one per period, with `null` for missing ones.
Units: `"%"`, `"$B"`, `"$M"`, `"x"`, `"pts"`, or `""` for a plain number. `brand_line` is optional; set it to `""` to remove the Hands Off line.
## Running it
```bash
python scripts/compare_chart.py spec.json chart.png
```
Run it from the skill's folder, or give the full path to the script. If the script stops with a message, fix the spec as the message says; don't edit the script to get around a refusal.
## Before you hand it over
Open the image and look at it. Check that every number matches the table, footnotes are present for every "Roughly" metric and noted value, nothing overlaps or is cut off, and the sources line is complete. Then give the user the PNG with one line saying what it shows.
scripts/compare_chart.pyTurns a comparison into a PNG. Uses only matplotlib, reads one JSON file, writes one image, no network.
#!/usr/bin/env python3
"""Draw a clean comparison chart from a small JSON spec.
Reads a JSON file, writes a PNG. It uses only matplotlib and the Python standard
library. It doesn't read any other files or connect to the internet.
Usage:
python compare_chart.py spec.json [output.png]
Spec (see references/charts.md for the full description):
{
"type": "bars", # "bars" (one period) or "trend" (several periods)
"title": "...", "subtitle": "...",
"companies": ["Company A", "Company B"], # 2 to 5, in the same order everywhere
"periods": ["3Q25", "4Q25", ...], # trend charts only
"metrics": [
{
"name": "Net interest margin",
"unit": "%", # "%", "$B", "$M", "x", "pts" or "" (plain number)
"decimals": 1,
"comparable": "yes", # "yes" or "roughly"; "no" is refused
"comparable_note": "...", # required when comparable is "roughly"
"values": [2.48, 2.16, 2.43], # bars: one per company; trend: one list per company
"value_notes": [null, "calculated", null] # optional, bars only
}
],
"sources": "Company filings ...",
"notes": ["..."],
"brand_line": "Made with the Hands Off sector skill · handsoff.finance" # optional; "" to hide
}
"""
import json
import math
import sys
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt # noqa: E402
from matplotlib import font_manager # noqa: E402
from matplotlib.patches import FancyBboxPatch # noqa: E402
# Validated categorical order (passes adjacent-pair colorblind checks on a light
# surface). Colors follow the company, in the order given, never its rank.
SERIES = ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4"]
INK = "#193e30" # primary text
INK_2 = "#526253" # secondary text
INK_3 = "#7d8a7e" # muted text
GRID = "#e4e7e1" # hairline grid
BASE = "#b9c2b7" # zero baseline
SURFACE = "#ffffff"
ACCENT = "#103f2e" # thin top rule
SUPERS = "¹²³⁴⁵⁶⁷⁸⁹"
def pick_font():
wanted = ["IBM Plex Sans", "Inter", "Source Sans 3", "Helvetica Neue", "Arial", "DejaVu Sans"]
have = {f.name for f in font_manager.fontManager.ttflist}
for name in wanted:
if name in have:
return name
return "DejaVu Sans"
def fmt(v, unit, decimals):
if v is None:
return "not found"
s = f"{abs(v):,.{decimals}f}"
sign = "-" if v < 0 else ""
if unit == "%":
return f"{sign}{s}%"
if unit in ("$B", "$M", "$K"):
return f"{sign}${s}{unit[1]}"
if unit == "x":
return f"{sign}{s}x"
if unit == "pts":
return f"{sign}{s} pts"
return f"{sign}{s}"
def fail(msg):
sys.exit(f"compare_chart: {msg}")
def check(spec):
kind = spec.get("type", "bars")
if kind not in ("bars", "trend"):
fail('type must be "bars" or "trend"')
cos = spec.get("companies") or []
if not 2 <= len(cos) <= 5:
fail("give 2 to 5 companies")
mets = spec.get("metrics") or []
if not mets:
fail("give at least one metric")
if len(mets) > (6 if kind == "bars" else 4):
fail("too many metrics for one chart; split into two charts")
for m in mets:
c = m.get("comparable", "").lower()
if c == "no":
fail(f'"{m.get("name")}" is marked not comparable. Leave it out of the chart and explain it in the text instead.')
if c not in ("yes", "roughly"):
fail(f'"{m.get("name")}": comparable must be "yes" or "roughly"')
if c == "roughly" and not m.get("comparable_note"):
fail(f'"{m.get("name")}" is only roughly comparable; add a comparable_note saying why')
vals = m.get("values") or []
if len(vals) != len(cos):
fail(f'"{m.get("name")}": need one value (or one list) per company')
if kind == "trend":
n = len(spec.get("periods") or [])
if n < 2:
fail("trend charts need at least two periods")
for row in vals:
if not isinstance(row, list) or len(row) != n:
fail(f'"{m.get("name")}": each company needs one value per period')
return kind
def set_panel_title(ax, m, footnotes):
title = m["name"]
if m.get("comparable", "").lower() == "roughly":
key = f"{m['name']}: roughly comparable ({m['comparable_note']})"
if key not in footnotes:
footnotes.append(key)
title += SUPERS[footnotes.index(key) % len(SUPERS)]
ax.set_title(title, loc="left", fontsize=11, color=INK, fontweight="semibold", pad=8)
def apply_ticks(axis, unit):
locs = [t for t in axis.get_majorticklocs()]
step = min((b - a for a, b in zip(locs, locs[1:])), default=1) or 1
dec = 0 if step >= 1 else (1 if step >= 0.1 else 2)
axis.set_major_formatter(matplotlib.ticker.FuncFormatter(lambda v, _p: fmt(v, unit, dec)))
def count_footnotes(spec):
n = 0
for m in spec["metrics"]:
if m.get("comparable", "").lower() == "roughly":
n += 1
if spec.get("type", "bars") == "bars":
n += sum(1 for v in (m.get("value_notes") or []) if v)
return n
def rounded_bar(ax, y, width, height, color):
"""Horizontal bar, square at the baseline, slightly rounded at the data end."""
if width == 0:
return
x0 = min(0, width)
w = abs(width)
# Draw a rounded box, then cover the baseline end with a square patch.
xlim = ax.get_xlim()
span = (xlim[1] - xlim[0]) or 1
r = min(w * 0.45, span * 0.006)
ax.add_patch(FancyBboxPatch((x0, y - height / 2), w, height,
boxstyle=f"round,pad=0,rounding_size={r}",
mutation_aspect=height / max(r, 1e-9) * 0.35 if r else 1,
linewidth=0, facecolor=color))
cover = min(w, r * 1.2)
cx = 0 if width > 0 else -cover
ax.add_patch(plt.Rectangle((cx, y - height / 2), cover, height, linewidth=0, facecolor=color))
def draw_bars(fig, axes, spec, footnotes, cols=1):
cos = spec["companies"]
n = len(cos)
for idx, (ax, m) in enumerate(zip(axes, spec["metrics"])):
unit, dec = m.get("unit", ""), int(m.get("decimals", 1))
vals = m["values"]
notes = m.get("value_notes") or [None] * n
present = [v for v in vals if v is not None]
lo = min([0] + present)
hi = max([0] + present)
pad = (hi - lo) * 0.28 or 1
ax.set_xlim(lo - (pad if lo < 0 else 0), hi + pad)
ys = list(range(n))[::-1]
for i, (y, v) in enumerate(zip(ys, vals)):
label = fmt(v, unit, dec)
if notes[i]:
key = f"{cos[i]}, {m['name']}: {notes[i]}"
if key not in footnotes:
footnotes.append(key)
label += SUPERS[footnotes.index(key) % len(SUPERS)]
if v is None:
ax.text(0, y, " " + label, va="center", ha="left", fontsize=9, color=INK_3, style="italic")
continue
rounded_bar(ax, y, v, 0.56, SERIES[i])
off = (ax.get_xlim()[1] - ax.get_xlim()[0]) * 0.012
ax.text(v + (off if v >= 0 else -off), y, label, va="center",
ha="left" if v >= 0 else "right", fontsize=10, color=INK, fontweight="semibold")
ax.set_ylim(-0.7, n - 0.3)
ax.set_yticks(ys)
ax.set_yticklabels(cos if idx % cols == 0 else [""] * n, fontsize=9.5, color=INK_2)
ax.tick_params(axis="y", length=0, pad=6)
ax.tick_params(axis="x", length=0, labelsize=8, colors=INK_3)
ax.xaxis.set_major_locator(matplotlib.ticker.MaxNLocator(4))
apply_ticks(ax.xaxis, unit)
ax.grid(axis="x", color=GRID, linewidth=0.8)
ax.set_axisbelow(True)
for s in ax.spines.values():
s.set_visible(False)
ax.axvline(0, color=BASE, linewidth=1)
set_panel_title(ax, m, footnotes)
def draw_trend(fig, axes, spec, footnotes):
cos, periods = spec["companies"], spec["periods"]
xs = list(range(len(periods)))
for ax, m in zip(axes, spec["metrics"]):
unit, dec = m.get("unit", ""), int(m.get("decimals", 1))
for i, row in enumerate(m["values"]):
pts = [(x, v) for x, v in zip(xs, row) if v is not None]
if not pts:
continue
# Draw only between neighboring periods that both have data, so a
# missing quarter shows as a gap instead of an invented line.
seg = []
for x, v in zip(xs, row):
if v is None:
if len(seg) > 1:
ax.plot(*zip(*seg), color=SERIES[i], linewidth=2, solid_capstyle="round", solid_joinstyle="round", zorder=3)
elif len(seg) == 1:
ax.scatter(*zip(*seg), s=16, color=SERIES[i], zorder=3)
seg = []
else:
seg.append((x, v))
if len(seg) > 1:
ax.plot(*zip(*seg), color=SERIES[i], linewidth=2, solid_capstyle="round", solid_joinstyle="round", zorder=3)
elif len(seg) == 1 and len(pts) > 1:
ax.scatter(*zip(*seg), s=16, color=SERIES[i], zorder=3)
px, py = zip(*pts)
ax.scatter([px[-1]], [py[-1]], s=42, color=SERIES[i], edgecolor=SURFACE, linewidth=2, zorder=4)
ax.annotate(fmt(py[-1], unit, dec), (px[-1], py[-1]), xytext=(7, 0), textcoords="offset points",
va="center", fontsize=9, color=INK, fontweight="semibold")
ax.set_xticks(xs)
ax.set_xticklabels(periods, fontsize=8.5, color=INK_3)
ax.set_xlim(-0.2, len(xs) - 1 + 0.6)
ax.tick_params(length=0, labelsize=8, colors=INK_3)
ax.yaxis.set_major_locator(matplotlib.ticker.MaxNLocator(4))
apply_ticks(ax.yaxis, unit)
ax.grid(axis="y", color=GRID, linewidth=0.8)
ax.set_axisbelow(True)
for s in ax.spines.values():
s.set_visible(False)
set_panel_title(ax, m, footnotes)
def main():
if len(sys.argv) < 2:
fail("usage: python compare_chart.py spec.json [output.png]")
with open(sys.argv[1], encoding="utf-8") as f:
spec = json.load(f)
out = sys.argv[2] if len(sys.argv) > 2 else spec.get("output", "comparison-chart.png")
kind = check(spec)
plt.rcParams["font.family"] = pick_font()
nm = len(spec["metrics"])
cols = 1 if nm == 1 else (2 if nm <= 4 else 3)
rows = math.ceil(nm / cols)
width = 12
height = 2.3 + rows * (1.15 + 0.42 * len(spec["companies"]) if kind == "bars" else 2.9)
top_px = 1.7
n_foot = count_footnotes(spec) + len(spec.get("notes", [])) + (1 if spec.get("sources") else 0)
height += 0.17 * n_foot
bottom_space = (0.45 + 0.17 * n_foot) / height
top_px = top_px / height
fig = plt.figure(figsize=(width, height), dpi=200, facecolor=SURFACE)
gs = fig.add_gridspec(rows, cols, left=0.11 if kind == "bars" else 0.07, right=0.96,
top=1 - top_px - 0.02, bottom=bottom_space + 0.06,
hspace=0.55 if kind == "bars" else 0.6, wspace=0.18 if kind == "bars" else 0.25)
axes = [fig.add_subplot(gs[i // cols, i % cols]) for i in range(nm)]
footnotes = []
if kind == "bars":
draw_bars(fig, axes, spec, footnotes, cols)
else:
draw_trend(fig, axes, spec, footnotes)
# Header
fig.add_artist(plt.Line2D([0.03, 0.97], [1 - 0.12 / height] * 2, color=ACCENT, linewidth=2.5))
fig.text(0.03, 1 - 0.42 / height, spec.get("title", ""), fontsize=17, fontweight="bold", color=INK, va="top")
if spec.get("subtitle"):
fig.text(0.03, 1 - 0.82 / height, spec["subtitle"], fontsize=10.5, color=INK_2, va="top")
# Legend: swatch + name, one row, under the subtitle
x = 0.03
ly = 1 - 1.18 / height
for i, name in enumerate(spec["companies"]):
fig.patches.append(FancyBboxPatch((x, ly - 0.012), 0.012, 0.024 * 12 / height * 0.5, transform=fig.transFigure,
boxstyle="round,pad=0,rounding_size=0.002", facecolor=SERIES[i], linewidth=0))
t = fig.text(x + 0.017, ly, name, fontsize=9.5, color=INK_2, va="center")
fig.canvas.draw()
bb = t.get_window_extent().transformed(fig.transFigure.inverted())
x = bb.x1 + 0.022
# Footer
lines = []
for k, note in enumerate(footnotes):
lines.append(f"{SUPERS[k % len(SUPERS)]} {note}")
lines += spec.get("notes", [])
if spec.get("sources"):
lines.append("Sources: " + spec["sources"])
y = bottom_space + 0.01
fig.add_artist(plt.Line2D([0.03, 0.97], [y + 0.02] * 2, color=GRID, linewidth=1))
step = 0.17 / height
for i, line in enumerate(lines):
fig.text(0.03, y - i * step, line, fontsize=7.8, color=INK_3, va="top")
brand = spec.get("brand_line", "Made with the Hands Off sector skill · handsoff.finance")
tail = "A research aid, not investment advice."
fig.text(0.03, y - len(lines) * step - 0.004, tail, fontsize=7.8, color=INK_3, va="top")
if brand:
fig.text(0.97, y - len(lines) * step - 0.004, brand, fontsize=7.8, color=INK_2, va="top", ha="right")
fig.savefig(out, dpi=200, facecolor=SURFACE)
print(out)
if __name__ == "__main__":
main()
README.mdInstall steps and what's inside.
# Sector Lens, a Claude skill from Hands Off Read and compare stocks the way someone who covers that industry would. The skill includes a sheet for each of five sectors: - **Banks**: large and regional banks, card lenders, investment banks, custody banks - **Tech**: software, cloud and internet platforms - **Semiconductors**: chip designers, manufacturers, memory, equipment makers - **Energy**: oil majors, producers, pipelines, refiners, oilfield services - **Healthcare**: pharma, biotech, health insurers, medical devices, hospitals, life-science tools Each sheet covers the metrics that matter in plain English, where comparisons between companies break, a red-flag checklist, and the questions analysts usually ask. ## What you can ask > Compare JPMorgan, Bank of America and Wells Fargo for last quarter. Here are their earnings releases. > Give me a check-up on Micron using this 10-Q. > Nvidia reports next week. What should I watch? > What's net revenue retention, and why can't I compare it across companies? > Make a chart of that comparison I can post. Ask for a chart and it draws a clean comparison graphic you can post or drop into a slide, with footnotes for anything that's only roughly comparable and the sources on the image. Check-ups and comparisons open with a market snapshot (share price, market cap, trailing and forward P/E with the earnings basis and the time the quotes were taken). Comparisons include a "Where this comparison is misleading" section, which lists every place the numbers don't measure the same thing, and a "What would have to be true" section for each company. The skill doesn't pick stocks or give price targets. ## Where the numbers come from Attach filings or earnings releases for the most reliable results. Without them, the skill uses web search if you have it turned on, and cites the source and date for every figure. It's told never to fill in numbers from memory and to label anything it calculates. ## Install in the Claude app 1. Turn on code execution: Settings → Capabilities → "Code execution and file creation". (On Team and Enterprise plans, an admin controls this.) 2. Go to Customize → Skills, click "+", then "Create skill" → "Upload a skill". 3. Upload this ZIP and make sure the skill is switched on. The Claude desktop app uses the same skills you upload here. ## Install in Claude Code Unzip and copy the `sector-lens` folder to `~/.claude/skills/`, so the instructions sit at `~/.claude/skills/sector-lens/SKILL.md`. Skills installed this way don't carry over to the Claude app, so upload the ZIP there too if you use both. ## What's inside - `SKILL.md`: the instructions Claude follows - `references/`: one sheet per sector (banks, tech, semiconductors, energy, healthcare), plus `charts.md` with the chart rules - `scripts/compare_chart.py`: one short Python script that turns a comparison into a PNG chart. It uses only matplotlib, reads one JSON file, writes one image, and doesn't connect to the internet. You can read it before installing. Everything else is plain text. ## Good to know - Works well with the Hands Off earnings call skill: install both, and call digests use the sector's metrics and questions. - A research aid, not investment advice. Check important figures against the company's filings. - Free for personal use. Please don't resell it or repackage it as your own. If you share it, link back to handsoff.finance. Version 1.1 · October 2026 · handsoff.finance (The version is also in SKILL.md under `metadata`.)
Goes with
- Add a skill to Claude and put it to work · Guide
- Six finance tasks in Perplexity Finance, start to finish · Guide
- Best AI tools for stock research in 2026: the shortlist · Review
- Best AI tools for financial analysts and modeling in 2026: in Excel, not instead of it · Review
- Earnings Call Digest · Skill
Free for personal use. Please don't resell it or repackage it as your own; if you share it, link back to handsoff.finance. Output is a research aid, not investment advice. Check important figures against the company's filings. Results depend on the documents you provide.
