Agent skill
pricing
Guide for updating model pricing in Splitrail. Use when adding new AI model costs or updating existing pricing data.
Install this agent skill to your Project
npx add-skill https://github.com/Piebald-AI/splitrail/tree/main/.claude/skills/pricing
SKILL.md
Pricing Model Updates
Token pricing is defined in src/models.rs using compile-time phf (perfect hash function) maps for fast lookups.
Adding a New Model
- Add a
ModelInfoentry toMODEL_INDEX(line 65 insrc/models.rs) with:pricing: UsePricingStructure::Flat { input_per_1m, output_per_1m }for flat-rate models, orPricingStructure::Tieredfor tiered pricingcaching: Use the appropriateCachingSupportvariant (None,OpenAI,Anthropic, orGoogle)is_estimated: Set totrueif pricing is not officially published
- If the model has aliases (date suffixes, etc.), add entries to
MODEL_ALIASESmapping to the canonical model name
See existing entries in src/models.rs for the pattern.
Price Calculation
Use models::calculate_total_cost() when an analyzer doesn't provide cost data.
Common Pricing Sources
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
new-analyzer
Guide for adding a new AI coding agent analyzer to Splitrail. Use when implementing support for a new tool like Copilot, Cline, or similar.
tui
Guide for Splitrail's terminal UI and file watching. Use when modifying the TUI, stats display, or real-time update logic.
mcp
Guide for working with Splitrail's MCP server. Use when adding tools, resources, or modifying the MCP interface.
types
Reference for Splitrail's core data types. Use when working with ConversationMessage, Stats, DailyStats, or other type definitions.
performance
Performance optimization guidelines for Splitrail. Use when optimizing parsing, reducing memory usage, or improving throughput.
patch-creation
Create and register new patches for tweakcc. Use when adding new customizations to Claude Code.
Didn't find tool you were looking for?