---
name: Types
slug: types
category: Data
description: "Types is a reference for Splitrail's core data structures. Use it when working with ConversationMessage, Stats, DailyStats, hashing, or daily aggregation."
github: "https://github.com/Piebald-AI/splitrail/tree/main/.claude/skills/types"
language: Rust
stars: 217
forks: 25
install: "npx degit https://github.com/Piebald-AI/splitrail/tree/main/.claude/skills/types ~/.claude/skills/types"
installs_to: ~/.claude/skills/types
source_path: .claude/skills/types/SKILL.md
collection_size: 6
category_size: 729
collection_url: "https://dirskills.com/collections/Piebald-AI/splitrail"
added: 2026-09-04T05:25:27.617Z
last_synced: 2026-09-04T05:25:27.617Z
canonical_url: "https://dirskills.com/skills/types"
---

# Types

Types is a reference for Splitrail's core data structures. Use it when working with ConversationMessage, Stats, DailyStats, hashing, or daily aggregation.

**Install:**

```bash
npx degit https://github.com/Piebald-AI/splitrail/tree/main/.claude/skills/types ~/.claude/skills/types
```

## README

# 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 analyzer
- `global_hash`: Deduplication on upload to Splitrail Cloud

## Aggregation

Use `crate::utils::aggregate_by_date()` to group messages into daily stats. See `src/utils.rs`.
