Cost Compact Context
Wraps the bridge's compacted ReasoningBank context for cost queries, reporting heuristic tokens saved.
- CCM score
- 71 of 100
- skills.sh installs
- 727
- GitHub stars
- 82.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers one shell-invoked retrieval:
getTokenOptimizer().getCompactContext()run throughscripts/compact.mjsfrom underv3/ - Reports memories retrieved, bridge-reported tokens saved, agentic-flow availability, and cache hit rate in a markdown table
- Enforces a clean exit with "agentic-flow not installed" when the package is absent, returning zero tokens saved
- Designed for cost-analysis queries where a heuristic saving, not a baseline-measured one, is acceptable
Install
$ npx -y skills add ruvnet/ruflo --skill cost-compact-context -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Cost Compact Context
Wraps getTokenOptimizer().getCompactContext() from @claude-flow/integration for cost-analysis queries. The bridge dynamically imports agentic-flow with graceful fallback: when the package isn't installed, tokensSaved is 0 and the skill exits cleanly. No MCP tool wraps getTokenOptimizer today (ADR-0002 §"Riskiest assumption"); we shell a Node one-liner instead.
Steps
-
Take the query — the single argument.
-
Invoke — run from anywhere under
v3/so@claude-flow/integrationresolves:( cd v3 && node ../plugins/ruflo-cost-tracker/scripts/compact.mjs "<QUERY>" )The script imports
@claude-flow/integration/token-optimizer(canonical export — notdist/token-optimizer.js, which would double the.jsextension via Node's./*exports rule), callsgetCompactContext(query), and prints a markdown summary plus a JSON line viaCOMPACT_QUIET=1.
Details
- Repository
- github.com/ruvnet/ruflo
- Category
- Memory & Context
- First seen
- Jun 3, 2026
Questions
What does the cost-compact-context skill do?
It wraps getTokenOptimizer().getCompactContext() from @claude-flow/integration to retrieve compacted ReasoningBank context for a cost-analysis query. It reports the tokensSaved figure the bridge provides, along with memories retrieved and cache hit rate.
How do I install the cost-compact-context skill?
Run npx -y skills add ruvnet/ruflo --skill cost-compact-context -y in a project. The skill then lets the agent query compacted context and report a markdown summary of the results.
Where does cost-compact-context sit in the Memory & Context category?
It is one of the skills in the Memory & Context category on Claude Marketplaces, alongside handoff and the caveman skills. Its distinct focus is reporting bridge-reported token savings for cost-analysis queries, which is a heuristic rather than a measured baseline.
Does cost-compact-context need agentic-flow installed?
Yes, the bridge dynamically imports agentic-flow for real results. When it is missing, tokensSaved is 0, memories are empty, and the skill exits cleanly with a not-available message.
More from ruvnet/ruflo
All 236- Market Ingest726
- Vector Hyperbolic725
- Browser Replay721
- Browser Form Fill719
- Browser Record719
- Dossier Collect702
- Browser Extract698
- Browser Screenshot Diff697
- Cost Budget Check693
- Browser Auth Flow690
- Adr Verify689
- Cost Track685
- Cost Booster Route684
- Cost Federation684
- Cost Summary684
- Intelligence Transfer684
- Vector Setup684
- Cost Trend683
- Cost Conversation682
- Cost Export681
- Cost Benchmark679
- Cost Booster Edit679
- Browser674
- Witness656
Similar to Cost Compact Context
More Memory & Contextruflo-cost-trackerPluginruvnet/ruflo82.4K starsToken usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations
cost-reportSkillruvnet/ruflo730 installsGenerate per-agent and per-model token and USD cost reports with budget utilization and tier breakdown.
token-optimizerSkillasif2bd/openclaw-token-optimizer397 installsCost-control toolkit that trims OpenClaw agent token spend through lazy loading, model routing, and budgets.
context-optimizationSkillsickn33/agentic-awesome-skills561 installsStrategies for stretching limited context windows through compaction, observation masking, KV-cache reuse, and partitioning.