Agent skill · Databases

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

Tiger Data1,796★ · +6/wk · 1 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add timescale/pg-aiguide --skill setup-timescaledb-hypertables --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 18 KB
Bundled scripts: none
Declared author: tigerdata
Requires: Requires PostgreSQL 15+ with TimescaleDB
Path: skills/setup-timescaledb-hypertables/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,806 · +10 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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)'

What's inside
Steps it walks through
  1. Step 1: Create Hypertable
  2. Compression Decision
  3. Partition Column Selection
  4. SegmentBy Column Selection
  5. OrderBy Column Selection
  6. Compression Sparse Index Selection
  7. Chunk Time Interval (Optional)
  8. Indexes & Primary Keys
  9. Step 2: Compression Policy (Optional)
  10. Step 3: Retention Policy
  11. Step 4: Create Continuous Aggregates
  12. Short-term (Minutes/Hours)
  13. Long-term (Days/Weeks/Months)
  14. Step 5: Aggregate Refresh Policies
More from pg-aiguide
All skills →
About this skill
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.

Keep going