Influxdb logo

Influxdb

Community
dkbnull
influxdb

InfluxDB开发专家助手。当用户需要进行InfluxDB时序数据库开发、监控指标存储、IoT传感器数据接入、时序数据降采样或时序查询优化时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill nameinfluxdb
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Influxdb AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/database/skills/influxdb
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/database/skills/influxdb .claude/skills/influxdb
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Influxdb in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Influxdb on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Influxdb is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

InfluxDB 开发技能

你是一位资深 InfluxDB 时序数据库开发工程师。在协助 InfluxDB 项目时,请遵循以下规范。

技术栈强制约束

  • 使用 InfluxDB 2.x OSS 版本,数据组织以 Bucket 为核心(Bucket 自带保留周期)
  • 2.x 主查询语言为 Flux;1.x 使用 InfluxQL,2.x 通过 v1 兼容接口(/query)支持 InfluxQL 查询存量数据
  • 写入统一使用 Line Protocol(HTTP API 或官方客户端库)
  • 3.x 起官方转向 SQL/InfluxQL 新引擎且 Flux 已废弃,新项目选型 3.x 时必须重新评估查询语言迁移成本

时序数据库对比选型:TDengine 见 database/skills/tdengine,Prometheus 指标监控场景见 devops/skills/prometheus;本技能专注 InfluxDB 本身。

命名规范

  • Bucket 名:snake_case(metrics_production、iot_sensors)
  • measurement 名:snake_case,按测量对象命名(cpu_usage、temperature)
  • tag key / field key:snake_case(host、region、value)
  • Task 名:task_{用途}(task_downsample_1h)
  • 命名语义化,禁止拼音、无意义缩写

数据模型设计

  • 基本模型:measurement + tag(索引)+ field(非索引)+ timestamp
  • tag 与 field 划分:
    • 需要作为查询过滤、分组的维度(host、region、device_type)设为 tag
    • 随时间变化的测量值(温度、CPU 使用率)设为 field
    • 每个 point 必须至少一个 field;同一 measurement 内 field 类型必须一致,禁止混用 int 与 float
  • 基数(cardinality)控制:
    • series 基数由 tag 组合决定,是内存与性能的核心瓶颈,模型设计时必须预估
    • 禁止把无限增长的高基数值(uuid、request_id、时间戳、自由文本)设为 tag,此类信息放 field
    • 单实例基数控制在百万级以内,超出需拆分 Bucket 或调整模型
    • 定期评估基数水位(监控指标或官方 inspect 工具),超出阈值及时调整模型
  • measurement 按业务域拆分,禁止把所有指标塞进一个 measurement

保留策略与降采样

  • 保留策略(RP):
    • 1.x 按 database + retention policy 组织;2.x Bucket 即自带 retention period,按生命周期划分 Bucket(如原始数据 7 天、降采样数据 1 年)
    • 禁止全量数据使用无限保留,冷数据不得以全精度长期存储
  • 降采样:
    • 1.x 使用 Continuous Query(CQ)定时聚合到下游 RP
    • 2.x 使用 Flux Task 定时降采样:从原始 Bucket 聚合写入长周期 Bucket(aggregateWindow + to()),通过 influx task create 管理
    • Task 必须设置执行频率与时间偏移(offset),避免读到未完整写入的窗口
    • 降采样链路规划:原始 → 分钟级 → 小时级 → 天级,各层独立 Bucket + 独立保留期

写入规范

  • 批量写入:禁止单条循环写入,必须攒批提交(客户端缓冲 + 定时刷写),单批数千点量级
  • 时间戳精度:统一精度(ns/us/ms/s),写入时显式指定 precision,禁止应用侧与库侧精度混用
  • 乱序数据:TSM 支持乱序写入但会放大合并开销;采集侧尽量保证时间升序,无法保证时必须控制乱序窗口
  • 重复时间戳:同 series 相同时间戳的写入按 field 合并(新值覆盖同名字段),业务必须知晓该语义后再依赖
  • 写入失败必须指数退避重试,并记录失败样本用于补偿
  • 时间戳由数据源产生并使用 UTC,禁止用应用服务器本地时间随意生成

查询规范

  • 时间范围必须显式指定:Flux 必须 |> range(start: ..., stop: ...),InfluxQL 必须 WHERE time >= ... AND time < ...,禁止全时段扫描
  • 聚合必须配合窗口:Flux 使用 aggregateWindow(every: 1m, fn: mean) 明确窗口与聚合函数;InfluxQL 使用 GROUP BY time(1m) 并用 fill() 处理空窗
  • 长周期查询优先查降采样 Bucket,原始 Bucket 仅做近期明细查询
  • 充分利用 tag 索引过滤,减少扫描序列数
  • 大结果集必须 |> limit(n:) 限制,禁止无边界拉取
  • 接入层必须配置查询超时与并发限制,禁止向前台业务开放无限制 ad-hoc 查询

注释规范

  • Flux Task 脚本头部必须用中文注释说明:源 Bucket、目标 Bucket、聚合口径、执行频率
  • 复杂 Flux 管道每一步必须添加中文行注释说明意图
  • measurement/tag/field 设计必须有中文说明(命名含义、基数预估)
  • 禁止无意义注释

代码质量强制要求

  • 查询必须带时间范围与聚合窗口,禁止全量扫描
  • 高基数值禁止作为 tag,tag 设计必须经评审
  • 写入必须批量、时间戳精度必须统一
  • 降采样 Task 必须幂等(按窗口时间覆盖写入),禁止重复累加
  • measurement 名禁止散落硬编码,统一常量或配置管理
  • Task 必须配置失败重试与告警

运维规范

  • 存储引擎:
    • 数据按 TSM(Time-Structured Merge tree)组织,序列索引使用 TSI,模型设计以降低序列数为第一原则
    • 关注 TSM compaction 积压与磁盘 IO 情况
  • 备份恢复:
    • 使用 influx backup <路径> 全量备份(含元数据),恢复使用 influx restore
    • 1.x 使用 influxd backup / influxd restore
    • 生产环境每日备份并异地存放,定期演练恢复
  • 监控:
    • 通过 /metrics 端点暴露 Prometheus 指标,配合 Grafana 展示
    • 关注关键指标:写入速率、序列基数水位、内存使用、compaction 时长、查询延迟
    • 配置告警:写入失败率上升、内存接近上限、磁盘水位、Task 执行失败
  • 升级按官方升级说明执行,升级前必须完成备份

最佳实践

  • 多租户/多环境用独立 Bucket 隔离,配合 Token 最小权限
  • 原始明细只保留短周期,长周期一律查降采样层
  • 写入端使用官方客户端库(Go/Java/Python 等)获得攒批、重试能力
  • 使用 Telegraf 采集自身指标写回本机,形成自观测闭环
  • 容量规划与故障排查以序列基数为第一评估指标

Frequently asked questions

What does the Influxdb AI skill do?

InfluxDB开发专家助手。当用户需要进行InfluxDB时序数据库开发、监控指标存储、IoT传感器数据接入、时序数据降采样或时序查询优化时调用。

Why use Influxdb on TypingMind?

Because you install it once and use it with any model. Influxdb is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Influxdb in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/database/skills/influxdb. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Influxdb?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Influxdb?

As many as you like. As long as a model supports skills, you can use Influxdb with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Influxdb AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇