data-model

Design Cassandra schemas with version-aware partition and clustering key guidance.

41|8|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/rustyrazorblade/skills --skill data-model-rustyrazorblade
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-model
Source: https://github.com/rustyrazorblade/skills/tree/main/plugins/cassandra-expert/skills/data-model
Command: npx skills add https://github.com/rustyrazorblade/skills --skill data-model-rustyrazorblade

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Data modeling and schema design for Apache Cassandra, equipping you to design tables, select partition keys, model time-series data, and review existing schemas.

Core Features & Use Cases

  • Query-driven schema design: start from required queries and create one table per pattern to support efficient reads.
  • Denormalization guidance: explain how to duplicate data across tables to avoid joins while balancing write costs.
  • Time-series and TTL guidance: bucket data, manage lifecycle, and choose compaction considerations.
  • Use case: For a user activity tracking system, design tables to efficiently retrieve recent events by user, while enabling per-user aggregates.
  • Version-aware recommendations: ensure schema choices align with Cassandra version capabilities (3.x, 4.x, 5.x) and feature availability.
  • Lifecycle strategies: TTL, table rotation, and data aging for long-term storage.

Quick Start

Provide a Cassandra schema plan for a given use case including recommended tables and keys to efficiently satisfy the required queries.

Frequently Asked Questions about data-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a Cassandra schema for time-series data?

To design a Cassandra schema for time-series data, you must bucket entries by partition key and use clustering keys for chronological ordering, while applying TTL to manage the data lifecycle. This approach optimizes write throughput and prevents unbounded partition growth.

How do I choose partition keys for an Apache Cassandra data model?

Choosing partition keys for an Apache Cassandra data model requires identifying query patterns first to ensure even data distribution and efficient reads. Selecting keys that align with your queries prevents hotspots and enables fast retrieval without inefficient secondary index scans.

When should I use denormalization in Cassandra schema design?

You should use denormalization in Cassandra schema design when you need to support multiple query patterns without expensive joins. Duplicating data across multiple tables optimizes read performance by matching specific query requirements directly to pre-computed result sets.

Does Cassandra schema design differ between versions 3.x, 4.x, and 5.x?

Cassandra schema design differs between versions 3.x, 4.x, and 5.x due to evolving feature availability and compaction strategies. Version-aware recommendations ensure your schema choices and data lifecycle strategies align with the target database's specific capabilities and constraints.

What is the best way to model user activity tracking in Cassandra?

The best way to model user activity tracking in Cassandra is creating query-driven tables that efficiently retrieve recent events by user. This involves denormalizing data to support per-user aggregates and fast reads of recent activity without expensive scans.

How do I handle data lifecycle and TTL strategies for long-term Cassandra storage?

Handling data lifecycle and TTL strategies for long-term Cassandra storage involves configuring table rotation and TTLs to automatically age out expired data. This approach manages storage costs and optimizes compaction by automatically purging outdated records.