Skip to main content

cost-summary

Single-shot programmatic dump of all cost data — total spend, per-tier, top session, budget status, federation aggregate. JSON or markdown.

설치로 이동

소스 정보

저장소
ruvnet/ruflo
최근 소스 활동
2026년 5월 5일 04:11
감지된 SKILL.md 언어
영어
스타
73,010
포크
8,665

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
cost-summary
description
Single-shot programmatic dump of all cost data — total spend, per-tier, top session, budget status, federation aggregate. JSON or markdown.
argument-hint
[--format json|markdown]
allowed-tools
Bash
# Cost Summary A stable single-call interface that other plugins / scripts / dashboards can shell out to and parse. ADR-0002 considered exposing `cost_report` / `cost_summary` as proper MCP tools but **deferred that** — adding MCP tools requires modifying `@claude-flow/cli` source, out of scope for plugin-local work. This script is the equivalent: same data, exposed via a stdout JSON contract. ## When to use - Another plugin needs a snapshot of cost state — it shells out to `summary.mjs --format json` and parses. - A dashboard / Slackbot fetches a one-line cost rollup. - Quick "where am I right now?" view that pulls from every cost-tracker source (cost-tracking + federation-spend). ## Output contract (JSON, stable) ```json { "exportedAt": "<ISO>", "total_cost_usd": 1546.36, "sessionCount": 1, "conversationCount": 1, "byTier": { "haiku": 0, "sonnet": 0, "opus": 1546.36, "unknown": 0 }, "byModel": { "claude-opus-4-7": { "tier": "opus", "cost_usd": 1546.36, "messages": 1597, "input_tokens": 3090, "output_tokens": 3295940, "cache_creation_input_tokens": 10659599, "cache_read_input_tokens": 732833690 } }, "topSession": { "sessionId": "1dba3b8c-...", "total_cost_usd": 1546.36, "messageCount": 1597 }, "budget": { "budget_usd": 2500.00, "setAt": "<ISO>", "spent_usd": 1546.36, "utilization": 0.6185, "level": "INFO" }, "federation": { "eventCount": 0, "peerCount": 0, "totalUsd24h": 0 } } ``` ## Steps ```bash # Markdown (default) node plugins/ruflo-cost-tracker/scripts/summary.mjs # JSON for programmatic consumption node plugins/ruflo-cost-tracker/scripts/summary.mjs --format json ``` Optional env: `SUMMARY_NAMESPACE=cost-tracking`, `SUMMARY_FED_NAMESPACE=federation-spend`, `SUMMARY_FORMAT=json`. ## Cross-references - `cost-report` — narrative report (per-agent / per-model lens; uses same data) - `cost-export` — pushes to Prometheus / webhook (this skill is pull-style; export is push-style) - ADR-0002 §"Decision" — explicitly defers proper MCP-tool registration to a future ADR
GitHub에서 보기