// Project Autopilot - Cost Estimation Guidelines
// Copyright (c) 2026 Jeremy McSpadden jeremy@fluxlabs.net
Cost Estimation Skill
Reference this skill when creating phases to provide accurate token/cost estimates.
Task Cost Estimates
By Task Type
| Task Type |
Input Tokens |
Output Tokens |
Est. Cost (Sonnet) |
| Read/analyze file |
500-2,000 |
200-500 |
$0.002-0.01 |
| Create new file |
1,000-3,000 |
1,500-5,000 |
$0.01-0.03 |
| Modify existing file |
1,500-4,000 |
1,000-3,000 |
$0.01-0.025 |
| Write unit tests |
2,000-5,000 |
2,000-6,000 |
$0.015-0.045 |
| Write integration tests |
3,000-8,000 |
3,000-8,000 |
$0.025-0.06 |
| Code review |
2,000-6,000 |
1,000-3,000 |
$0.01-0.03 |
| Documentation |
1,000-3,000 |
1,500-4,000 |
$0.01-0.025 |
| Debug/fix |
3,000-10,000 |
2,000-5,000 |
$0.02-0.05 |
| Schema design |
1,500-4,000 |
2,000-5,000 |
$0.015-0.035 |
| API endpoint |
2,000-5,000 |
2,500-6,000 |
$0.02-0.045 |
| React component |
2,000-6,000 |
3,000-8,000 |
$0.025-0.055 |
| Configuration |
500-1,500 |
500-1,500 |
$0.003-0.01 |
By Complexity
| Complexity |
Multiplier |
Example |
| Simple |
1.0x |
Add config value, simple function |
| Medium |
1.5x |
New endpoint with validation |
| Complex |
2.5x |
Auth system, complex logic |
| Very Complex |
4.0x |
Multi-service integration |
Phase Cost Estimates
Typical Phase Costs (Sonnet)
| Phase |
Tasks |
Est. Tokens |
Est. Cost |
| 001 Setup |
3-5 |
15K-30K |
$0.08-0.20 |
| 002 Database |
4-6 |
25K-50K |
$0.15-0.35 |
| 003 Infrastructure |
4-6 |
20K-40K |
$0.12-0.28 |
| 004 Auth |
5-8 |
40K-80K |
$0.25-0.55 |
| 005 API |
6-12 |
50K-120K |
$0.35-0.85 |
| 006 Business Logic |
6-15 |
60K-150K |
$0.40-1.00 |
| 007 Frontend |
8-15 |
80K-180K |
$0.55-1.25 |
| 008 Features |
10-25 |
100K-300K |
$0.70-2.00 |
| 009 Testing |
6-12 |
50K-120K |
$0.35-0.85 |
| 010 Security |
4-8 |
30K-70K |
$0.20-0.50 |
| 011 Documentation |
4-8 |
30K-60K |
$0.20-0.40 |
| 012 DevOps |
5-10 |
40K-90K |
$0.28-0.60 |
| 013 Polish |
3-8 |
25K-60K |
$0.15-0.40 |
Total Typical Project: 400K-1.5M tokens, $2.50-$10.00
Estimation Formula
Per Task
Base Cost = (input_tokens × input_rate) + (output_tokens × output_rate)
Haiku: input_rate = $1/1M, output_rate = $5/1M
Sonnet: input_rate = $3/1M, output_rate = $15/1M
Opus: input_rate = $5/1M, output_rate = $25/1M
Adjusted Cost = Base Cost × Complexity Multiplier × Buffer (1.2)
Per Phase
Phase Estimate = Σ(Task Estimates) × Phase Buffer (1.15)
Buffer Factors
| Factor |
Buffer |
Reason |
| Task |
1.2x |
Retries, validation |
| Phase |
1.15x |
Integration, fixes |
| Project |
1.25x |
Unknowns, scope creep |
Confidence Levels
| Level |
Variance |
When to Use |
| High |
±15% |
Well-defined, done before |
| Medium |
±30% |
Clear scope, some unknowns |
| Low |
±50% |
Vague requirements, new tech |
Estimation Checklist
Before finalizing phase estimates:
1---2name: cost-estimation3description: Guidelines for estimating token usage and costs per task and phase. Reference this skill when planning to provide accurate budget estimates.4---5
6// Project Autopilot - Cost Estimation Guidelines
7// Copyright (c) 2026 Jeremy McSpadden <jeremy@fluxlabs.net>
8
9# Cost Estimation Skill
10
11Reference this skill when creating phases to provide accurate token/cost estimates.
12
13---
14
15## Task Cost Estimates
16
17### By Task Type
18
19| Task Type | Input Tokens | Output Tokens | Est. Cost (Sonnet) |
20|-----------|--------------|---------------|-------------------|
21| Read/analyze file | 500-2,000 | 200-500 | $0.002-0.01 |
22| Create new file | 1,000-3,000 | 1,500-5,000 | $0.01-0.03 |
23| Modify existing file | 1,500-4,000 | 1,000-3,000 | $0.01-0.025 |
24| Write unit tests | 2,000-5,000 | 2,000-6,000 | $0.015-0.045 |
25| Write integration tests | 3,000-8,000 | 3,000-8,000 | $0.025-0.06 |
26| Code review | 2,000-6,000 | 1,000-3,000 | $0.01-0.03 |
27| Documentation | 1,000-3,000 | 1,500-4,000 | $0.01-0.025 |
28| Debug/fix | 3,000-10,000 | 2,000-5,000 | $0.02-0.05 |
29| Schema design | 1,500-4,000 | 2,000-5,000 | $0.015-0.035 |
30| API endpoint | 2,000-5,000 | 2,500-6,000 | $0.02-0.045 |
31| React component | 2,000-6,000 | 3,000-8,000 | $0.025-0.055 |
32| Configuration | 500-1,500 | 500-1,500 | $0.003-0.01 |
33
34### By Complexity
35
36| Complexity | Multiplier | Example |
37|------------|------------|---------|
38| Simple | 1.0x | Add config value, simple function |
39| Medium | 1.5x | New endpoint with validation |
40| Complex | 2.5x | Auth system, complex logic |
41| Very Complex | 4.0x | Multi-service integration |
42
43---
44
45## Phase Cost Estimates
46
47### Typical Phase Costs (Sonnet)
48
49| Phase | Tasks | Est. Tokens | Est. Cost |
50|-------|-------|-------------|-----------|
51| 001 Setup | 3-5 | 15K-30K | $0.08-0.20 |
52| 002 Database | 4-6 | 25K-50K | $0.15-0.35 |
53| 003 Infrastructure | 4-6 | 20K-40K | $0.12-0.28 |
54| 004 Auth | 5-8 | 40K-80K | $0.25-0.55 |
55| 005 API | 6-12 | 50K-120K | $0.35-0.85 |
56| 006 Business Logic | 6-15 | 60K-150K | $0.40-1.00 |
57| 007 Frontend | 8-15 | 80K-180K | $0.55-1.25 |
58| 008 Features | 10-25 | 100K-300K | $0.70-2.00 |
59| 009 Testing | 6-12 | 50K-120K | $0.35-0.85 |
60| 010 Security | 4-8 | 30K-70K | $0.20-0.50 |
61| 011 Documentation | 4-8 | 30K-60K | $0.20-0.40 |
62| 012 DevOps | 5-10 | 40K-90K | $0.28-0.60 |
63| 013 Polish | 3-8 | 25K-60K | $0.15-0.40 |
64
65**Total Typical Project:** 400K-1.5M tokens, $2.50-$10.00
66
67---
68
69## Estimation Formula
70
71### Per Task
72
73```
74Base Cost = (input_tokens × input_rate) + (output_tokens × output_rate)
75
76Haiku: input_rate = $1/1M, output_rate = $5/1M
77Sonnet: input_rate = $3/1M, output_rate = $15/1M
78Opus: input_rate = $5/1M, output_rate = $25/1M
79
80Adjusted Cost = Base Cost × Complexity Multiplier × Buffer (1.2)
81```
82
83### Per Phase
84
85```
86Phase Estimate = Σ(Task Estimates) × Phase Buffer (1.15)
87```
88
89### Buffer Factors
90
91| Factor | Buffer | Reason |
92|--------|--------|--------|
93| Task | 1.2x | Retries, validation |
94| Phase | 1.15x | Integration, fixes |
95| Project | 1.25x | Unknowns, scope creep |
96
97---
98
99## Confidence Levels
100
101| Level | Variance | When to Use |
102|-------|----------|-------------|
103| High | ±15% | Well-defined, done before |
104| Medium | ±30% | Clear scope, some unknowns |
105| Low | ±50% | Vague requirements, new tech |
106
107---
108
109## Estimation Checklist
110
111Before finalizing phase estimates:
112
113- [ ] Each task has complexity rating
114- [ ] Model specified (Opus vs Sonnet)
115- [ ] Buffer applied (1.2x task, 1.15x phase)
116- [ ] Confidence level stated
117- [ ] Range provided (min-max)
118- [ ] Total phase estimate calculated
119- [ ] Fits within project budget