What problem does it solve?
When analyzing token costs in claude-flow, there is no MCP tool that wraps the token optimizer's compact-context API, so engineers cannot easily see how much context compaction saves for a given query. This Skill shells a Node one-liner to call getTokenOptimizer().getCompactContext() and reports the bridge-reported tokensSaved value.
Core Features & Use Cases
- Compact context retrieval: Invokes
getCompactContext(query) from @claude-flow/integration via a Node script and prints a markdown summary plus a JSON line.
- Graceful fallback: When
agentic-flow is not installed, the bridge returns inert results (tokensSaved: 0, empty memories) and the skill exits cleanly with a clear message.
- Honest metrics reporting: Carries forward the disclaimer that
tokensSaved is a heuristic (query tokens minus compact prompt tokens), not a baseline-measured saving.
- Use Case: A cost engineer wants to check how many tokens ReasoningBank compaction saves for the query "authentication refactor" — run the skill with that query and read the markdown table of memories retrieved, tokens saved, and cache hit rate.
Quick Start
Ask the AI to run the cost compact context skill with your query, for example: get compact context token savings for the query "authentication refactor".