skill-cost-projections
FeaturedProject remaining workflow cost from per-phase averages — warns on budget ceiling overruns
AI & Automation 4,061 stars
380 forks Updated today MIT
Install
Quality Score: 99/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Cost Projections Skill
## Overview
Projects remaining workflow cost based on per-phase averages from completed work. Displays cost data in the HUD/statusline and warns when projected totals exceed a configured budget ceiling.
**Minimum data requirement:** Needs **2+ completed steps** before projecting. With fewer than 2 data points, the average is unreliable — display actual spend only and skip projection.
---
## Step 1: Collect Completed Phase Costs
Read cost data from `~/.claude-octopus/metrics/` or from metrics-tracker.sh output. Each completed phase/step should have an associated cost entry.
```bash
# Read metrics from the session metrics directory
METRICS_DIR="$HOME/.claude-octopus/metrics"
SESSION_METRICS="$METRICS_DIR/session-$(date +%Y%m%d).jsonl"
# Each line contains: {"phase": "discover", "cost": 0.42, "tokens_in": 12000, "tokens_out": 3400, "timestamp": "..."}
# Sum costs from completed steps
completed_costs=$(jq -s '[.[].cost]' "$SESSION_METRICS")
completed_count=$(jq -s 'length' "$SESSION_METRICS")
total_spent=$(jq -s '[.[].cost] | add' "$SESSION_METRICS")
```
**Data sources (in priority order):**
1. `~/.claude-octopus/metrics/session-*.jsonl` — structured per-phase cost entries
2. `metrics-tracker.sh` output — fallback for legacy sessions
3. HUD accumulated cost counters — last resort
If fewer than 2 completed steps are available, display only actual spend:
```
💰 Spent: $0.42 (1 step complete — need 2+ for projection)
```
---
## Step 2: Compute Av...
Details
- Author
- nyldn
- Repository
- nyldn/claude-octopus
- Created
- 7 months ago
- Last Updated
- today
- Language
- Shell
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Featured
cost-model
Standardized cost-estimation framework for great_cto plans. Forces explicit LLM cost, infra cost, human-supervision time, and the (defensible) human-equivalent comparison. Output format is parsable by the board's /api/cost path — must follow exactly.
92 Updated today
avelikiy AI & Automation Solid
cost-estimator
Pre-flight cost estimate for a planned /article run. Use BEFORE /article or when user asks "how much will this cost?" / "what's the estimate?". Outputs USD breakdown by category + 80% confidence band + budget check.
49 Updated 3 weeks ago
XuanRanL AI & Automation Listed
cost-track
Report token spend per session and cumulative totals from session logs
1 Updated 2 weeks ago
manastalukdar