# Find hypertable candidates

> Find hypertable candidates is an open-source agent skill for databases. Scores existing PostgreSQL tables to find which should become TimescaleDB hypertables. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/timescale/pg-aiguide/tree/main/skills/find-hypertable-candidates
- **Repository:** https://github.com/timescale/pg-aiguide
- **GitHub stars:** 1,892
- **License:** Apache-2.0
- **Skill name:** find-hypertable-candidates
- **Collection:** https://github.com/timescale/pg-aiguide
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through auditing an existing PostgreSQL schema to spot tables that suit conversion to TimescaleDB hypertables. It supplies SQL checks for table statistics, insert versus update ratios, index layout, optional pg_stat_statements query history, and constraint compatibility, along with code-level patterns to look for when no database connection is available.

Candidates are rated against a points rubric covering time columns, chronological inserts, time-based filtering and aggregation, table size, insert volume, and entity identifiers. The rubric separates time-series traits from scale and data patterns, and a total of eight or more points marks a strong candidate. The skill also explains how sequential-ID tables with a time column can still qualify, and why reference tables and frequently updated profile or settings tables usually do not.

The workflow expects a PostgreSQL 15+ database with TimescaleDB available for the surrounding analysis. Output is a per-table report of score, write pattern, access pattern, size and typical queries. The skill points to a companion migration skill for the actual conversion steps.

## When your agent uses it

> Use this skill to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables. **Trigger when user asks to:** - Analyze database tables for hypertable conversion potential - Identify time-series or event tables in an existing schema - Evaluate if a table would benefit from Timescale/TimescaleDB - Audit PostgreSQL tables for migration to Timescale/TimescaleDB/TigerData - Score or rank tables for hypertable candidacy **Keywords:** hypertable candidate, table analysis, migration assessment, Timescale, TimescaleDB, time-series detection, insert-heavy tables, event logs, audit tables Provides SQL queries to analyze table statistics, index patterns, and query patterns. Includes scoring criteria (8+ points = good candidate) and pattern recognition for IoT, events, transactions, and sequential data.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/timescale/pg-aiguide/tree/HEAD/skills/find-hypertable-candidates)
- [License: Apache-2.0](https://github.com/timescale/pg-aiguide/tree/HEAD/skills/find-hypertable-candidates)

## Features

- **Table statistics review:** Queries row counts, sizes and insert, update and delete counts for each user table.
- **Index pattern inspection:** Reads existing indexes to find time-based and entity-plus-time access patterns.
- **Candidacy scoring rubric:** Assigns points for time columns, chronological inserts, aggregations, scale and entity IDs.
- **Query history analysis:** Uses pg_stat_statements, when installed, to see how time filters and aggregations are used.
- **Constraint compatibility checks:** Flags primary keys, unique constraints and foreign keys that conflict with hypertable conversion.
- **Code-level pattern detection:** Recognises append-only logging, time-series inserts and time-range queries in application code.

## Good for

- Find which tables in my PostgreSQL database should become hypertables
- Score my event log and audit tables for TimescaleDB conversion
- Check whether a sensor readings table would benefit from Timescale
- Review my schema for migration to TimescaleDB or TigerData
- Rank tables by how well they fit time-series storage

## Install

### Claude Code

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

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

Or copy only this skill to `~/.claude/skills/find-hypertable-candidates`:

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

For one project only, put the folder in `.claude/skills/find-hypertable-candidates` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/find-hypertable-candidates` to use it in every repository:

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

For one repository only, put the folder in `.agents/skills/find-hypertable-candidates` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/find-hypertable-candidates` to use it in every project:

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

For one project only, put the folder in `.cursor/skills/find-hypertable-candidates` inside it instead.

### Gemini CLI

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

```sh
gemini skills install https://github.com/timescale/pg-aiguide.git --path skills/find-hypertable-candidates
```

Or copy the folder to `~/.gemini/skills/find-hypertable-candidates` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/find-hypertable-candidates`:

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

For one project only, put the folder in `.github/skills/find-hypertable-candidates` inside it instead.

### Other agents

Get the folder:

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

Then copy `pg-aiguide/skills/find-hypertable-candidates` into your agent's skills folder as `find-hypertable-candidates`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It targets PostgreSQL 15 or later with TimescaleDB. Query history analysis additionally needs the pg_stat_statements extension, if it is available.

### Does Find hypertable candidates change my database or migrate tables?

No. It is an analysis guide. The skill points to a separate companion skill for configuring and migrating tables.

### How does Find hypertable candidates decide a table is a good candidate?

It awards points for time columns, chronological inserts, time-based queries, aggregations, table size, insert volume and entity IDs. A score of 8 or more indicates a strong candidate.

### Which kinds of tables are poor candidates?

Reference tables, user profiles and settings tables that are accessed by ID and updated often are described as poor fits.

### How do I install Find hypertable candidates in Claude Code?

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

### Does Find hypertable candidates 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 Find hypertable candidates?

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 Find hypertable candidates?

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

## Where this comes from

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

## Alternatives

- [Migrate postgres tables to hypertables](https://ai-powered.com/skills/migrate-postgres-tables-to-hypertables): Migrate postgres tables to hypertables is an open-source agent skill for databases.
- [Setup timescaledb hypertables](https://ai-powered.com/skills/setup-timescaledb-hypertables): Setup timescaledb hypertables is an open-source agent skill for databases.
- [Postgres](https://ai-powered.com/skills/postgres-timescale): Postgres is an open-source agent skill for databases.
- [Design postgres tables](https://ai-powered.com/skills/design-postgres-tables): Design postgres tables is an open-source agent skill for databases.
- [Postgres database migration](https://ai-powered.com/skills/postgres-database-migration): Postgres database migration is an open-source agent skill for databases.
- [Database migrations](https://ai-powered.com/skills/database-migrations): Database migrations is an open-source agent skill for databases.
- [PostgreSQL optimization](https://ai-powered.com/skills/postgresql-optimization): PostgreSQL optimization is an open-source agent skill for databases.
- [Design postgis tables](https://ai-powered.com/skills/design-postgis-tables): Design postgis tables is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/find-hypertable-candidates
