tdgpt-model-writer

tdgpt-model-writer is a skill for Claude Code, Codex from taosdata/agent-skills. It costs 69 tokens per session (3,615 once invoked), scanned A, original, MIT.

A code-writing aid for TDengine, a time-series database that stores timestamped data such as sensor readings. It creates Python forecasting models and data-preparation pipelines that follow the TDgpt format.

In plain words
What is it for?
Use it to generate models such as LSTM, GRU, DLinear, or lightweight statistical forecasts from a TDengine supertable. It also prepares the history and future windows needed to train or run the model.
Why use it?
It removes much of the manual work of aligning timestamps, resampling data, handling missing values, and adapting the result to TDgpt. This helps when building forecasts from several related measurements.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex.

Good fit Use it to generate models such as LSTM, GRU, DLinear, or lightweight statistical forecasts from a TDengine supertable. It also prepares the history and future windows needed to train or run the model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/taosdata/agent-skills/tdgpt-model-writer
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 taosdata/agent-skills --skill tdgpt-model-writer
Clone the repo
git clone --depth 1 https://github.com/taosdata/agent-skills

Made for: Claude Code, Codex.

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 tdgpt-model-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/taosdata/agent-skills/tdgpt-model-writer/github.svg)](https://agentmods.dev/skills/taosdata/agent-skills/tdgpt-model-writer)
Your own site
<a href="https://agentmods.dev/skills/taosdata/agent-skills/tdgpt-model-writer"><img src="https://agentmods.dev/badge/skills/taosdata/agent-skills/tdgpt-model-writer/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 tdgpt-model-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/taosdata/agent-skills/tdgpt-model-writer"><img src="https://agentmods.dev/badge/skills/taosdata/agent-skills/tdgpt-model-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,615 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00069 $0.03615
Opus 5 $0.00034 $0.01808
Sonnet 5 $0.00014 $0.00723
Haiku 4.5 $0.00007 $0.00362

Measured 12d ago against content hash 98a4afee9f62, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

tdgpt-model-writer scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (assets/data_align_template.py, assets/pytorch_lstm_template.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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sk --max-time 3 -X POST \
skills/tdgpt-model-writer/SKILL.md · 230 lines

How it starts

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

TDGPT 时序预测模型自动编写 (tdgpt-model-writer)

何时使用 (When to Use)

当算法人员或开发人员需要为 TDengine 时序数据库开发自定义的时序预测分析模型,并不想手动处理复杂的时序特征对齐、重采样和格式适配时,使用此技能。

此技能可以一键生成符合 TDgpt (时序模型管理器) anode 插件规范的 Python 算法代码以及对应的特征对齐 Pipeline。

触发关键词写时序预测模型生成时序模型TDGPT模型特征对齐tdgpt-model-writer时序预测模型

输入 (Input)

  • 核心输入
    • 超级表结构 (STable Schema):包含时间戳列(通常为 ts)、标签/预测目标列(因变量)以及相关协变量特征列(自变量)。
    • 特征配置 (Feature Config)
      • 主预测列(例如 temp_out)。
      • 协变量特征列列表(例如 ['flow_rate', 'pressure', 'ambient_temp'])。
    • 时序对齐参数
      • 采样/重采样频率(如 1m10s,缺省为 1m)。
      • 插值与填充策略(如 linear 线性插值,ffill/bfill 填充,缺失值处理)。
    • 滑动窗口参数
      • 历史回顾点数(Lookback Window Size,例如 60 个点)。
      • 预测步长点数(Forecast Horizon/Rows,例如 10 个点)。
    • 算法/模型偏好
      • 传统统计或数学插值法(如 myfc 风格轻量预测)。
      • 深度学习/机器学习框架类模型(基于 PyTorchLSTM / GRU / DLinear 模型)。
  • 澄清策略
    • 若未指定采样频率,默认使用超级表平均时间间隔作为重采样基准。
    • 若未指定预测算法,默认生成基于 PyTorch LSTM 的双变量/多变量特征预测模型结构。

输出 (Output)

根据用户输入的超级表结构和预测需求,AI 助手应输出以下四个部分的内容:

1. 符合 TDgpt 规范的 Python 预测类代码

必须将其生成在文件 _name_Service.py 中,并提醒用户放置在 anode 的算法预测目录下(即 anode安装根目录/lib/taosanalytics/algo/fc/)。代码需满足以下要求:

  • 类名必须以下划线 _ 开头,且以 Service 结尾(如:class _LstmForecastService(AbstractForecastService):)。
  • 必须继承自 taosanalytics.service.AbstractForecastService
  • 必须显式声明类静态属性 name(全小写,SQL 中调用算法的标识)和 desc(算法描述)。
  • 核心方法 execute(self) 的输入获取和输出格式必须符合 TDgpt 的规范:
    • 输入时序历史序列在 self.list 中。
    • 获取运行参数如:self.start_ts (预测起始时间戳), self.time_step (时间间隔), self.rows (预测点数)。
    • 返回值字典格式(必须根据 self.return_conf 动态调整数组维度):
      • self.return_conf0 时,res 仅包含 2 个等长数组:

        return {
            "mse": mse_value,  # float, 预测损失均方误差
            "res": [ts_list, pred_list]  # 仅包含时间戳和预测值数组
        }
        
      • self.return_conf1 时,res 必须包含 4 个等长数组:

        return {
            "mse": mse_value,
            "res": [ts_list, pred_list, conf_lower_list, conf_upper_list]  # 包含置信下界和上界
        }
        

Read the full file on GitHub · 230 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 230 lines · 69 tokens per session scan A 98a4afee9f62

Subscribe to this mod's changes

tdgpt-model-writer is a skill published in the GitHub repository taosdata/agent-skills (3 stars, last pushed 5d ago), licensed MIT. It adds 69 tokens to every session and 3,615 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

accelerate

Run PyTorch training across GPUs with minimal changes.

NousResearch/hermes-agent · 13 tokens

pytorch-patterns

PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.

affaan-m/ECC · 32 tokens

optimize-for-gpu

GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster. Use for CUDA/GPU optimization; CPU-bound NumPy, SciPy, pandas, scikit-learn, NetworkX, scikit-image, vector-search, image-processing, graph, simulation, or file-I/O workloads; CuPy, cuDF, cuML, cuGraph, cuVS…

K-Dense-AI/scientific-agent-skills · 151 tokens

developing-genkit-python

Develop AI-powered applications using Genkit in Python. Use when the user asks about Genkit, AI agents, flows, or tools in Python, or when encountering Genkit errors, import issues, or API problems.

google/skills · 49 tokens

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens

minicpm5-deploy-transformers

Run MiniCPM5-1B or MiniCPM5-2B with Hugging Face Transformers for one-shot Python generation on GPU (bfloat16) or CPU (float32). Use when the user wants a quick Python script, no server, no extra deps, or asks for "Transformers", "AutoModelForCausalLM", "model.generate" with MiniCPM5.

OpenBMB/MiniCPM · 90 tokens