본문으로 건너뛰기
Skillpedia
기타81k · #1602

cost-health

하는 일

이 스킬은 AI 비용 점검 네 가지를 함께 실행하고 통과 또는 실패 결과를 하나로 보여 줍니다. 자동화 파이프라인에서 비용 관문을 하나로 두려는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓지속 통합 단계에서 비용 점검 하나를 실행하고 싶을 때.
  • ✓예산, 추세, 이상치, 예측을 아우르는 상태 결과 하나를 받고 싶을 때.
  • ✓AI 비용이 비정상으로 보이면 빌드를 실패시키고 싶을 때.

스킬 링크

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-health/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-health/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“AI 지출에 대한 전체 비용 상태 점검 결과를 하나로 정리해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 예산, 소진 속도, 이상치, 예측 점검을 동시에 시작합니다. 그중 가장 높은 오류 코드를 결과로 반환하고, 각 점검에 대한 짧은 요약을 출력합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

The four CI-gate skills (budget / burn / anomaly / projection) each answer a different question. This skill composes them — runs all four IN PARALLEL, returns max(exit_codes), prints a one-line summary per check.

Subcheck Question Default threshold
budget "Have we crossed the configured budget?" HARD_STOP at 100%
burn "Is daily burn accelerating?" +100% vs prior-week mean
anomaly "Is any specific session a >3.5σ outlier?" ≥1 outlier
projection "When will we hit 100% of budget?" <14 days

Algorithm

Implementation: scripts/health.mjs.

  1. Spawn all four subcheck scripts in parallel (Promise.all over child_process.spawn).
  2. Each subcheck emits --format json; parse and capture exit code.
  3. Projection has no built-in exit code — synthesize one from daysUntilReached[100%] < --alert-days-to-exhaust.
  4. Final exit code = max(subcheck exits). Any single failure fails the gate.
  5. Print one-line summary per check + overall HEALTHY/UNHEALTHY badge.

CI integration

- name: Cost health gate
  run: cost health --alert-acceleration 100 --alert-outliers 1

A single step covers four alert ladders. Before this skill you'd wire four separate gates that each duplicated the npx + memory-list overhead; now it's one shell-out (and the four subcheck npx calls run in parallel internally).

Customizing thresholds

# Quarterly review — stricter thresholds
cost health --alert-acceleration 50 --alert-outliers 1 --alert-days-to-exhaust 30

# Production drift gate — only fire on egregious changes
cost health --alert-acceleration 200 --alert-outliers 3 --alert-days-to-exhaust 7

# Skip the slow burn check during a smoke run
cost health --skip burn

Smoke transcript (5 healthy sessions, then add 1 outlier)

# Healthy
Overall: ✓ HEALTHY (max exit code 0)
| Check | Status | Detail |
| budget | ✓ | unknown — no budget configured |
| burn | ✓ | delta within ±100% |
| anomaly | ✓ | 0 outliers — under threshold ≥1 |
| projection | ✓ | no budget configured — skipping |

# After adding $5 outlier (vs $0.10 baseline)
Overall: ⚠ UNHEALTHY (max exit code 1)
| burn | ⚠ | ALERT 5163.2% acceleration: latest bucket $5.00 is 5163.2% above prior mean $0.095 |
| anomaly | ⚠ | ALERT 1 outlier (|z|>3.5) |

Skipping subchecks

cost health --skip burn,projection   # only budget + anomaly

Useful when:

  • A subcheck doesn't apply (no budget set → skip projection)
  • A subcheck is too slow for fast-feedback contexts (smoke runs)
  • A subcheck is being independently CI-gated already

Exit code semantics

Exit Meaning
0 All subchecks OK
1 At least one subcheck fired an alert (budget HARD_STOP, burn drift, anomaly outlier, projection imminent-exhaust)
2 A subcheck had a config/usage error (e.g. invalid CLI args propagated to a subscript)
127 A subcheck failed to launch (script missing, etc.)

max() means the worst signal wins — exit 2 (config error) always dominates exit 1 (alert), so you spot misconfigured pipelines before they masquerade as healthy.

자주 묻는 질문

예측 점검은 무엇을 확인하나요?

예산이 14일 미만에 모두 소진되는지 확인합니다. 14일은 기본값입니다.

어떤 점검을 실행하나요?

예산, 소진 속도, 이상치 세션, 예측을 실행하며 각각 고유한 기본 기준값이 있습니다.

기준값을 바꿀 수 있나요?

네. 옵션으로 가속 한도, 이상치 개수, 소진까지 남은 일수 경고 기준을 설정할 수 있습니다.

상세 정보

작성자의 원본 설명

Composite CI gate — runs cost-budget-check + cost-burn + cost-anomaly + cost-projection in parallel and surfaces a single combined health status with max exit code. The operationally-useful entry point — one shell-out covers all four alert ladders.

repo: ruvnet/ruflo

인기도

GitHub 스타
81k
순위
#1602
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬