Tooluck logoTooluck
SKILL.md

skill-cost-projections

Agent skill fromnyldn/claude-octopus

Project remaining workflow cost from per-phase averages — warns on budget ceiling overruns

How to install skill-cost-projections

install skill-cost-projections
# install the claude-octopus pack with the skills CLI
npx skills add nyldn/claude-octopus

# or add only this skill to Claude Code: copy the folder

skills/skill-cost-projections/

# into

~/.claude/skills/skill-cost-projections/ (all projects)

.claude/skills/skill-cost-projections/ (one project)

skills/skill-cost-projections/SKILL.md

MITFull file
1> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex.
2> Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands.
3> Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it.
4> For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
5
6
7# Cost Projections Skill
8
9## Overview
10
11Projects 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.
12
13**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.
14
15
16## Step 1: Collect Completed Phase Costs
17
18Read cost data from `~/.claude-octopus/metrics/` or from metrics-tracker.sh output. Each completed phase/step should have an associated cost entry.
19
20```bash
21# Read metrics from the session metrics directory
22METRICS_DIR="$HOME/.claude-octopus/metrics"
23SESSION_METRICS="$METRICS_DIR/session-$(date +%Y%m%d).jsonl"
24
25# Each line contains: {"phase": "discover", "cost": 0.42, "tokens_in": 12000, "tokens_out": 3400, "timestamp": "..."}
26# Sum costs from completed steps
27completed_costs=$(jq -s '[.[].cost]' "$SESSION_METRICS")
28completed_count=$(jq -s 'length' "$SESSION_METRICS")
29…

Excerpt shown under the repository's MIT license.

More skills in claude-octopus

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates