Top suppliers with year-over-year comparison

Ranks suppliers by spending amount and compares them to the prior period. Uses supplier IDs to ensure consistency across both periods.

↓ Download skill (.md)
85/100Β·πŸ“† MonthlyΒ·BeginnerCFOAP Manager
SuppliersSpend analysisspendesk_analyze_spendget_suppliers

🎯 Skill purpose

Ranks suppliers by spending amount and compares them to the prior period. Uses supplier IDs to ensure consistency across both periods.

πŸ“Š What it produces

Top N suppliers with current period amount, prior period amount, and percentage variance.

⚑ Benefit

Before

Two separate exports then manual VLOOKUP in Excel to reconcile year over year.

After

YoY supplier comparison ranking in a single query, ready for management reviews.



# Instructions β€” Top suppliers with YoY comparison

## ⚠️ Suppliers returned without a name

`spendesk_analyze_spend` groupBy=supplier returns the `key` = **supplier ID only**.
The `name` field is not present in the response.

To display names:
1. Collect all IDs from the top-N suppliers
2. Call `get_suppliers(ids=[id1, id2, ...])` in a single call
3. Join names by ID

## ⚠️ amountChange on the "Others" row

The "Others" row also includes `previousAmount` and `amountChange`. If "Others" grows sharply, the supplier base is expanding faster than the top suppliers.

## Step 1 β€” Top suppliers analysis with comparison

```json
{
  "companyId": "...",
  "fromDate": "YYYY-MM-DD",
  "toDate": "YYYY-MM-DD",
  "groupBy": ["supplier"],
  "compareWithPreviousPeriod": true,
  "limit": 15
}
```

β†’ The previous period is automatically calculated (same duration, immediately before `fromDate`).
β†’ `limit: 15` to see more than the default top-10.

## Step 2 β€” Interpreting compareWithPreviousPeriod

Each row returns:
- `amount`: spend for the current period
- `share`: % of the current total
- `previousAmount`: spend for the previous period
- `amountChange`: % change (positive = increase, negative = decrease)
  - `amountChange: 100` β†’ new supplier (previousAmount = 0)
  - `amountChange: -100` β†’ supplier no longer active (amount = 0)

On the summary (`summary.previousPeriod`):
- `period.from/to`: dates of the comparison period
- `totalAmount`: total for the previous period
- `amountChange`: overall % change

## Step 3 β€” Resolving supplier names

```json
{ "companyId": "...", "ids": ["id1", "id2", "id3", ...] }
```

Join by ID: `{ ...row, name: suppliers.find(s => s.id === row.key)?.name || row.key }`

## Step 4 β€” Identifying anomalies

Alert the user about:
- `amountChange > 500%` β†’ explosive growth (new contract, data entry error?)
- `amountChange < -50%` β†’ sharp decline (termination, project ended?)
- `previousAmount = 0` AND `amount > threshold` β†’ significant new supplier
- "Others" rising sharply β†’ fragmentation of the supplier base

## Live example (real data, Jul 2025 β†’ Jun 2026 vs Jul 2024 β†’ Jun 2025)

Summary:
- Current period: **EUR 16,524,574.27** (7,199 payables)
- Previous period: EUR 17,108,631.54 (5,804 payables)
- **Overall change: -3.4%** (slight decrease)

Notable anomalies:
- Supplier `0qryRtMyYW`: +92,078% (EUR 424 β†’ EUR 391,345) β€” practically new
- Supplier `lt1euqhnunby1f`: +361.5% (EUR 131,938 β†’ EUR 608,940) β€” strong growth
- Supplier `9MCGQweUWi`: -68.3% (EUR 3,001,938 β†’ EUR 951,166) β€” sharp decline
- Supplier `8xs-s358mod4ps`: new (previousAmount=0), EUR 738,607
- "Others": +53.2% (expanding supplier base)

## Example prompt

- "Who are our top 10 suppliers this year vs last year?" β†’ groupBy=supplier, compareWithPreviousPeriod=true, limit=10 + resolve names
- "Are there any suppliers whose spend has exploded?" β†’ filter amountChange > 200%
- "Significant new suppliers this year?" β†’ filter previousAmount=0 AND amount > threshold

How to install this skill

/
  1. 1
    Download the file s05-top-suppliers-comparison.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s05-top-suppliers-comparison.md .claude/s05-top-suppliers-comparison.md
  3. 3
    Use in Claude Code β€” the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
πŸ’‘ Make sure the Spendesk MCP is configured in your .claude/settings.json with the tools spendesk_analyze_spend, get_suppliers.

Similar skills

β˜… Top
95/100Β·πŸ” Ad hocΒ·Expert

MCP coverage audit & gap analysis

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100Β·πŸ” Ad hocΒ·Intermediate

Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

ControllerFinance Analyst
β˜… Top
89/100Β·πŸ” Ad hocΒ·Intermediate

Skill Builder

Aide un client Γ  transformer un besoin mΓ©tier prΓ©cis (contexte, contraintes, format de sortie souhaitΓ©) en un nouveau skill Claude sur mesure, prΓͺt Γ  l'emploi sur le MCP Spendesk

CFOControllerAP Manager