Skip to main content
skill CX Codex

client-profitability — Claude Code skill: per-client profit

Breaks revenue and direct costs down by client and works out the margin on each. Useful when you cannot tell which accounts actually pay off.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openaccountant/skills --skill client-profitability -a claude-code
Open on GitHub

What client-profitability does

The skill pulls every incoming payment through transaction_search, groups it by client name, then hunts down expenses tied to a specific account — contractors, materials, project licences. Overhead comes from spending_summary and gets spread by revenue share: a client's slice of total revenue times total overhead.

You get a table with revenue, direct costs, allocated overhead, profit and margin per client, plus a total row. Ranking is by margin, not by turnover. Anything under 20% margin gets flagged as a candidate for a price talk or a smaller scope.

The awkward part is attribution. If an expense cannot be tied to a client, it lands in overhead. Revenue-share allocation is simple and rough: a client bringing half your revenue but a fifth of your support tickets is over-allocated. So the skill suggests tracking hours per client too, because time is a cost. No Wilson access? Export bank transactions to CSV and build the pivot table with the formulas it gives.

What it helps with

  • work out margin per client for a period
  • spot accounts that lose money
  • allocate overhead by revenue share
  • decide who gets a price increase and who gets dropped
  • see how many hours a big invoice really eats

Example prompts for the agent

  • Run a client profitability analysis for last quarter
  • Which clients are below 20% margin?
  • Allocate overhead by revenue share and show me the table

How to install client-profitability

1Skills CLI (Vercel)

npx skills add openaccountant/skills --skill client-profitability -a claude-code

2Manually: put the files in place

~/.claude/skills/client-profitability/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/client-profitability/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about client-profitability

How do I install client-profitability in Claude?

Run npx skills add openaccountant/skills --skill client-profitability -a claude-code. The skill lands at ~/.claude/skills/client-profitability/SKILL.md.

What does client-profitability do?

It calculates revenue, direct costs and allocated overhead per client, reports profit and margin, and ranks accounts by margin.

What do I need for it to work?

Access to the Wilson tools: transaction_search for payments and expenses, spending_summary for overhead. Without them you fall back to exporting transactions as CSV and building the spreadsheet yourself.

Source text

SKILL.md · MIT
---
name: client-profitability
description: >
  Analyze revenue and costs per client to find your most profitable accounts.
---

# Client Profitability Analysis

## Overview
Break down revenue and direct costs by client to determine which accounts are most and least profitable. Reveals hidden costs in high-maintenance clients and identifies your highest-value relationships.

## Wilson Tools Used
- `transaction_search` — find all revenue transactions grouped by client/vendor name, and all expenses attributable to specific clients
- `spending_summary` — calculate overhead costs to allocate across clients

## Workflow
1. Ask for the analysis period and list of active clients (or detect from transaction data).
2. Use `transaction_search` to find all incoming payments, grouped by client name or reference.
3. Use `transaction_search` to find all expenses directly tied to each client (contractor costs, materials, software licenses specific to a project).
4. Use `spending_summary` to get total overhead (rent, utilities, general subscriptions).
5. Allocate overhead proportionally by revenue share: Client Overhead = Total Overhead * (Client Revenue / Total Revenue).
6. Calculate per-client profitability:

```
CLIENT PROFITABILITY — [Period]
═══════════════════════════════════════════════════════════
Client          Revenue   Direct    Overhead   Profit   Margin
                          Costs     Alloc.
──────────────────────────────────────────────────────────────
Acme Corp       $15,000   $4,500    $3,750    $6,750    45.0%
Beta LLC        $10,000   $7,200    $2,500      $300     3.0%
Gamma Inc        $8,000   $2,000    $2,000    $4,000    50.0%
Delta Co         $7,000   $1,800    $1,750    $3,450    49.3%
──────────────────────────────────────────────────────────────
TOTAL           $40,000  $15,500   $10,000   $14,500    36.3%
═══════════════════════════════════════════════════════════
```

7. Rank clients by profit margin, not just revenue.
8. Flag clients with margins below 20% as candidates for price renegotiation or scope reduction.

## Without Wilson
1. Export bank transactions as CSV for the analysis period.
2. In a spreadsheet, add a "Client" column. Tag each income and expense row with the client it relates to. Tag overhead expenses as "General."
3. Create a pivot table: Rows = Client, Values = Sum of Income, Sum of Direct Expenses.
4. For overhead allocation, calculate each client's revenue share: `=ClientRevenue/TotalRevenue`.
5. Client Overhead = `=RevenueShare * TotalOverhead`.
6. Client Profit = `=ClientRevenue - DirectCosts - AllocatedOverhead`.
7. Client Margin = `=ClientProfit/ClientRevenue*100`.
8. Sort by margin descending. If you use time tracking (Toggl, Harvest, Clockify), export hours per client and calculate effective hourly rate: `=ClientProfit/HoursWorked`.

## Important Notes
- The hardest part is attributing expenses to specific clients. If you cannot tie an expense to a client, it goes into overhead.
- Time is a hidden cost. A client paying $10,000/month but consuming 80% of your time is less profitable than it appears. Consider tracking hours per client alongside dollars.
- Overhead allocation by revenue share is simple but imperfect. A client generating 50% of revenue but only 20% of support tickets is being over-allocated overhead.
- Use this analysis to decide where to invest sales effort, which clients to fire, and where to raise prices.

© openaccountant · MIT · openaccountant/skills

Similar skills

Everything for Finance and business →

From the same set28

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor