Agent skill · Audited from source
setup-timescaledb-hypertables
skill · timescale/pg-aiguideApache-2.0 licenceAudited 28 Oct 2026 · source c8ed45084a23
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit c8ed45084a23 and found no filesystem, network or shell access and no hard-coded secrets. What it does: 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…
Cite
Cite this page
ModelsAtlas. “setup-timescaledb-hypertables (timescale/pg-aiguide)”. Retrieved 28 Oct 2026. https://modelsatlas.com/skills/timescale/setup-timescaledb-hypertables
Trust audit
Audit 0.4.1 · source read 28 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 13,985 of 14,816 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 5 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (5)
LOWInventory / provenanceinv.symlink · skills/postgres/references/backfill-strategies.md
skills/postgres/references/backfill-strategies.md
- Why
- link not followed
- Fix
- —
LOWInventory / provenanceinv.symlink · skills/postgres/references/complete-example.md
skills/postgres/references/complete-example.md
- Why
- link not followed
- Fix
- —
LOWInventory / provenanceinv.symlink · skills/postgres/references/design-postgis-tables.md
skills/postgres/references/design-postgis-tables.md
- Why
- link not followed
- Fix
- —
LOWInventory / provenanceinv.symlink · skills/postgres/references/design-postgres-tables.md
skills/postgres/references/design-postgres-tables.md
- Why
- link not followed
- Fix
- —
LOWInventory / provenanceinv.symlink · skills/postgres/references/find-hypertable-candidates.md
skills/postgres/references/find-hypertable-candidates.md
- Why
- link not followed
- Fix
- —
Audit 0.4.1 · source sha c8ed45084a23 · 28 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishertimescale GitHub organizationOwner of the repository this skill is read from
- Source foldertimescale/pg-aiguide/skills/setup-timescaledb-hypertablesThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdictc8ed45084a23A new audit runs when the source changes
- Repository statusNot archivedLast push 1 day ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: 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…
---
name: setup-timescaledb-hypertables
description: |
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.
license: Apache-2.0
compatibility: Requires PostgreSQL 15+ with TimescaleDB
metadata:
author: tigerdata
---
# 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)' -- see selection guide below
);
```
### Compression Decision
- **Enable by default** for insert-heavy patterns
- **Disable** if table has vector type columns (pgvector) - indexes on vector columns incompatible with columnstore
### Partition Column Selection
Must be time-based (TIMESTAMP/TIMESTAMPTZ/DATE) or integer (INT/BIGINT) with good temporal/sequential distribution.
**Common patterns:**
- TIME-SERIES: `timestamp`, `event_time`, `measured_at`
- EVENT LOGS: `event_time`, `created_at`, `logged_at`
- TRANSACTIONS: `created_at`, `transaction_time`, `processed_at`
- SEQUENTIAL: `id` (auto-increment when no timestamp), `sequence_number`
- APPEND-ONLY: `created_at`, `inserted_at`, `id`
**Less ideal:** `ingested_at` (when data entered system - use only if it's your primary query dimension)
**Avoid:** `updated_at` (breaks time ordering unless it's primary query dimension)
### Segment_By Column Selection
**PREFER SINGLE COLUMN** - multi-column rarely optimal. Multi-column can only work for highly correlated columns (e.g., metric_name + metric_type) with sufficient row density.
**Requirements:**
- Frequently used in WHERE clauses (most common filter)
- Good row density (>100 rows per value per chunk)
- Primary logical partition/grouping
**Examples:**
- IoT: `device_id`
- Finance: `symbol`
- Metrics: `service_name`, `service_name, metric_type` (if sufficient row density), `metric_name, metric_type` (if sufficient row density)
- Analytics: `user_id` if sufficient row density, otherwise `session_id`
- E-commerce: `product_id` if sufficient row density, otherwise `category_id`
**Row density guidelines:**
- Target: >100 rows per segment_by value within each chunk.
- Poor: <10 rows per segment_by value per chunk → choose less granular column
- What to do with low-density columns: prepend to order_by column list.
**Query pattern drives choice:**
```sql
SELECT * FROM table WHERE entity_id = 'X' AND timestamp > ...
-- ↳ segment_by: entity_id (if >100 rows per chunk)
```
**Avoid:** timestamps, unique IDs, low-density columns (<100 rows/value/chunk), columns rarely used in filtering
### Order_By Column Selection
Creates natural time-series progression when combined with segment_by for optimal compression.
**Most common:** `timestamp DESC`
**Examples:**
- IoT/Finance/E-commerce: `timestamp DESC`
- Metrics: `metric_name, timestamp DESC` (if metric_name has too low density for segment_by)
- Analytics: `user_id, timestamp DESC` (user_id has too low density for segment_by)
**Alternative patterns:**
- `sequence_id DESC` for event streams with sequence numbers
- `timestamp DESC, event_order DESC` for sub-ordering within same timestamp
**Low-density column handling:**
If a column has <100 rows per chunk (too low for segment_by), prepend it to order_by:
- Example: `metric_name` has 20 rows/chunk → use `segment_by='service_name'`, `order_by='metric_name, timestamp DESC'`
- Groups similar values together (all temperature readings, then pressure readings) for better compression
**Good test:** ordering created by `(segment_by_column, order_by_column)` should form a natural time-series progression. Values close to each other in the progression should be similar.
**Avoid in order_by:** random columns, columns with high variance between adjacent rows, columns unrelated to segment_by
### Compression Sparse Index Selection
**Sparse indexes** enable query filtering on compressed data without decompressExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit c8ed450
git clone https://github.com/timescale/pg-aiguide git -C pg-aiguide checkout c8ed45084a23
The author documents no install command, so this uses the repository directly. Our verdict covers commit c8ed45084a23 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
c8ed45084a23
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/timescale/setup-timescaledb-hypertables/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →timescale/pg-aiguide
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation.
timescale/pg-aiguide
Use this skill to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables.
timescale/pg-aiguide
Use this skill for general PostgreSQL table design.
timescale/pg-aiguide
Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.
timescale/pg-aiguide
Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF).
timescale/pg-aiguide
Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications
Add this badge to your README
[](https://modelsatlas.com/skills/timescale/setup-timescaledb-hypertables/)
<a href="https://modelsatlas.com/skills/timescale/setup-timescaledb-hypertables/"><img src="https://modelsatlas.com/skills/timescale/setup-timescaledb-hypertables/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about setup-timescaledb-hypertables
What does the setup-timescaledb-hypertables skill do?
Is setup-timescaledb-hypertables safe to install?
What can setup-timescaledb-hypertables access on my machine?
How current is this page?
Sources
- github.com/timescale/pg-aiguide/tree/main/skills/setup-timescale — the audited source at commit c8ed45084a23 and every finding aboveObserved · 28 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the setup-timescaledb-hypertables skill do?
- Is setup-timescaledb-hypertables safe to install?
- What can setup-timescaledb-hypertables access on my machine?