skill-cost-projections
Project remaining workflow cost from per-phase averages — warns on budget ceiling overruns
Skill by mhdxbilal
Chalk Labs
Need help deploying skill-cost-projections?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mhdxbilal-skill-cost-projections
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity, finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/skill-cost-projections
What's inside
- Skill name
skill-cost-projections- Description
- Project remaining workflow cost from per-phase averages — warns on budget ceiling overruns
- License
- MIT
- Instructions
- 213 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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 Average Cost Per Step
Calculate the mean cost across all completed steps.
```bash
avg_cost=$(echo "$total_spent / $completed_count" | bc -l)
```
**Formula:**
```
avg_cost = total_cost / completed_steps
```
**Example:** If 3 steps cost $0.30, $0.50, $0.40 → avg = $1.20 / 3 = $0.40/step
---
## Step 3: Project Remaining Cost
Multiply the average cost per step by the number of remaining steps.
```bash
remaining_steps=$((total_steps - completed_count))
projected_remaining=$(echo "$avg_cost * $remaining_steps" | bc -l)
projected_total=$(echo "$total_spent + $projected_remaining" | bc -l)
```
**Formula:**
```
projected_remaining = avg_cost × remaining_steps
projected_total = total_spent + projected_remaining
```
**Step counts by workflow type:**
| Workflow | Total Steps | Example Phases |
|----------|-------------|----------------|
| embrace | 4 | Discover, Define, Develop, Deliver |
| research | 3-7 | Per-agent probe count |
| review | 3 | Fleet, Verifier, Synthesis |
| debate | 3 | Opening, Rebuttal, Synthesis |
---
## Step 4: Display in HUD
Format the cost projection for the HUD/statusline display.
**Standard display:**
```
💰 Spent: $2.40 | Est. remaining: $3.60 | Total: ~$6.00
```
**Format rules:**
- All dollar amounts to 2 decimal places
- Projected total prefixed with `~` to indicate estimate
- Use `💰` prefix for the cost line
- Show in a single compact line for statusline integration
**When insufficient data (< 2 steps):**
```
💰 Spent: $0.42 (need 2+ steps for projection)
```
**Integration:** This display line is emitted by the octopus-hud hook and rendered in the statusline alongside phase progress and provider status.
---
## Step 5: Budget Ceiling Warning
If the `OCTO_BUDGET_CEILING` environment variable is set, compare the projected total against it and warn on overrun.
```bash
if [[ -n "${OCTO_BUDGET_CEILING:-}" ]]; then
ceiling="$OCTO_BUDGET_CEILING"
if (( $(echo "$projected_total > $ceiling" | bc -l) )); then
overage=$(echo "$projected_total - $ceiling" | bc -l)
echo "⚠️ Budget ceiling: \$$ceiling — projected to exceed by \$$overage"
fi
fi
```From mhdxbilal/Ai, MIT.
More from mhdxbilal/Ai
- 0.496score
skill-debug
mhdxbilal
Debug issues methodically — use when stuck on errors, test failures, or unexpected behavior
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
flow-spec
mhdxbilal
NLSpec authoring — use when you need a structured specification from multi-AI research and consensus
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
skill-deck
mhdxbilal
Generate slide deck presentations from briefs — use when you need slides, pitch decks, or visual summaries
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
skill-decision-support
mhdxbilal
Present options with trade-offs for informed decision-making — use when choosing between approaches
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-code-review
mhdxbilal
Expert multi-AI code review with inline PR comments — use for thorough quality and security analysis
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-claw
mhdxbilal
OpenClaw instance administration — manage hosts across macOS, Ubuntu/Debian, Docker, OCI, and Proxmox
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-context-detection
mhdxbilal
Auto-detect work context (Dev vs Knowledge) — use to tailor workflows based on current task type
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-coverage-audit
mhdxbilal
Trace codepaths in diffs, map against tests, auto-generate missing coverage — use before shipping PRs
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-copilot-provider
mhdxbilal
GitHub Copilot CLI as optional zero-cost provider via copilot -p programmatic mode
SkillCFreshness: C★ 1Claude Code +9 - 0.487score
skill-extract
mhdxbilal
Reverse-engineer design systems, tokens, and components from live products or screenshots
SkillCFreshness: C★ 1Claude Code +9 - 0.487score
octopus-architecture
mhdxbilal
System architecture and API design with multi-AI consensus — use for design reviews and new subsystems
SkillCFreshness: C★ 1Claude Code +9 - 0.482score
skill-content-pipeline
mhdxbilal
Extract patterns and anatomy from URLs — use to reverse-engineer content strategies from live pages
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- May 19, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/mhdxbilal/Ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from mhdxbilal
- 0.496score
skill-decision-support
mhdxbilal
Present options with trade-offs for informed decision-making — use when choosing between approaches
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
skill-deck
mhdxbilal
Generate slide deck presentations from briefs — use when you need slides, pitch decks, or visual summaries
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
flow-spec
mhdxbilal
NLSpec authoring — use when you need a structured specification from multi-AI research and consensus
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
skill-debug
mhdxbilal
Debug issues methodically — use when stuck on errors, test failures, or unexpected behavior
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-claw
mhdxbilal
OpenClaw instance administration — manage hosts across macOS, Ubuntu/Debian, Docker, OCI, and Proxmox
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
skill-context-detection
mhdxbilal
Auto-detect work context (Dev vs Knowledge) — use to tailor workflows based on current task type
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get skill-cost-projections running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
skill-cost-projections. Agent Mart. https://agentmart.dev/skills/mhdxbilal-skill-cost-projections (last updated 2026-10-24)