fnclaude/AI Cost Guard
Track and limit AI API costs in CI workflows
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| action | start or stop | yes | — |
| anthropic_api_key | Anthropic API key for usage tracking | yes | — |
| max_cost | Maximum cost in USD before failing the workflow | no | 10.00 |
| start_time | Start time from the start step (only for stop action) | no | — |
| baseline_usage | Baseline usage from start step (only for stop action) | no | — |
| input_tokens | Manually provided input token count (fallback mode, only for stop action) | no | — |
| output_tokens | Manually provided output token count (fallback mode, only for stop action) | no | — |
| model | Model ID for cost estimation when using manual token counts | no | claude-sonnet-4-6 |
Outputs
| name | description |
|---|---|
| start_time | Timestamp when tracking started |
| baseline_usage | Usage snapshot at start |
| total_input_tokens | Input tokens used |
| total_output_tokens | Output tokens used |
| estimated_cost | Estimated cost in USD |