cost-export
하는 일
이 스킬은 기록된 AI 비용 데이터를 다른 모니터링 도구에서 볼 수 있는 형태로 저장합니다. AI 지출을 공용 대시보드에 올리고 싶은 사람을 위한 스킬입니다.
사용하는 경우
- ✓Grafana 등 대시보드에 AI 지출을 표시하고 싶을 때.
- ✓비용 스냅숏을 보고용으로 웹 주소에 보내고 싶을 때.
- ✓비용 데이터를 일정에 따라 정기적으로 새로 고치고 싶을 때.
스킬 링크
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-export/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AI 비용 데이터를 내보내서 대시보드에서 볼 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 저장된 비용 기록을 읽고, Prometheus용 텍스트 파일로 쓰거나 입력한 웹 주소로 JSON 메시지를 보냅니다. 옵션을 주지 않으면 JSON을 화면에 출력합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Cost Export
Pulls every session-* and budget-config-* record from cost-tracking and emits in formats consumable by external observability systems. Without this, cost data lives only inside the AgentDB namespace; with it, the same data lights up dashboards.
When to use
- After any cost-track run, to refresh metrics for Grafana / Datadog / Prometheus.
- Cron-friendly via
/loop 5mto keep external dashboards near-real-time. - One-shot to a webhook for ad-hoc reporting (Slack, custom endpoint).
Steps
Pick a format — textfile collector for Prometheus / Grafana, or webhook POST for everything else:
# Prometheus node_exporter textfile collector node plugins/ruflo-cost-tracker/scripts/export.mjs --prometheus /var/lib/node_exporter/textfile_collector/cost_tracker.prom # Webhook (POSTs JSON; add auth via env) EXPORT_WEBHOOK_HEADER='Authorization: Bearer $TOKEN' \ node plugins/ruflo-cost-tracker/scripts/export.mjs --webhook https://hooks.example.com/cost-tracker # Stdout JSON (default if no flag) node plugins/ruflo-cost-tracker/scripts/export.mjsInspect what's emitted — Prometheus output includes:
cost_tracker_total_usd <gauge> cost_tracker_tier_total_usd{tier="opus|sonnet|haiku"} <gauge> cost_tracker_session_total_usd{session="<8-char>"} <gauge> cost_tracker_session_messages{session="<8-char>"} <counter> cost_tracker_budget_usd <gauge> (if budget configured) cost_tracker_budget_utilization <gauge> (spent / budget)Webhook payload shape — the JSON the webhook receives matches the stdout JSON:
{ exportedAt, sessions: [...], budget, totalUsd, byTier }. Headers may be added viaEXPORT_WEBHOOK_HEADER='K1: V1, K2: V2'(comma-separated).
Env overrides
| Env | Default | Purpose |
|---|---|---|
EXPORT_NAMESPACE |
cost-tracking |
Override target namespace |
EXPORT_WEBHOOK_HEADER |
unset | Comma-separated K: V pairs for webhook auth |
EXPORT_QUIET=1 |
unset | Suppress non-error confirmation output |
Cross-references
cost-track— produces the data this skill exportscost-budget-check— the samecost_tracker_budget_*metrics are alertable in Prometheus- node_exporter textfile collector docs (Prometheus convention) — drop the
.promfile in the collector directory and Prometheus picks it up
자주 묻는 질문
Prometheus 텍스트 파일이란 무엇인가요?
노드 익스포터 수집기가 읽고 대시보드에 보여 줄 수 있는 메트릭 줄이 담긴 일반 파일입니다.
웹훅에 로그인 정보를 추가할 수 있나요?
네. 환경 설정으로 인증 토큰 같은 헤더를 요청과 함께 보낼 수 있습니다.
기본 설정으로 데이터가 외부로 전송되나요?
아닙니다. 파일 또는 웹훅 옵션을 고르지 않으면 JSON을 화면에 출력할 뿐입니다.
상세 정보
작성자의 원본 설명
Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)
repo: ruvnet/ruflo
인기도
- GitHub 스타
- 81k
- 순위
- #1600
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-adaptive-coordinator
81k작업량이 바뀔 때 에이전트 무리를 나누고 재배치해, 작업에 맞는 배치를 고르도록 에이전트를 돕습니다.
agent-agent
81k큰 목표를 순서가 있는 행동 계획으로 나누고, 조건이 바뀌면 다시 계획하도록 에이전트를 가르칩니다.
agent-agentic-payments
81kAI 쇼핑을 위한 지출 위임장을 관리합니다. 지출 상한, 시간 창, 판매자 규칙, 서명된 승인을 포함합니다.
agent-analyze-code-quality
81k에이전트가 파일을 바꾸지 않고, 코드 품질 문제와 코드 냄새, 기술 부채, 리팩터링 아이디어를 찾아 검토하도록 돕습니다.