Skill Cost Credit Governor
Use this skill to prevent silent spend escalation across multi-skill workflows.
Workflow
- •Export invocation usage history (CSV/JSON) with timestamp, skill, token, runtime, and optional caller fields.
- •Run
skill_cost_governor.py analyzefor a rolling window. - •Review anomaly evidence (
cost_spike,inefficient_loop,agent_chatter,runtime_p95_high). - •Apply proposed
warn/throttle/disableactions. - •Persist analysis and policy artifacts for audits.
Analyze Usage
bash
python3 "$CODEX_HOME/skills/skill-cost-credit-governor/scripts/skill_cost_governor.py" analyze \ --input /path/to/skill-usage.csv \ --window-days 30 \ --soft-daily-budget 120 \ --hard-daily-budget 180 \ --soft-window-budget 2800 \ --hard-window-budget 3400 \ --spike-multiplier 2.0 \ --loop-threshold 6 \ --chatter-threshold 20 \ --json-out /tmp/skill-cost-analysis.json \ --format table
Extract/Enforce Actions
bash
python3 "$CODEX_HOME/skills/skill-cost-credit-governor/scripts/skill_cost_governor.py" decide \ --analysis-json /tmp/skill-cost-analysis.json \ --json-out /tmp/skill-cost-policy.json \ --format table
Use --force-global-action throttle or --force-global-action disable for emergency containment.
References
- •
references/governor-workflow.md - •
references/policy-contract.md