N8n cli cost

From 8Dvibes/n8n-cli · View interactive version

N8n cli cost is an AI agent skill from the GitHub repository 8Dvibes/n8n-cli. Analyze n8n execution costs and usage patterns. Finds top consumers, hourly distribution, and triggers firing too often. Use when investigating high usage, before billing reviews, or optimizing execution counts.

How to use this skill

Skill file

/n8n-cli-cost — n8n Execution Usage & Cost Analysis

Pull execution counts grouped by workflow and surface the top consumers, suspicious patterns, and obvious wins (triggers firing too often).

Procedure

  1. Pull a representative slice of executions:
  1. Group by workflow:
  1. Top consumers table:
  1. Hourly distribution:
  1. Spammer detection — flag any workflow running:
  1. Schedule trigger sanity check — for each workflow with a Schedule Trigger, fetch the workflow JSON (n8n-cli wf get <id>), inspect the cron expression, and flag:

Output format

## n8n Cost Analysis — [profile] — last [N] days

### Summary
- Total executions: N
- Success / error / waiting: N / N / N
- Top single workflow: [name] (N executions = X% of total)
- Suspected spammers: N

### Top 10 by execution count
| Rank | Workflow | Executions | Error % | Avg/hr |
|------|----------|------------|---------|--------|
| 1    | ...      | ...        | ...     | ...    |

### Top 10 by error count
[table]

### Hourly distribution
[ASCII bar chart, hour 0-23]

### Spammer flags
| Workflow | Pattern | Recommendation |
|----------|---------|----------------|
| Sync X   | Fires every 60s, 50% errors | Reduce frequency or fix the failing branch first |

### Schedule trigger oddities
| Workflow | Cron | Next run | Notes |
| ...      | ...  | ...      | ... |

### Recommended cost wins
1. ...
2. ...

Tips

⚠️ n8n cloud execution retention caveat

n8n cloud only retains the last N executions in its API (varies by plan, typically 7-30 days). The cost analysis in this skill is based on what's currently in the API window, NOT lifetime totals. If a workflow ran 10,000 times last month but its executions have been pruned, this skill won't see them. For accurate billing analysis on cloud, cross-reference with n8n's billing dashboard. For self-hosted, the analysis is more complete because executions are retained until manually pruned.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.