setup-timescaledb-hypertables
Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. **Trigger when user asks to:** - Create or design SQL schemas/tables AND Timescale/TimescaleDB/TigerData/Tiger Cloud is available - Set up hypertables, compression, retention policies, or continuous aggregates - Configure partition columns, segment_by, order_by, or chunk intervals - Optimize time-series database performance or storage - Create tables for sensor
npx skills add timescale/pg-aiguide --skill setup-timescaledb-hypertables --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# TimescaleDB Complete Setup Instructions for insert-heavy data patterns where data is inserted but rarely changed: - **Time-series data** (sensors, metrics, system monitoring) - **Event logs** (user events, audit trails, application logs) - **Transaction records** (orders, payments, financial transactions) - **Sequential data** (records with auto-incrementing IDs and timestamps) - **Append-only datasets** (immutable records, historical data) ## Step 1: Create Hypertable ```sql CREATE TABLE your_table_name ( timestamp TIMESTAMPTZ NOT NULL, entity_id TEXT NOT NULL, -- device_id, user_id, symbol, etc. category TEXT, -- sensor_type, event_type, asset_class, etc. value_1 DOUBLE PRECISION, -- price, temperature, latency, etc. value_2 DOUBLE PRECISION, -- volume, humidity, throughput, etc. value_3 INTEGER, -- count, status, level, etc. metadata JSONB -- flexible additional data ) WITH ( tsdb.hypertable, tsdb.partition_column='timestamp', tsdb.enable_columnstore=true, -- Disable if table has vector columns tsdb.segmentby='entity_id', -- See selection guide below tsdb.orderby='timestamp DESC', -- See selection guide below tsdb.sparse_index='minmax(value_1),minmax(value_2),minmax(value_3)'
- Step 1: Create Hypertable
- Compression Decision
- Partition Column Selection
- SegmentBy Column Selection
- OrderBy Column Selection
- Compression Sparse Index Selection
- Chunk Time Interval (Optional)
- Indexes & Primary Keys
- Step 2: Compression Policy (Optional)
- Step 3: Retention Policy
- Step 4: Create Continuous Aggregates
- Short-term (Minutes/Hours)
- Long-term (Days/Weeks/Months)
- Step 5: Aggregate Refresh Policies
What does the setup-timescaledb-hypertables skill do?
Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. **Trigger when user asks to:** - Create or design SQL schemas/tables AND Timescale/TimescaleDB/TigerData/Tiger Cloud is available - Set up hypertables, compression, retention policies, or continuous aggregates - Configure partition columns, segment_by, order_by, or chunk intervals - Optimize time-series database performance or storage - Create tables for sensor
How do I install it?
Run `npx skills add timescale/pg-aiguide --skill setup-timescaledb-hypertables --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From timescale/pg-aiguide, a repository with 1,806 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.