Catch expensive and unsafe AI prompts before they reach production.
- Detect token explosions and hidden costs
- Generate a CostGuardAI Safety Score on every PR
- Fail CI when prompts fall below your Safety Score threshold
- uses: Camj78/costguardai-action@v1Runs automatically in GitHub Actions to analyze prompts before merge.
- uses: Camj78/costguardai-action@v1
with:
fail-on-risk: 70Add this step to any workflow that runs on pull requests. The action fails if the CostGuardAI Safety Score drops below the threshold.
| Input | Required | Default | Description |
|---|---|---|---|
fail-on-risk |
No | 70 |
Fail the workflow if Safety Score falls below this value (0–100) |
name: CostGuardAI
on: [pull_request]
jobs:
costguard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Camj78/costguardai-action@v1
with:
fail-on-risk: 70Runs the CostGuardAI CLI via npx @camj78/costguardai@latest ci.
