Agent skill

Using Timeseries Databases

by ancoleman in ancoleman/ai-design-components

Time-series database implementation for metrics, IoT, financial data, and observability backends.

MITAuto-check passedDatabases

Install Using Timeseries Databases

skills CLI
$ npx skills add ancoleman/ai-design-components --skill using-timeseries-databases -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ancoleman/ai-design-components using-timeseries-databases --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ancoleman/ai-design-components.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/using-timeseries-databases .claude/skills/using-timeseries-databases && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
using-timeseries-databases
GitHub stars
526
Token cost
~1.7k tokens
SKILL.md length
511 words
Files
15 (incl. scripts, references)
Skills in repo
75
Repo updated
First seen
Licence
MIT

At a glance

Time-series database implementation for metrics, IoT, financial data, and observability backends.

  • Works in 4 steps: Hypertables (TimescaleDB) → Continuous Aggregates → Retention Policies → …
  • Building dashboards
  • SKILL.md covers Database Selection, Core Patterns, Dashboard Integration and Database-Specific Details, plus 2 more sections
  • Runs Python and Go scripts from its folder

What it does

Using Timeseries Databases is an agent skill from ancoleman/ai-design-components. Time-series database implementation for metrics, IoT, financial data, and observability backends. Use when building dashboards, monitoring systems, IoT platforms, or financial applications. Covers TimescaleDB (PostgreSQL), InfluxDB, ClickHouse, QuestDB, continuous aggregates, downsampling (LTTB), and retention policies.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 19 other files, including scripts and reference files (for example `README.md`, `examples/iot-data-pipeline/README.md` and `examples/metrics-dashboard-backend/README.md`).

It sits in Databases, covering Forecasting and time series, Data warehousing and Observability. It works with PostgreSQL, ClickHouse and SQL. The repository describes itself as: Comprehensive UI/UX and Backend component design skills for AI-assisted development with Claude. The licence is MIT.

When your agent uses it

  • Building dashboards
  • Monitoring systems
  • Financial applications

Example prompts

  • “/using-timeseries-databases”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Hypertables (TimescaleDB)
  2. Continuous Aggregates
  3. Retention Policies
  4. Downsampling for Visualization

What it can do on your machine

Read from SKILL.md and the folder at commit 76551b7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python and Go), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Using Timeseries Databases loads about 1.7k tokens when it runs, and up to ~20k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 511 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~20k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ancoleman/ai-design-components at commit 76551b7, republished under its MIT licence (© ancoleman). 511 words, ~1,683 tokens.

Download SKILL.mdSave it as .claude/skills/using-timeseries-databases/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
using-timeseries-databases
description
Time-series database implementation for metrics, IoT, financial data, and observability backends. Use when building dashboards, monitoring systems, IoT platforms, or financial applications. Covers TimescaleDB (PostgreSQL), InfluxDB, ClickHouse, QuestDB, continuous aggregates, downsampling (LTTB), and retention policies.

Time-Series Databases

Implement efficient storage and querying for time-stamped data (metrics, IoT sensors, financial ticks, logs).

Database Selection

Choose based on primary use case:

TimescaleDB - PostgreSQL extension

  • Use when: Already on PostgreSQL, need SQL + JOINs, hybrid workloads
  • Query: Standard SQL
  • Scale: 100K-1M inserts/sec

InfluxDB - Purpose-built TSDB

  • Use when: DevOps metrics, Prometheus integration, Telegraf ecosystem
  • Query: InfluxQL or Flux
  • Scale: 500K-1M points/sec

ClickHouse - Columnar analytics

  • Use when: Fastest aggregations needed, analytics dashboards, log analysis
  • Query: SQL
  • Scale: 1M-10M inserts/sec, 100M-1B rows/sec queries

QuestDB - High-throughput IoT

  • Use when: Highest write performance needed, financial tick data
  • Query: SQL + Line Protocol
  • Scale: 4M+ inserts/sec

Core Patterns

1. Hypertables (TimescaleDB)

Automatic time-based partitioning:

sql
CREATE TABLE sensor_data (
  time        TIMESTAMPTZ NOT NULL,
  sensor_id   INTEGER NOT NULL,
  temperature DOUBLE PRECISION,
  humidity    DOUBLE PRECISION
);

SELECT create_hypertable('sensor_data', 'time');

Benefits:

  • Efficient data expiration (drop old chunks)
  • Parallel query execution
  • Compression on older chunks (10-20x savings)
2. Continuous Aggregates

Pre-computed rollups for fast dashboard queries:

sql
-- TimescaleDB: hourly rollup
CREATE MATERIALIZED VIEW sensor_data_hourly
WITH (timescaledb.continuous) AS
SELECT time_bucket('1 hour', time) AS hour,
       sensor_id,
       AVG(temperature) AS avg_temp,
       MAX(temperature) AS max_temp,
       MIN(temperature) AS min_temp
FROM sensor_data
GROUP BY hour, sensor_id;

-- Auto-refresh policy
SELECT add_continuous_aggregate_policy('sensor_data_hourly',
  start_offset => INTERVAL '3 hours',
  end_offset => INTERVAL '1 hour',
  schedule_interval => INTERVAL '1 hour');

Query strategy:

  • Short range (last hour): Raw data
  • Medium range (last day): 1-minute rollups
  • Long range (last month): 1-hour rollups
  • Very long (last year): Daily rollups
3. Retention Policies

Automatic data expiration:

sql
-- TimescaleDB: delete data older than 90 days
SELECT add_retention_policy('sensor_data', INTERVAL '90 days');

Common patterns:

  • Raw data: 7-90 days
  • Hourly rollups: 1-2 years
  • Daily rollups: Infinite retention
4. Downsampling for Visualization

Use LTTB (Largest-Triangle-Three-Buckets) algorithm to reduce points for charts.

Problem: Browsers can't smoothly render 1M points Solution: Downsample to 500-1000 points preserving visual fidelity

sql
-- TimescaleDB toolkit LTTB
SELECT time, value
FROM lttb(
  'SELECT time, temperature FROM sensor_data WHERE sensor_id = 1',
  1000  -- target number of points
);

Thresholds:

  • < 1,000 points: No downsampling
  • 1,000-10,000 points: LTTB to 1,000 points
  • 10,000+ points: LTTB to 500 points or use pre-aggregated data

Dashboard Integration

Time-series databases are the primary data source for real-time dashboards.

Query patterns by component:

ComponentQuery PatternExample
KPI CardLatest valueSELECT temperature FROM sensors ORDER BY time DESC LIMIT 1
Trend ChartTime-bucketed avgSELECT time_bucket('5m', time), AVG(cpu) GROUP BY 1
HeatmapMulti-metric windowSELECT hour, AVG(cpu), AVG(memory) GROUP BY hour
AlertThreshold checkSELECT COUNT(*) WHERE cpu > 80 AND time > NOW() - '5m'

Data flow:

  1. Ingest metrics (Prometheus, MQTT, application events)
  2. Store in time-series DB with continuous aggregates
  3. Apply retention policies (raw: 30d, rollups: 1y)
  4. Query layer downsamples to optimal points (LTTB)
  5. Frontend renders with Recharts/visx

Auto-refresh intervals:

  • Critical alerts: 1-5 seconds (WebSocket)
  • Operations dashboard: 10-30 seconds (polling)
  • Analytics dashboard: 1-5 minutes (cached)
  • Historical reports: On-demand only
Show full SKILL.md (157 more words)Show less

Database-Specific Details

For implementation guides, see:

  • references/timescaledb.md - Setup, tuning, compression
  • references/influxdb.md - InfluxQL/Flux, retention policies
  • references/clickhouse.md - MergeTree engines, clustering
  • references/questdb.md - Line Protocol, SIMD optimization

For downsampling implementation:

  • references/downsampling-strategies.md - LTTB algorithm, aggregation methods

For examples:

  • examples/metrics-dashboard-backend/ - TimescaleDB + FastAPI
  • examples/iot-data-pipeline/ - InfluxDB + Go for IoT

For scripts:

  • scripts/setup_hypertable.py - Create TimescaleDB hypertables
  • scripts/generate_retention_policy.py - Generate retention policies

Performance Optimization

Write Optimization

Batch inserts:

DatabaseBatch SizeExpected Throughput
TimescaleDB1,000-10,000100K-1M rows/sec
InfluxDB5,000+500K-1M points/sec
ClickHouse10,000-100,0001M-10M rows/sec
QuestDB10,000+4M+ rows/sec
Query Optimization

Rule 1: Always filter by time first (indexed)

sql
-- BAD: Full table scan
SELECT * FROM metrics WHERE metric_name = 'cpu';

-- GOOD: Time index used
SELECT * FROM metrics
WHERE time > NOW() - INTERVAL '1 hour'
  AND metric_name = 'cpu';

Rule 2: Use continuous aggregates for dashboard queries

sql
-- BAD: Aggregate 1B rows every dashboard load
SELECT time_bucket('1 hour', time), AVG(cpu)
FROM metrics
WHERE time > NOW() - INTERVAL '30 days'
GROUP BY 1;

-- GOOD: Query pre-computed rollup
SELECT hour, avg_cpu
FROM metrics_hourly
WHERE hour > NOW() - INTERVAL '30 days';

Rule 3: Downsample for visualization

typescript
// Request optimal point count
const points = Math.min(1000, chartWidth);
const query = `/api/metrics?start=${start}&end=${end}&points=${points}`;

Use Cases

DevOps Monitoring → InfluxDB or TimescaleDB

  • Prometheus metrics, application traces, infrastructure

IoT Sensor Data → QuestDB or TimescaleDB

  • Millions of devices, high write throughput

Financial Tick Data → QuestDB or ClickHouse

  • Sub-millisecond queries, OHLC aggregates

User Analytics → ClickHouse

  • Event tracking, daily active users, funnel analysis

Real-time Dashboards → Any TSDB + Continuous Aggregates

  • Pre-computed rollups, WebSocket streaming, LTTB downsampling

© ancoleman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 14 other files (scripts, references) in skills/using-timeseries-databases of ancoleman/ai-design-components.

  • SKILL.md
  • README.md
  • examples/iot-data-pipeline/README.md
  • examples/iot-data-pipeline/main.go
  • examples/metrics-dashboard-backend/README.md
  • examples/metrics-dashboard-backend/api.py
  • examples/metrics-dashboard-backend/schema.sql
  • outputs.yaml
  • references/clickhouse.md
  • references/downsampling-strategies.md
  • references/influxdb.md
  • references/questdb.md
  • references/timescaledb.md
  • scripts/generate_retention_policy.py
  • scripts/setup_hypertable.py

Open the folder on GitHubat commit 76551b7

Compare with similar skills

Using Timeseries Databases next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Using Timeseries Databases compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Using Timeseries Databases this skillancoleman/ai-design-components526—~1.7kAutomated safety check: PassMIT
Clickhouse Logs Queriessupabase/supabase111k—~2.4kAutomated safety check: PassApache-2.0
Chdb Datastorevemetric/vemetric3942 repos~1.4kAutomated safety check: PassApache-2.0
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
Querying Tempotempoxyz/tidx107—~3.1kAutomated safety check: PassMIT
Semantic Analystsidequery/sidemantic129—~982Automated safety check: PassAGPL-3.0

Similar skills

  • Clickhouse Logs Queries

    supabase/supabase

    Official

    Write, review, and migrate Supabase logs queries against the ClickHouse-backed logs table (the logs.all.otel analytics endpoint).

    111k GitHub stars~2.4k tokensUpdated today
    DatabasesAuto-check passed
  • Chdb Datastore

    vemetric/vemetric

    A skill your agent uses when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.

    394 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    394 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Querying Tempo

    tempoxyz/tidx

    Query indexed Tempo chain data via tidx HTTP API and CLI. An agent skill from tempoxyz/tidx.

    107 GitHub stars~3.1k tokensUpdated today
    DatabasesAuto-check passed
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated today
    DatabasesAuto-check passed
  • Database Migration

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…

    288 GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed

More from ancoleman/ai-design-components

All 75 skills in this repo
  • Building AI Chat

    ancoleman/ai-design-components

    Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support.

    526 GitHub starsUsed in 1 repo~3.4k tokens
    Auto-check passed
  • Building Forms

    ancoleman/ai-design-components

    Builds form components and data collection interfaces including contact forms, registration flows, checkout processes, surveys, and settings pages.

    526 GitHub stars~3.7k tokensUpdated 10 mo ago
    Auto-check passed
  • Building Tables

    ancoleman/ai-design-components

    Builds tables and data grids for displaying tabular information, from simple HTML tables to complex enterprise data grids.

    526 GitHub stars~1.8k tokensUpdated 10 mo ago
    Auto-check passed
  • Creating Dashboards

    ancoleman/ai-design-components

    Creates comprehensive dashboard and analytics interfaces that combine data visualization, KPI cards, real-time updates, and interactive layouts.

    526 GitHub stars~3.5k tokensUpdated 10 mo ago
    Auto-check passed
  • Designing Layouts

    ancoleman/ai-design-components

    Designs layout systems and responsive interfaces including grid systems, flexbox patterns, sidebar layouts, and responsive breakpoints.

    526 GitHub stars~1.7k tokensUpdated 10 mo ago
    Auto-check passed
  • Displaying Timelines

    ancoleman/ai-design-components

    Displays chronological events and activity through timelines, activity feeds, Gantt charts, and calendar interfaces.

    526 GitHub stars~2.7k tokensUpdated 10 mo ago
    Auto-check passed

Questions about Using Timeseries Databases

What does Using Timeseries Databases do?

Time-series database implementation for metrics, IoT, financial data, and observability backends. Using Timeseries Databases is an agent skill from ancoleman/ai-design-components. Time-series database implementation for metrics, IoT, financial data, and observability backends.

When should I use Using Timeseries Databases?

Using Timeseries Databases fits situations like: building dashboards; monitoring systems; financial applications.

How do I install Using Timeseries Databases in Claude Code?

Run `npx skills add ancoleman/ai-design-components --skill using-timeseries-databases -a claude-code`. Or copy the skill folder (skills/using-timeseries-databases in ancoleman/ai-design-components) into .claude/skills/using-timeseries-databases in your project. Claude Code loads it when a task matches its description.

How do I install Using Timeseries Databases in Codex?

Run `npx skills add ancoleman/ai-design-components --skill using-timeseries-databases -a codex`. Or copy the skill folder (skills/using-timeseries-databases in ancoleman/ai-design-components) into .agents/skills/using-timeseries-databases in your project. Codex loads it when a task matches its description.

Can I use Using Timeseries Databases in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ancoleman/ai-design-components --skill using-timeseries-databases -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/using-timeseries-databases, .gemini/skills/using-timeseries-databases, .github/skills/using-timeseries-databases and .opencode/skills/using-timeseries-databases in your project.

What does Using Timeseries Databases need to run?

Going by SKILL.md and its folder, Using Timeseries Databases needs Python and Go for the scripts in its folder. Our summary lists: Python 3.

Does Using Timeseries Databases access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Using Timeseries Databases safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Using Timeseries Databases use?

Using Timeseries Databases is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Using Timeseries Databases use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 19k tokens, read only when the agent opens those files.

What are the alternatives to Using Timeseries Databases?

Skills that share tags, products or a category with Using Timeseries Databases: Clickhouse Logs Queries (supabase/supabase, 111k stars), Chdb Datastore (vemetric/vemetric, 394 stars), Chdb SQL (vemetric/vemetric, 394 stars) and Querying Tempo (tempoxyz/tidx, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Using Timeseries Databases?

ancoleman (a GitHub user) maintains it in ancoleman/ai-design-components, which has 526 GitHub stars. The repository holds 75 skills in this directory. The repository was last updated on December 11, 2025.

Source: ancoleman/ai-design-components on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.