agentleFS
emtcmcaemtcmca/claude-for-legal-billing/skills/billing-summary/SKILL.md

billing-summary

Skill1 starsChanged 3 months agoMITView on GitHub

Run the billing digest — surface outstanding WIP, stale entries, and budget alerts across all clients and attorneys. Use when you want a quick billing health check, at the start of each month before invoicing, or any time you want to know what's unbilled. Trigger phrases: "billing summary", "what's my WIP", "monthly billing", "billing health check".

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ~/.claude/plugins/config/claude-for-legal/billing/CLAUDE.md.

    line 24
  2. Very specific:

    If --month YYYY-MM was passed, scope all calculations to that month.

    line 28
  3. Very specific:

    Read [billing_data_path]/time-register.yaml.

    line 32
  4. Distinctive:

    If nothing is outstanding, say so explicitly — an all-clear is useful information.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/billing-legal:billing-summary

Runs the same analysis as the billing-summary agent but as an on-demand slash command. For automated monthly runs, use Windows Task Scheduler (or your OS equivalent) to run claude -p "/billing-legal:billing-summary" on a local process that can access the billing data path. Do not use /schedule — that feature runs cloud routines without access to your local or shared filesystem.

Instructions

Preflight - read /billing-legal:billing-guardrails first. It carries the approval gate, the append-only record rule, UTBMS field discipline, and the boundary on what this plugin records rather than decides. Where it conflicts with the steps below, the stricter rule wins.

1. Read config

Read ~/.claude/plugins/config/claude-for-legal/billing/CLAUDE.md. Get billing_data_path. If [PLACEHOLDER] values are present, stop: "Run /billing-legal:cold-start-interview first."

2. Determine scope

If --month YYYY-MM was passed, scope all calculations to that month. Otherwise use the previous full calendar month as the primary period, plus a running total of all current WIP regardless of age.

3. Compute the summary

Read [billing_data_path]/time-register.yaml. If empty or comment-only, report "No entries in the register yet."

Compute for the period (and all-time WIP where noted):

  • Entries logged this period — all entries with a date in the period, any status
  • Invoiced this period — entries with status: billed and invoice_id pointing to an invoice issued in the period (cross-reference invoice-register.yaml)
  • Current WIP (all time) — entries with status: pending or status: approved across all dates
  • Write-offs this period — entries with status: write-off and date in the period
  • AI cost this period — sum of ai_cost_usd where non-null and date in period

Check for:

  • Stale pending entries — status: pending with date older than 30 days (at risk of aging out or being disputed)
  • Budget warnings — clients where budget_billed + WIP ≥ [Budget warning threshold]% of budget_cap. Read the threshold from the config (default 75 if absent); do not hardcode it.
  • Clients with approved entries — ready to invoice now

4. Post the report

## Billing Digest — [Month or "as of today"]

**WIP summary:**
🟡 [N] pending entries  ·  [Nh]  ·  $[total]
🟢 [N] approved entries  ·  [Nh]  ·  $[total] — ready to invoice

**[Period] invoiced:** $[total]  ([N] invoices)

**AI cost [period]:** $[total]  *(firm reference — not billed to clients)*

---

**Action needed:**
- [ ] [Client] — [N] approved entries totaling $[amount] ready to invoice → `/billing-legal:invoice-generate [slug]`
- [ ] [Client] — budget at [pct]% ($[amount] of $[cap]) — consider flagging to client
- [ ] [N] entries older than 30 days not reviewed → `/billing-legal:wip-review`

Run `/billing-legal:billing-report` for the full breakdown.

If nothing is outstanding, say so explicitly — an all-clear is useful information.

What this skill does not do

  • Modify the register — it reads and reports only
  • Invoice clients — use /billing-legal:wip-review then /billing-legal:invoice-generate
  • Replace /billing-legal:billing-report — this is a digest; billing-report gives the full per-client and per-attorney breakdown

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.