Skip to content
Skill

Setup timescaledb hypertables

Guides an agent to design TimescaleDB hypertables with compression and aggregates

Setup timescaledb hypertables is an open-source agent skill for databases. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
1.9K
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Setup timescaledb hypertables

This skill walks an agent through creating insert-heavy tables on TimescaleDB, covering hypertable creation with a time partition column, segment and order choices, and sparse index settings. It also covers columnstore compression policies, retention rules, continuous aggregates with refresh policies, and compressing those aggregates.

The workflow is a numbered sequence of SQL templates the agent fills in. It stresses guardrails such as only adding indexes that will be used, never indexing segmentby or orderby columns, and leaving retention or aggregate retention commented out unless the user supplies a value. A final step gives verification queries against timescaledb_information views and hypertable_compression_stats.

The skill expects PostgreSQL 15 or later with TimescaleDB available, and it asks the agent to gather details such as expected query patterns and retention needs before finalizing choices. It ships as a single SKILL.md with no scripts.

When your agent uses it

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 sensors, metrics, telemetry, events, or transaction logs **Keywords:** CREATE TABLE, hypertable, Timescale, TimescaleDB, time-series, IoT, metrics, sensor data, compression policy, continuous aggregates, columnstore, retention policy, chunk interval, segment_by, order_by Step-by-step instructions for hypertable creation, column selection, compression policies, retention, continuous aggregates, and indexes.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (18 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the pg plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add timescale/pg-aiguide
/plugin install pg@aiguide

Or copy only this skill to ~/.claude/skills/setup-timescaledb-hypertables:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/setup-timescaledb-hypertables &&
cp -R "$tmp/skills/setup-timescaledb-hypertables" ~/.claude/skills/setup-timescaledb-hypertables &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/setup-timescaledb-hypertables inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/setup-timescaledb-hypertables to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/setup-timescaledb-hypertables &&
cp -R "$tmp/skills/setup-timescaledb-hypertables" ~/.agents/skills/setup-timescaledb-hypertables &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/setup-timescaledb-hypertables inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/setup-timescaledb-hypertables to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/setup-timescaledb-hypertables &&
cp -R "$tmp/skills/setup-timescaledb-hypertables" ~/.cursor/skills/setup-timescaledb-hypertables &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/setup-timescaledb-hypertables inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/timescale/pg-aiguide.git --path skills/setup-timescaledb-hypertables

Or copy the folder to ~/.gemini/skills/setup-timescaledb-hypertables yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/setup-timescaledb-hypertables:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/timescale/pg-aiguide.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/setup-timescaledb-hypertables &&
cp -R "$tmp/skills/setup-timescaledb-hypertables" ~/.copilot/skills/setup-timescaledb-hypertables &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/setup-timescaledb-hypertables inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/timescale/pg-aiguide.git

Then copy pg-aiguide/skills/setup-timescaledb-hypertables into your agent's skills folder as setup-timescaledb-hypertables. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Hypertable table creation
Templates for a time-partitioned table with columnstore enabled and tuned segment and order settings.
Segment and order guidance
Rules for choosing segmentby and orderby columns based on row density and query filters.
Compression and sparse indexes
Columnstore policy defaults and minmax sparse index configuration for compressed batches.
Continuous aggregates
Hourly and daily rollup views with refresh offsets and columnstore settings for aggregates.
Retention policies
Guidance on raw and aggregate retention, kept as commented placeholders unless requirements are known.
Verification queries
Checks against hypertable, job, chunk and compression statistics views to confirm the setup.

Good for

  • Design a sensor readings table that stores data in a TimescaleDB hypertable
  • Set up compression for an event log table with segment and order columns
  • Create hourly and daily continuous aggregates for dashboard metrics
  • Add a retention policy and refresh schedule for time-series data
  • Check whether a TimescaleDB table is compressed and how much space it saves

Setup timescaledb hypertables FAQ

What does the skill need before Setup timescaledb hypertables runs?

It targets PostgreSQL 15+ with TimescaleDB, and it tells the agent to confirm Timescale is available before designing tables.

Does Setup timescaledb hypertables change my database on its own?

It provides SQL templates for the agent to apply. Retention and aggregate retention are left commented out unless you specify a period.

Which Timescale versions does Setup timescaledb hypertables cover?

It notes version-specific behavior, such as automatic columnstore policies from 2.23 and the deprecated parameter and function names to avoid.

How do I install Setup timescaledb hypertables in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/setup-timescaledb-hypertables to use it in all your projects, or to .claude/skills/setup-timescaledb-hypertables in one project. Or install the pg plugin, which includes it: /plugin marketplace add timescale/pg-aiguide, then /plugin install pg@aiguide.

Does Setup timescaledb hypertables run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Setup timescaledb hypertables?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Setup timescaledb hypertables?

The closest alternatives to Setup timescaledb hypertables are Migrate postgres tables to hypertables, Find hypertable candidates, Postgres, Design postgres tables and Design postgis tables.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from timescale/pg-aiguide

  1. Guides an agent in designing PostGIS spatial tables, types, SRIDs and indexes

    • Open source
    • 1.9K GitHub stars
    • Databases
  2. Guides an agent through PostgreSQL table design, types, constraints and indexing

    • Open source
    • 1.9K GitHub stars
    • Databases
  3. Scores existing PostgreSQL tables to find which should become TimescaleDB hypertables

    • Open source
    • 1.9K GitHub stars
    • Databases
  4. Guides an agent through pgvector setup, HNSW indexing and tuning for semantic search

    • Open source
    • 1.9K GitHub stars
    • Databases
  5. Guides an agent through PostgreSQL schema design, indexing, search, TimescaleDB

    • Open source
    • 1.9K GitHub stars
    • Databases