Legal Spend logo

Legal Spend

Organization
panaversity
legal-spend

Legal spend analytics, anomaly detection, and benchmarking. Analyses outside counsel invoices by matter type, law firm, and business unit. Flags billing anomalies and produces quarterly spend reports with rate benchmarking against market data.

Overview

Publisherpanaversity
Repositoryagentfactory-business-plugins
Skill namelegal-spend
Stars
37
Forks
19
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by panaversity on GitHub. Read the source before you install it.

Installation

Install the Legal Spend AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/panaversity/agentfactory-business-plugins/tree/main/legal-ops/skills/legal-spend
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/panaversity/agentfactory-business-plugins.git /tmp/agentfactory-business-plugins
mkdir -p .claude/skills
cp -r /tmp/agentfactory-business-plugins/legal-ops/skills/legal-spend .claude/skills/legal-spend
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Legal Spend in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Legal Spend on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Legal Spend is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Legal Spend -- Analytics, Anomaly Detection, and Benchmarking

DATA SOURCES (connect via MCP)

  • Accounts payable system (invoice data)
  • Matter management system (matter codes, descriptions, status)
  • E-billing system (if deployed: Brightflag, Legal Tracker, eBillingHub)
  • Budget system (approved matter budgets)

ANALYSIS DIMENSIONS

By Matter Type:

  • Transactional (M&A, financing, commercial contracts)
  • Litigation and disputes
  • Regulatory and compliance
  • Employment
  • IP prosecution and licensing
  • General corporate / governance

By Law Firm / Provider:

  • Total spend per firm
  • Effective blended rate (total spend / total hours)
  • Budget vs. actual variance per matter
  • Write-off rate (billed vs. collected)
  • Billing realisation rate

By Business Unit:

  • Which business units generate the most legal spend?
  • Spend per GBP/USD of revenue by business unit
  • Ratio of internal legal cost vs. external legal cost

ANOMALY DETECTION RULES -- FLAG FOR REVIEW IF:

  • Invoice total exceeds matter budget by >20% without documented explanation
  • Effective hourly rate >15% above agreed rates without written authorisation
  • Invoice includes time entries for >12 hours in a single day
  • Invoice submitted >90 days after work performed
  • Same task described in multiple time entries across consecutive days (potential duplication)
  • Significant increase in billings in a matter's final month (common pattern before matter close -- always review)
  • Paralegal or trainee time billed at associate rates
  • Multiple partners billing to the same low-complexity matter
  • Research time exceeds 30% of total matter hours on a well-established area of law (possible training at client's expense)
  • Block billing (single time entry covering multiple tasks without breakdown) -- request itemisation before payment approval

BENCHMARKING COMPARISON METHOD

To compare firm rates against market:

  1. Collect agreed rates from each panel firm (engagement letter / rate card)
  2. Calculate effective blended rate per firm: total fees / total hours
  3. Compare effective rate against benchmark reference points (below)
  4. Flag any firm where effective rate exceeds benchmark by >20%
  5. For each flagged firm, check: matter complexity, seniority mix, outcomes
  6. Present comparison to GC with context -- do not draw conclusions without understanding matter complexity and outcomes

Rate comparison output:

FirmAgreed RateEffective RateBenchmarkVarianceFlag
[X]GBP [X]/hrGBP [X]/hrGBP [X][+/-X%][Y/N]

BENCHMARK REFERENCE POINTS (general; update with current market surveys)

UK (London) Senior Associate -- Magic Circle: GBP 450-650/hr UK (London) Senior Associate -- Silver Circle/Top50: GBP 300-450/hr UK (Regional) Senior Associate: GBP 200-350/hr US (NY/CA) Senior Associate -- AmLaw 100: USD 700-1,100/hr In-house equivalent (all-in, UK mid-level): GBP 120,000-180,000/yr

OUTPUT FORMAT

LEGAL SPEND ANALYSIS -- [Period]

SUMMARY Total spend: GBP [X] vs. prior period: [+/-X%] vs. budget: [+/-X%]

BY FIRM (top 5) [Firm] GBP [X] Eff. rate: GBP [X]/hr vs. budget: [+/-X%]

ANOMALIES FLAGGED: [N] [Item] -- [Anomaly description] -- [Recommended action]

============================================ NOTE: Billing anomalies require discussion with the relevant partner before any payment dispute is raised.

OUTPUT FORMAT: QUARTERLY SPEND REPORT

QUARTERLY LEGAL SPEND REPORT -- Q[N] [Year]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Prepared: [date]
Period: [start date] -- [end date]

EXECUTIVE SUMMARY:
Total external spend: GBP [X] (vs Q[N-1]: [+/-X%])
Total matters active: [N]
Budget utilisation: [X%] of annual budget consumed YTD
Top spending area: [matter type]

SPEND BY MATTER TYPE:
| Matter Type       | Spend     | % of Total | vs Prior Q |
| ----------------- | --------- | ---------- | ---------- |
| [each type]       | GBP [X]   | [X%]       | [+/-X%]    |

PANEL FIRM PERFORMANCE:
| Firm  | Spend     | Eff. Rate | Budget Var | Anomalies |
| ----- | --------- | --------- | ---------- | --------- |
| [X]   | GBP [X]   | GBP [X]   | [+/-X%]    | [N]       |

ANOMALIES REQUIRING REVIEW: [N]
[list with recommended actions]

FORECAST:
Projected annual spend: GBP [X] (based on YTD run rate)
vs annual budget: [+/-X%]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALL OUTPUTS REQUIRE REVIEW BY LICENSED ATTORNEY BEFORE ACTION

NEVER DO THESE

  • NEVER raise a formal billing dispute with a law firm without GC authorisation
  • NEVER characterise attorney work as inappropriate without legal review of context
  • NEVER share firm-specific spend benchmarking externally without GC and firm consent
  • NEVER use spend data to make personnel decisions about external counsel without first consulting GC

ALL OUTPUTS REQUIRE REVIEW BY LICENSED ATTORNEY BEFORE ACTION

Frequently asked questions

What does the Legal Spend AI skill do?

Legal spend analytics, anomaly detection, and benchmarking. Analyses outside counsel invoices by matter type, law firm, and business unit. Flags billing anomalies and produces quarterly spend reports with rate benchmarking against market data.

Why use Legal Spend on TypingMind?

Because you install it once and use it with any model. Legal Spend is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Legal Spend in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/panaversity/agentfactory-business-plugins/tree/main/legal-ops/skills/legal-spend. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Legal Spend?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Legal Spend?

As many as you like. As long as a model supports skills, you can use Legal Spend with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Legal Spend AI skill free?

Yes. It is published on GitHub by panaversity under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇