types
Reference for Splitrail's core data types. Use when working with ConversationMessage, Stats, DailyStats, or other type definitions.
When & Why to Use This Skill
This Claude skill provides a comprehensive technical reference for Splitrail's core data architecture and type definitions. It enables developers and AI agents to understand the underlying schema for conversation messages, usage statistics, and data aggregation logic, ensuring consistency and precision during software development and system integration.
Use Cases
- Data Schema Reference: Quickly access detailed definitions for core types like ConversationMessage and Stats to ensure correct field usage and data mapping.
- Analytics Implementation: Utilize the DailyStats structure and aggregation utilities to build accurate usage tracking and reporting features.
- Data Integrity Management: Understand and implement local and global hashing strategies for effective message deduplication across different environments.
- System Integration: Reference standardized enums such as Application and MessageRole to maintain compatibility when integrating new AI coding tools into the ecosystem.
| name | types |
|---|---|
| description | Reference for Splitrail's core data types. Use when working with ConversationMessage, Stats, DailyStats, or other type definitions. |
Key Types
Read src/types.rs for full definitions.
Core Types
ConversationMessage - Normalized message format across all analyzers. Contains application source, timestamp, hashes for deduplication, model info, token/cost stats, and role.
Stats - Comprehensive usage metrics for a single message including token counts, costs, file operations, todo tracking, and composition stats by file type.
DailyStats - Pre-aggregated stats per date with message counts, conversation counts, model breakdown, and embedded Stats.
Application - Enum identifying which AI coding tool a message came from.
MessageRole - User or Assistant.
Hashing Strategy
local_hash: Deduplication within a single analyzerglobal_hash: Deduplication on upload to Splitrail Cloud
Aggregation
Use crate::utils::aggregate_by_date() to group messages into daily stats. See src/utils.rs.