using-timeseries-databases

using-timeseries-databases is a skill for Claude Code from ancoleman/ai-design-components. It costs 75 tokens per session (1,754 once invoked), scanned A, original, MIT.

A guide to time-series databases, which are designed for records collected over time, such as sensor readings, metrics, financial prices, and logs. It covers TimescaleDB, InfluxDB, ClickHouse, QuestDB, retention, aggregation, and downsampling.

In plain words
What is it for?
Use it for monitoring dashboards, IoT platforms, observability data, financial tick data, logs, metrics, retention policies, and continuous aggregates.
Why use it?
It helps store and query large streams of time-stamped data efficiently. It also helps select a database based on workload, existing systems, and the need for fast summaries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the backend-data-skills plugin — 6 skills shipped together

Good fit Use it for monitoring dashboards, IoT platforms, observability data, financial tick data, logs, metrics, retention policies, and continuous aggregates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ancoleman/ai-design-components/using-timeseries-databases
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ancoleman/ai-design-components --skill using-timeseries-databases
Clone the repo
git clone --depth 1 https://github.com/ancoleman/ai-design-components

Made for: Claude Code.

Or install backend-data-skills, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for using-timeseries-databases

README.md
[![agentmods](https://agentmods.dev/badge/skills/ancoleman/ai-design-components/using-timeseries-databases/github.svg)](https://agentmods.dev/skills/ancoleman/ai-design-components/using-timeseries-databases)
Your own site
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/using-timeseries-databases"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/using-timeseries-databases/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for using-timeseries-databases

Your own site · 80×15
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/using-timeseries-databases"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/using-timeseries-databases.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,754 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01754
Opus 5.5 $0.00030 $0.00702
Sonnet 5.5 $0.00015 $0.00351
Haiku 4.5 $0.00007 $0.00175

Measured 1mo ago against content hash b859dd8a33b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-timeseries-databases scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (examples/metrics-dashboard-backend/api.py, scripts/generate_retention_policy.py, scripts/setup_hypertable.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/using-timeseries-databases/SKILL.md · 231 lines

How it starts

The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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:

-- 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

Read the full file on GitHub · 231 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 231 lines · 75 tokens per session scan A b859dd8a33b0

Subscribe to this mod's changes

using-timeseries-databases is a skill published in the GitHub repository ancoleman/ai-design-components (525 stars, last pushed 10mo ago), licensed MIT. It adds 75 tokens to every session and 1,754 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.