/thinking-frameworks-skills:recurring-charge-detectorfrom thinking-frameworks-skills
Clusters transaction history by merchant and cadence to detect subscriptions, recurring bills, and paychecks. Computes annualized cost and flags dormant or drifted charges.
Ships in thinking-frameworks-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A subscription audit is mostly the same question asked many ways: which charges arrive on a clock? This skill clusters historical transactions by merchant + cadence + typical amount, requires ≥ 3 confirming occurrences before promotion, and tracks each cluster's lifecycle (active → suspected_dormant → cancelled).
It computes annualized cost for each active recurring entry — the single most useful number in a subscription audit ("you are spending $191 a year on Netflix").
The caller provides:
transactions — array with {id, account_id, date, merchant, amount_cents, category, subcategory}.existing_recurring — the complete current recurring.json registry, including all lifecycle states, stable IDs, calendar rules, contributing transaction IDs and prior cycle assessments; never pass only the active view.lookback_days (default 540, ~18 months) — only transactions within this window are clustered.today — ISO date for status calculations.| Cadence | Interval (days) | Tolerance |
|---|---|---|
weekly | 7 | ±2 |
biweekly | 14 | ±3 |
monthly | 30 | ±4 |
quarterly | 91 | ±10 |
semiannual | 182 | ±14 |
annual | 365 | ±21 |
If the inter-arrival times don't fit any of the above with the listed tolerance, mark cadence: "irregular" and do not promote.
Recurring Detection Progress:
- [ ] Step 1: Group transactions by merchant, account, direction and series
- [ ] Step 2: For each group with >= 3 transactions, sort by date
- [ ] Step 3: Compute inter-arrival deltas; classify cadence
- [ ] Step 4: Classify amount stability from coefficient of variation
- [ ] Step 5: Promote to active if cadence + amount + occurrences pass
- [ ] Step 6: Compute next_expected_date and annualized cost
- [ ] Step 7: Diff against existing_recurring; emit transitions
- [ ] Step 8: Detect dormant (missed expected date by > tolerance)
Group by (merchant, account_id, sign(amount_cents)) and separate distinct cadence/amount series. Opposite-sign payments/refunds cannot cancel into the same mean. Zero-value rows are not evidence of a recurring cash flow. Subscriptions can split across accounts; treat each account as its own series. (One Netflix charge that moved from credit card A to credit card B will appear as two clusters; the agent layer reconciles them.)
Drop groups with < 3 transactions. They cannot be promoted yet — surface them as candidates[] with evidence_count so the user knows what's accumulating.
Compute deltas d_i = date[i+1] - date[i] in days. Classify cadence using the table above. Acceptance rule:
> 2× nominal) only if it's followed by re-anchoring at the original cadence — this is normal for "skipped a month" patterns.If multiple cadences are plausible, pick the one with tighter fit (smallest standard deviation of deltas).
Compute mean amount μ and standard deviation σ of the cluster's amounts.
σ / |μ| ≤ 0.05 → "fixed" (e.g., Netflix $15.99 every month).σ / |μ| ≤ 0.20 → "variable_low" (utilities, where amount drifts seasonally).σ / |μ| ≤ 0.40 → "variable_high" (e.g., grocery delivery — flag but allow).σ / |μ| > 0.40 → reject as recurring (probably a misclustered general merchant).Record signed amount_cents_typical = round(μ) (negative outflow, positive inflow) and nonnegative amount_cents_variance = round(σ); the legacy variance field contains standard deviation in cents, not cents squared. Include transaction_ids for every contributing occurrence so the forecaster excludes those same rows from discretionary spend. No division by zero: a zero mean cannot be promoted.
Promote to status: "active" if:
occurrences ≥ 3.cadence is one of the named cadences (not irregular).fixed or variable_low (or variable_high with a warning).Use calendar recurrence, not repeated 30/91/365-day additions: weekly/biweekly add 7/14 days; monthly/quarterly/semiannual/annual advance 1/3/6/12 calendar months from the original anchor. Preserve the anchor day or explicit end-of-month intent, clamping only in short months; February clamping must not shift later months permanently. Record the calendar rule and update next_expected_date from it. Annual promotion still needs three actual observations: a 540-day lookback may be insufficient, so request older evidence or keep the item a candidate rather than manufacturing a third occurrence.
annualized_cost_cents:
| Cadence | Multiplier |
|---|---|
| weekly | 52 |
| biweekly | 26 |
| monthly | 12 |
| quarterly | 4 |
| semiannual | 2 |
| annual | 1 |
annualized_cost_cents = max(0, -amount_cents_typical) × multiplier is a nonnegative expense magnitude. annualized_income_cents = max(0, amount_cents_typical) × multiplier is separate income. Keep amount_cents_typical signed for cash-flow arithmetic; do not net paychecks against subscription cost summaries.
For each existing recurring.json entry, find the matching new cluster (by merchant + account_id + direction + cadence/series identity). Update fields:
last_seen, occurrences, amount_cents_typical, next_expected_date.abs(new_typical - old_typical) / abs(old_typical) > 0.15 (a zero prior amount requires review) → emit event: "amount_changed" with old and new.For new clusters not in existing → emit event: "new_recurring". Preserve existing IDs; assign new IDs using account, merchant, direction and series identity, not merchant alone. Distinct accounts/series must not overwrite one another. Merge updates into the complete existing registry by ID; retain unmatched entries and their history, including candidates, paused, suspected-dormant and cancelled entries. A limited lookback or missing import is not deletion evidence. Preserve user-confirmed paused/cancelled states until an authorized transition; detection alone must not silently reactivate them.
For each active or suspected_dormant entry, expand its stored calendar rule into distinct expected cycles. For every elapsed cycle whose tolerance window has closed, require complete account/source coverage for that window through the check date. Missing imports leave the lifecycle state and miss count unchanged; mark the check unassessed with the missing interval.
Persist each entry's cycle_history with cycle ID (recurring_id, expected_date), expected date, observed/missed assessment and coverage evidence, plus consecutive_missed_cycles. Count each covered missed cycle once: rerunning the same day cannot create a second miss. Reconcile late imports against the same cycle before updating consecutive misses.
status: "suspected_dormant", event: "missed_expected".event: "likely_cancelled" and propose cancellation; retain suspected_dormant until confirmation.active; retain cycle history for audit.The agent layer confirms before flipping to cancelled.
candidate (< 3 occurrences)
↓ [3rd occurrence on cadence]
active
↓ [missed expected date] ↓ [user confirms]
suspected_dormant ─ [resumed] → active paused
↓ [missed twice in a row]
suspected_dormant (likely_cancelled proposal)
↓ [user confirms]
cancelled
Return registry[] as the complete next persisted state, preserving all prior entries and lifecycle/cycle history except explicitly authorized changes. This is the only output that may replace recurring.json. active[] is a derived view of registry entries whose status is exactly active; candidates[] and events[] are reporting views, not replacement state. The views must reference the same stable IDs and agree with the registry. If supplied state is incomplete or a required external schema cannot preserve these fields, report the blocked write and return proposed changes without dropping history.
The synthetic example contains one active entry and one candidate; both remain in the full registry:
{
"registry": [
{
"id": "rec_acc_cc_001_netflix_out_monthly",
"merchant": "Netflix",
"account_id": "acc_cc_001",
"category": "entertainment.streaming",
"amount_cents_typical": -1599,
"amount_cents_variance": 0,
"cadence": "monthly",
"calendar_rule": {
"anchor_date": "2025-11-14",
"month_interval": 1,
"anchor_day": 14,
"end_of_month": false
},
"first_seen": "2025-11-14",
"last_seen": "2026-01-14",
"occurrences": 3,
"next_expected_date": "2026-02-14",
"annualized_cost_cents": 19188,
"annualized_income_cents": 0,
"transaction_ids": [
"tx_netflix_01",
"tx_netflix_02",
"tx_netflix_03"
],
"status": "active",
"cycle_history": [],
"consecutive_missed_cycles": 0
},
{
"merchant": "Blue Bottle Coffee",
"account_id": "acc_cc_001",
"evidence_count": 2,
"needed": 3,
"reason": "below promotion threshold",
"id": "rec_acc_cc_001_blue_bottle_out_candidate",
"status": "candidate",
"transaction_ids": [
"tx_blue_bottle_01",
"tx_blue_bottle_02"
],
"cycle_history": [],
"consecutive_missed_cycles": 0
}
],
"active": [
{
"id": "rec_acc_cc_001_netflix_out_monthly",
"merchant": "Netflix",
"account_id": "acc_cc_001",
"category": "entertainment.streaming",
"amount_cents_typical": -1599,
"amount_cents_variance": 0,
"cadence": "monthly",
"calendar_rule": {
"anchor_date": "2025-11-14",
"month_interval": 1,
"anchor_day": 14,
"end_of_month": false
},
"first_seen": "2025-11-14",
"last_seen": "2026-01-14",
"occurrences": 3,
"next_expected_date": "2026-02-14",
"annualized_cost_cents": 19188,
"annualized_income_cents": 0,
"transaction_ids": [
"tx_netflix_01",
"tx_netflix_02",
"tx_netflix_03"
],
"status": "active",
"cycle_history": [],
"consecutive_missed_cycles": 0
}
],
"candidates": [
{
"merchant": "Blue Bottle Coffee",
"account_id": "acc_cc_001",
"evidence_count": 2,
"needed": 3,
"reason": "below promotion threshold",
"id": "rec_acc_cc_001_blue_bottle_out_candidate",
"status": "candidate",
"transaction_ids": [
"tx_blue_bottle_01",
"tx_blue_bottle_02"
],
"cycle_history": [],
"consecutive_missed_cycles": 0
}
],
"events": [
{
"type": "amount_changed",
"id": "rec_acc_cc_001_netflix_out_monthly",
"old_cents": -1299,
"new_cents": -1599,
"delta_pct": 23.1
}
],
"summary": {
"active_count": 1,
"annualized_cost_total_cents": 19188,
"candidates": 1,
"dormant": 0
}
}
merchant field from the categorizer, not description_raw. Different rendering of the same merchant string would otherwise split a real recurring into two phantom ones.income.salary; track them. The cash-flow forecaster needs both sides.variable_low for utilities. Do not propagate variance noise into the forecaster — use amount_cents_typical (the mean).category: savings_investment.* as exempt from recurring promotion unless the cadence is annual or longer.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lyndonkl/claude --plugin thinking-frameworks-skills270 skills in this plugin
/abstraction-concrete-examplesBuilds structured abstraction ladders that translate high-level principles into concrete, actionable examples across 3-5 levels. Bridges communication gaps, reveals hidden assumptions, and tests whether abstract ideas work in practice. Use when explaining concepts at different expertise levels, moving between abstract principles and concrete implementation, identifying edge cases by testing ideas against scenarios, designing layered documentation, decomposing complex problems into actionable steps, or bridging strategy-execution gaps./academic-letter-architectGuides the creation of evidence-based academic recommendation letters, reference letters, and award nominations that combine concrete examples, meaningful comparisons, and genuine enthusiasm. Use when writing recommendation letters for students, postdocs, or colleagues, or when user mentions recommendation letter, reference, nomination, letter of support, endorsement, or needs help with strong advocacy and comparative statements./adr-architectureDocuments significant architectural and technical decisions with full context, alternatives considered, trade-offs analyzed, and consequences understood. Creates a decision trail that helps teams understand why decisions were made. Use when choosing between technology options, making infrastructure decisions, establishing standards, migrating systems, or when user mentions ADR, architecture decision, technical decision record, or decision documentation./adverse-selection-priorProduces a Bayesian prior probability that an offered transaction is +EV for the recipient, given that the counterparty chose to propose it. Applies Akerlof market-for-lemons logic -- if they offered it, they believe it is +EV for them, so the prior that it is +EV for us is materially below 50%. Reusable across trade evaluation, waiver drops (another team dropping a player is also adverse selection), job-offer analysis, M&A, and any "someone offered me this" situation. Use when you receive an unsolicited trade/offer/proposal, analyzing incoming trade prior, evaluating why a counterparty proposed a deal, or when user mentions adverse selection, market for lemons, why did they offer this, incoming trade prior, they proposed it, Bayesian adjustment on received offer./advisory-editA strict advisory-only editing discipline for a writer who dictates ("speaks out") essays and wants help WITHOUT having their voice changed. The editor directs structure, flags grammar, and suggests strategic language — but never modifies the writer's text unless the writer explicitly says "apply" / "make that change" / "rewrite this." Produces a line-referenced, suggestion-only critique where every item is marked the writer's call. Four passes — structural, line (grammar/clarity), voice, pre-publish. Use when reviewing a draft, critiquing a spoken-out article, or doing a pre-publish check. The companion to learning-in-public-voice and the operating manual for the biostat-editor agent./alignment-values-north-starCreates actionable alignment frameworks that give teams a shared North Star (direction), values (guardrails), and decision tenets (behavioral standards). Enables autonomous decision-making while maintaining organizational coherence. Use when starting new teams, scaling organizations, defining culture, establishing product vision, resolving misalignment, creating strategic clarity, or when user mentions North Star, team values, mission, principles, guardrails, decision framework, or cultural alignment.Other plugins' skills for the same job