Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ofershap/cursor-usage/cursor-cost-optimizationnpx skills add ofershap/cursor-usage --skill cursor-cost-optimizationgit clone --depth 1 https://github.com/ofershap/cursor-usageWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00036 | $0.01088 |
| Opus 5 | $0.00018 | $0.00544 |
| Sonnet 5 | $0.00007 | $0.00218 |
| Haiku 4.5 | $0.00004 | $0.00109 |
Grade A, and why
cursor-cost-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- cursor-cost-optimization — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Cost Optimization
You have access to Cursor Enterprise usage data through the cursor-usage MCP server. This skill teaches you how to identify cost-saving opportunities and recommend actionable changes.
Cost Optimization Framework
Step 1: Understand the Spend Profile
Call get_team_overview to get the baseline, then:
-
Identify the spend distribution — Is spend concentrated in a few users or spread evenly?
- If top 10% of users account for >50% of spend → focus on those users
- If spend is evenly distributed → focus on model selection policies
-
Identify the cost driver — Is it model choice, volume, or both?
- Call
get_model_usageto see which models dominate - Premium models (Opus, GPT-5) at 10-50x the cost of standard models (Sonnet, GPT-4o)
- A team of 50 where 5 people use Opus can spend more than the other 45 combined
- Call
Step 2: Model Selection Optimization
The single highest-impact cost lever is model selection.
| Task Type | Recommended Model Tier | Why |
|---|---|---|
| Code completion / tabs | Budget (Flash) | High volume, low complexity, latency-sensitive |
| Inline edits (Cmd+K) | Standard (Sonnet, GPT-4o) | Good balance of quality and cost |
| Chat conversations | Standard | Most questions don't need frontier models |
| Agent mode (complex tasks) | Premium (Opus) only when needed | Reserve for genuinely complex multi-step work |
| Code review | Standard | Pattern matching, not creative generation |
Key insight: Most developers default to the "best" model out of habit, not necessity. 80%+ of requests can be handled by standard-tier models with no noticeable quality difference.
Step 3: Spend Limits
Use set_spend_limit to set guardrails:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 87 lines · 36 tokens per session scan A 2ebdedc6c132
cursor-cost-optimization is a skill published in the GitHub repository ofershap/cursor-usage (8 stars, last pushed 6mo ago), licensed MIT. It adds 36 tokens to every session and 1,088 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
release
Use when the user asks to release, publish, or version-bump harness-score — covers the npm package, the Cursor plugin, and the docs, in the right order.
deploy
Use when the user asks to deploy or release the sample app to production; covers the full checklist from tag to smoke test.
repo-context
Use repo-context-mcp tools to map, search, and pack repository context before large edits or PR review.
MCP Integration Assistant
Helps design and implement Model Context Protocol (MCP) server integrations for AI agents.
MCP Server Builder
Step-by-step guidance for creating a new MCP server with FastMCP or the TypeScript SDK — tool definitions, resource handlers, error responses, and usage examples.
run-user-interviews
Run real user interviews (voice or text) through Usercall and return themes with verbatim quotes. Use when the user wants qualitative feedback, onboarding research, usability tests, prototype review, or to talk to real users instead of guessing.