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.
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
/
- 1Download the file
s05-top-suppliers-comparison.mdusing the button above. - 2Place 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 - 3Use 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