margin-analyzer
Analyzes unit economics by product or service using PayPal merchant insights and QuickBooks cost data, benchmarks against inflation and cost changes, and shows pricing-scenario data (e.g. "a 5% increase historically correlates with ~3% volume drop"). Surfaces analysis only — does not recommend a price. Use when the user asks about raising prices, pricing, margin analysis, what to charge, whether costs are eating into profit, or how a price change might affect their business. Trigger even if the user doesn't say "margin" explicitly — phrases like "am I making enough?", "should I charge more?", or "my costs are going up" all call for this skill.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o margin-analyzer.zip https://jpskill.com/download/22766.zip && unzip -o margin-analyzer.zip && rm margin-analyzer.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22766.zip -OutFile "$d\margin-analyzer.zip"; Expand-Archive "$d\margin-analyzer.zip" -DestinationPath $d -Force; ri "$d\margin-analyzer.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
margin-analyzer.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
margin-analyzerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] margin-analyzer
マージンアナライザー
ステータス: MVPドラフト · オーナー: JJ · バージョン: 1.1.0 カテゴリ: 財務・業務 · フェーズ: V2
クイックスタート
中小企業のオーナーが「値上げすべきか?」「マージンは大丈夫か?」と尋ねたとき、このスキルは以下のことを行います。
- 分析対象の特定 — どの製品/サービスが対象範囲か
- コストデータの取得 — QuickBooksから(売上原価、直接費用)
- 収益データの取得 — PayPalまたはSquareから(取引履歴)
- ユニットエコノミクスの計算 — 項目ごとの収益、売上原価、粗利益、マージン率
- コンテキストとのベンチマーク — インフレ、コスト変動、可能であれば業界標準
- 価格設定シナリオの構築 — データが許す限り、過去の相関関係を用いて、+5%、+10%、+15%の価格変更が収益とマージンにどう影響するかを示す
- 分析の提示 — 価格推奨は行わず、オーナーが決定する
この出力により、オーナーは実際のデータに基づいて自身の価格設定を決定できます。
ワークフロー
ステップ1:事前確認
QuickBooks: company-infoを呼び出して、業界フィールドが入力されていることを確認します。もし欠落しているか「Unknown」の場合、「関連するベンチマークを取得するために、あなたの事業カテゴリが必要です。どの業界に属していますか?」と尋ね、その後quickbooks-profile-info-updateを呼び出します。
PayPal: 事前確認は不要ですが、PayPalは連続した呼び出しに対してレート制限を設けています — reference/gotchas.mdを参照してください。
コネクタなし: フォールバックとしてCSVアップロードを提案します。このスキルは、エクスポートされた取引データと費用データから機能します。期待されるCSVスキーマはreference/csv-schema.mdにあります。
ステップ2:範囲の明確化
オーナーに2つの質問をします。
-
「どの製品またはサービスを分析したいですか?」
- すべてか、特定のサブセットか?
- 「すべて」と答えた場合、コネクタに十分なデータがあることを確認してから、すべてをプルします。
-
「どの指標があなたにとって最も重要ですか?」
- 粗利益(収益から直接費用を引いたもの)?
- 純利益(すべての費用を引いた後)?
- ユニットあたりの収益?
- 彼らの回答が、出力の提示方法を決定します。
ステップ3:コストデータの取得(QuickBooks)
profit-loss-quickbooks-accountを使用してQuickBooksから取得します。
- 日付範囲: 過去12ヶ月(または利用可能な場合は全履歴)
- 抽出: 製品/サービスラインごとの売上原価、直接費用
QuickBooksが接続されていない場合、オーナーに以下を尋ねます。
- 製品/サービスラインごとのコスト内訳(材料費、人件費、項目ごとの直接配送費)
- 過去6〜12ヶ月間に発生した既知のコスト変動
QuickBooksが接続されているが、すべての期間で売上原価が$0の場合、$0をコスト入力として使用しないでください。これをオーナーに伝えます。
「QuickBooksでは、この期間の売上原価が記録されていません。意味のあるマージンを計算するには、事業全体の単一の平均ではなく、製品またはサービスラインごとのコスト内訳が必要です。分析したい各項目について、それを納品するのにどれくらいの費用がかかりますか?材料費、直接人件費、項目ごとの直接費用です。おおよその数字でも構いません。」
最終出力の「データ品質に関する注意」セクションでこの制限を指摘します。
ステップ4:収益データの取得(PayPal / Square)
list_transactions(PayPal)またはmake_api_request(Square)から取得します。
- 日付範囲: コストデータウィンドウと一致させる(過去12ヶ月)
- 抽出: 取引金額、項目/サービス名、日付、利用可能な場合は数量
PayPalのレート制限に達した場合、30秒間一時停止して一度再試行します。それでもブロックされる場合は、「PayPalが一時的にレート制限されています。代わりにSquareに切り替えるか、CSVをアップロードしますか?」と提案します。
利用可能なデータソースが1つしかない場合、出力にその制限を記載します。
ステップ5:ユニットエコノミクスの計算
対象範囲内の各製品/サービスについて、以下を計算します。
| 指標 | 計算式 |
|---|---|
| 収益 | その項目の取引金額の合計 |
| 売上原価 | QBまたはオーナー提供のコストデータ |
| 粗利益 | 収益 − 売上原価 |
| 粗利益率 | (粗利益 ÷ 収益) × 100 |
| 販売数量 | 取引数(利用可能な場合) |
| ユニットあたりの収益 | 収益 ÷ 販売数量 |
| ユニットあたりのコスト | 売上原価 ÷ 販売数量 |
マージンが20%を下回る項目は、推奨ではなく、オーナーの注意を引くべきデータポイントとしてフラグを立てます。
ステップ6:ベンチマーク
数値を意味のあるものにするために、コンテキストを重ね合わせます。
- インフレ: 入力コストの増加について議論する場合、関連するコストトレンドを指摘します。例:「この期間中、あなたの入力コストは約X%上昇しましたが、価格は据え置かれました。これにより、マージンはYポイント圧縮されました。」
- 業界ベンチマーク: QuickBooksの業界プロファイルを使用して、そのカテゴリの粗利益率の目安を示します。
reference/industry-benchmarks.mdを参照してください。 - 過去との比較: 24ヶ月以上のデータが利用可能な場合、今年の利益率を去年の利益率と比較して、トレンドの方向性を示します。
データが少ない場合でも適切に対応します。取引が6ヶ月未満の場合、弾力性セクションを省略し、「価格変動に対する販売量の反応を推定するには、少なくとも6ヶ月の価格履歴が必要です。代わりにシナリオ計算を示します。」と記載します。
ステップ7:価格設定シナリオ
各製品/サービスについて、3つの価格変更シナリオを示す表を作成します。
| シナリオ | 新価格 | 予測収益* | 粗利益率 |
|---|---|---|---|
| +5% | $X | $Y | Z% |
| +10% | $X | $Y | Z% |
| +15% | $X | $Y | Z% |
予測収益の計算方法:
- 6ヶ月以上の履歴がある場合: 過去のデータを使用して販売量の反応を推定します。過去に価格変更があった場合、観測された弾力性(
弾力性 = 販売量の変化率 ÷ 価格の変化率)を計算します。それを適用して、新しい価格での販売量を予測します。 - 履歴が不十分な場合: 3つの販売量仮定(−0%、−5%、−10%)を示し、オーナーに現実的と思われるものを選択させます。
注記を追加します。「これらは利用可能なデータに基づいた予測であり、保証ではありません。実際の販売量の反応は、競合、顧客の感度、タイミングによって異なります。」
ステップ8:分析の提示
出力を以下のように構成します。
出力を、事業名と日付範囲を示すH2ヘッダーで構成し、 その後に4つのセクションを続けます。ユニットエコノミクス概要表(製品/サービス、 収益、売上原価、粗利益、マージン率)、コンテキストとベンチマークセクション (2〜4文)
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Margin Analyzer
Status: MVP draft · Owner: JJ · Version: 1.1.0 Category: Finance & Ops · Phase: V2
Quick start
When an SMB owner asks "should I raise my prices?" or "are my margins okay?", this skill:
- Identifies what to analyze — which products/services are in scope
- Pulls cost data from QuickBooks (COGS, direct expenses)
- Pulls revenue data from PayPal or Square (transaction history)
- Computes unit economics — revenue, COGS, gross margin, margin % per item
- Benchmarks against context — inflation, cost changes, industry norms if available
- Builds pricing scenarios — shows what happens to revenue and margin at +5%, +10%, +15% price changes, using historical correlation where data allows
- Presents the analysis — no price recommendation; the owner decides
The output equips the owner to make their own pricing call with real data behind it.
Workflow
Step 1: Pre-flight check
QuickBooks: Call company-info to verify the industry field is populated. If it's missing or "Unknown", ask: "I need your business category to pull relevant benchmarks. What industry are you in?" Then call quickbooks-profile-info-update.
PayPal: No pre-flight needed, but PayPal rate-limits on rapid calls — see reference/gotchas.md.
No connectors: Offer CSV upload as a fallback. The skill can work from exported transaction and expense data. The expected CSV schema is in reference/csv-schema.md.
Step 2: Clarify scope
Ask the owner two questions:
-
"Which products or services do you want to analyze?"
- All of them, or a specific subset?
- If they say "all," confirm the connector has enough data to be meaningful before pulling everything.
-
"What metric matters most to you?"
- Gross margin (revenue minus direct costs)?
- Net margin (after all expenses)?
- Revenue per unit?
- Their answer shapes how you present the output.
Step 3: Pull cost data (QuickBooks)
Fetch from QuickBooks using profit-loss-quickbooks-account:
- Date range: Last 12 months (or full history if less is available)
- Extract: Cost of goods sold by product/service line, direct expenses
If QuickBooks isn't connected, ask the owner for:
- A cost breakdown by product/service line (materials, labor, direct delivery costs per item)
- Any known cost changes in the last 6–12 months
If QuickBooks is connected but COGS = $0 across all periods, do not use $0 as the cost input. Surface this to the owner:
"QuickBooks shows no cost of goods sold recorded for this period. To compute meaningful margins, I need a cost breakdown by product or service line — not a single average for the whole business. For each item you want analyzed, what does it cost you to deliver it? Materials, direct labor, any direct expenses per item. Even rough figures work."
Flag this limitation in the Data Quality Notes section of the final output.
Step 4: Pull revenue data (PayPal / Square)
Fetch from list_transactions (PayPal) or make_api_request (Square):
- Date range: Match the cost data window (last 12 months)
- Extract: Transaction amount, item/service name, date, quantity if available
If you hit PayPal rate limits, pause 30 seconds and retry once. If still blocked, offer: "PayPal is temporarily rate-limited. Want to switch to Square or upload a CSV instead?"
If only one data source is available, note the limitation in the output.
Step 5: Compute unit economics
For each product/service in scope, calculate:
| Metric | Formula |
|---|---|
| Revenue | Sum of transaction amounts for the item |
| COGS | Cost data from QB or owner-provided |
| Gross Profit | Revenue − COGS |
| Gross Margin % | (Gross Profit ÷ Revenue) × 100 |
| Units Sold | Count of transactions (if available) |
| Revenue per Unit | Revenue ÷ Units Sold |
| Cost per Unit | COGS ÷ Units Sold |
Flag any item where margin is below 20% — not as a recommendation, but as a data point worth the owner's attention.
Step 6: Benchmark
Layer in context to make the numbers meaningful:
- Inflation: Note relevant cost trends if discussing input cost increases. Example: "Your input costs rose ~X% over this period while your prices held flat — that compressed margin by Y points."
- Industry benchmarks: Use the QuickBooks industry profile to surface rough gross margin norms for their category. See
reference/industry-benchmarks.md. - Historical comparison: If 24+ months of data is available, compare this year's margins to last year's to surface the trend direction.
Handle low-data gracefully: if fewer than 6 months of transactions exist, omit the elasticity section and note: "You need at least 6 months of pricing history to estimate how volume responds to price changes. I'll show scenario math instead."
Step 7: Pricing scenarios
Build a table for each product/service showing three price-change scenarios:
| Scenario | New Price | Projected Revenue* | Gross Margin % |
|---|---|---|---|
| +5% | $X | $Y | Z% |
| +10% | $X | $Y | Z% |
| +15% | $X | $Y | Z% |
How to compute projected revenue:
- If 6+ months of history: Estimate volume response using historical data. If a past price change exists, compute observed elasticity:
Elasticity = % change in volume ÷ % change in price. Apply that to project volume at the new price. - If insufficient history: Show three volume assumptions (−0%, −5%, −10%) and let the owner pick what seems realistic.
Add a note: "These are projections based on available data, not guarantees. Actual volume response depends on competition, customer sensitivity, and timing."
Step 8: Present the analysis
Structure the output as:
Structure the output with an H2 header showing the business name and date range, followed by four sections: a Unit Economics Summary table (product/service, revenue, COGS, gross margin, margin %), a Context and Benchmarking section (2-4 sentences on inflation, cost shifts, industry norms), Pricing Scenarios (scenario table per product, or top 3-5 if many), and Data Quality Notes (flag any limitations such as partial data, missing COGS, or short history).
Keep it factual. Do not say "you should raise prices" or "consider lowering your price." The owner is looking at data to make their own call.
Scope boundary
This skill surfaces data. It does not recommend a price.
If the owner asks "so what should I do?" — respond with: "I can show you what the data suggests, but the pricing decision is yours. Would you like me to model any additional scenarios?"
This is intentional. Pricing decisions have real business consequences and depend on context only the owner knows (competitive positioning, customer relationships, cash needs). The skill's job is to make sure they're looking at real numbers when they decide.
Connectors
Primary: QuickBooks, PayPal Also supported: Square, Brex · Desktop (CSV/export)
Reference files
reference/gotchas.md— common pitfalls (data gaps, elasticity traps, margin math errors)reference/industry-benchmarks.md— gross margin ranges by SMB categoryreference/csv-schema.md— expected columns when the owner uploads a CSVreference/examples/— worked scenarios (retail, services, product-based)