cost-optimization
Use when the user wants to reduce token, compute, or infrastructure costs. Covers context window budget, MCP selection, caching, model routing, and query optimization.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- cost-optimization
- triggers
- [ "user", "model" ]
- description
- Use when the user wants to reduce token, compute, or infrastructure costs. Covers context window budget, MCP selection, caching, model routing, and query optimization.
03 SKILL.md 正文
Cost Optimization
Reduce token, compute, and infrastructure spend.
When to use
- Token bills are high.
- Need to choose a cheaper model for a subtask.
- MCP servers are bloating context.
- Caching or routing can save cost.
Core protocol
- Measure current cost. Tokens per request, model tier, cache hit rate.
- Audit context usage. Use
mcp-context-auditto find heavy MCP tool definitions. - Right-size effort. Use
swe-2-max/swe-2-flash-high/swe-2-flash-mediumfor subagents andswe-2-highfor the free primary model; use paid models only when explicitly approved. After the SWE-2 free window closes (2026-11-30),swe-2-flash-mediumis the only permanent-free variant. - Add caching. Reuse previous tool outputs and summaries where safe.
- Shorten prompts. Remove unused context, prefer file snippets over full reads.
- Re-measure. Compare cost before and after.
Context and loop cost controls
- Subagents first. Delegate heavy exploration to
swe-2-maxsubagents; keep the main context lean. - Token limit. Use
tokens-limitor equivalent budget guard when available; stop if the threshold is exceeded. - Clear vs compact. Default to
clearbetween unrelated tasks;compactonly when continuity is required. Compaction is lossy. - Parallelism. Limit concurrent subagents to 1-3. If a task suggests more than 3, alert the user and ask for approval.
- Loops cost money. Every loop iteration increases token count. Cap retries, bounded loops, and unnecessary polling.
See also
mcp-context-audit- MCP server context-window cost.context-window-hygiene- context-window management andclear/compactdecisions.cost-optimization- general token, compute, and infrastructure spend.
Output rule
- Report tokens/cost before and after, and the commands used to measure.
04 同仓库更多 Skills
montador-de-ideias
Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.
git-github-adaptive-engineering
Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.
adaptive-agenda-calendar-routine-engine
Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.
demo
Use when demonstrating a skill in a fixture project.
duplicate-skill
Use when testing duplicate skill name detection.
duplicate-skill
Use when testing duplicate skill name detection.