
Cost Projection
FreePredict future spending based on current rates.
Free · Opens the source repo
What Cost Projection does
Cost Projection is a predictive tool designed to help developers and finance teams understand their spending trends over time. By analyzing recent cost data, it calculates a USD-per-day burn rate and projects future expenses across various horizons such as 7, 30, 90, and 365 days. This skill is particularly useful for those managing budgets and looking to anticipate when they might reach their financial limits.
The tool works by reading session records from the cost-tracking namespace, filtering them to a specified measurement window, and then computing the daily spend rate. Users can configure the measurement window and the projection horizons to suit their specific needs. If a budget is set, the skill will also provide insights on how many days remain until the budget is exhausted at the current spending rate, offering a clear view of financial health.
Cost Projection is ideal for finance teams, Site Reliability Engineers (SREs), and anyone involved in project management who needs to keep a close eye on budget adherence. It can be integrated into CI/CD pipelines to enforce budgetary constraints, ensuring that projects do not exceed financial limits without prior notice. Additionally, it serves as a sanity check after significant workload changes, allowing teams to verify that spending remains within expected parameters.
This skill is best used in conjunction with the cost-budget-check tool, which provides reactive insights into budget limits. Together, they form a comprehensive approach to financial management, allowing teams to proactively manage their spending and avoid surprises.
When to use it
Use this skill when you need to forecast spending and assess budget adherence over time.
When not to use it
Avoid this skill if you require real-time budget checks or if your spending patterns are highly variable and not linear.
What you can build with it
Budget Planning for Projects
Use Cost Projection to estimate future spending for upcoming projects and adjust budgets accordingly.
Integrating with CI/CD Pipelines
Incorporate this skill into CI gates to prevent builds from proceeding if projected spending exceeds budget limits.
Post-Deployment Cost Analysis
After deploying a significant feature, re-run the projection to ensure spending aligns with expectations.
How to install Cost Projection
View source1. Install with the skills CLI
npx skills add ruvnet/ruflo/cost-projection --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by ruvnetForward-looking cost projection that pairs with cost-budget-check:
cost-budget-checkanswers "have we crossed the line?" — reactivecost-projectionanswers "when will we cross the line?" — predictive
Algorithm
- Read all
session-*records from thecost-trackingnamespace (same sourcecost-budget-checkuses). - Filter to a measurement window (default last 7 days on
capturedAt/startedAt). - Compute the per-day burn rate:
windowSpend / windowDays. - Linear-extrapolate to each requested horizon (default 7d/30d/90d/365d).
- If a budget is configured (
budget-configkey set bycost-budget set):- Compute "days until 75% / 90% / 100% consumed" at the current rate.
- Surface as a separate table block with
ALREADY REACHEDmarkers for thresholds already exceeded.
Flags
--window <duration> Measurement window. Nh|Nd|Nw|Nm. Default 7d.
--horizons <csv> Projection horizons. Default 7d,30d,90d,365d.
--format table|json Default table (markdown).
Env: PROJECTION_NAMESPACE override (default cost-tracking), PROJECTION_QUIET=1 (alias for --format json).
Smoke transcript (3 sessions × $1 over 7d, $20 budget)
| Sessions in window | 3 |
| Window spend | $3.000000 |
| **USD per day** | **$0.428571** |
| All-time spend | $3.000000 across 3 sessions |
## Projected spend (linear extrapolation)
| Horizon | Days | Projected spend |
|---|---:|---:|
| 7d | 7 | $3.0000 |
| 30d | 30 | $12.8571 |
## Budget exhaustion ($20.00 configured)
| Threshold | Target | Remaining | Time at current rate |
|---|---:|---:|---|
| 75% | $15.00 | $12.00 | 28.0 days |
| 90% | $18.00 | $15.00 | 35.0 days |
| 100% | $20.00 | $17.00 | 39.7 days |
When to use
- Finance / SRE planning: hand the JSON output to a budget dashboard for "are we on track for the quarter?".
- CI gates:
cost-projection --format json | jq '.budget.exhaustion[2].daysUntilReached < 7'→ fail builds when 100% exhaustion is < 1 week away. - Post-workload-shift sanity check: after a big feature lands, re-run to verify the rate hasn't accelerated past expectations.
Stationarity assumption
Linear extrapolation assumes the current rate holds. The footer reminds operators to re-run after workload shifts. For drift detection over MULTIPLE windows, pair with cost-trend (which already covers benchmark-drift).
Frequently asked questions about Cost Projection
Similar skills
Initiating Coverage
Create institutional-quality equity research reports.
Financial Tear Sheet Generator
Create professional company profiles with live data.
Pitch Deck Population
Effortlessly fill pitch deck templates with data.
Tax Season Organizer
Streamline your tax prep for accountants.
Month End Prep
Streamline your month-end close process with ease.
Funding Digest
Summarize funding rounds in a single slide.
