add-columns

add-columns is a skill for Claude Code, Codex from datagallery-ai/dataagent. It costs 67 tokens per session (2,178 once invoked), scanned A, original, Apache-2.0.

A workflow for adding new columns to an existing data-warehouse table and updating the SQL that fills them. It uses an ALTER TABLE statement rather than creating a new table.

In plain words
What is it for?
Use it when an existing warehouse table needs one or more additional fields, including the required table-change and modified INSERT SQL files.
Why use it?
It reduces the risk of changing the wrong table or disturbing its existing columns and partition layout. It also keeps the schema change and its data-loading logic together.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when an existing warehouse table needs one or more additional fields, including the required table-change and modified INSERT SQL files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datagallery-ai/dataagent/add-columns
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 datagallery-ai/dataagent --skill add-columns
Clone the repo
git clone --depth 1 https://github.com/datagallery-ai/dataagent

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/datagallery-ai/dataagent/add-columns/github.svg)](https://agentmods.dev/skills/datagallery-ai/dataagent/add-columns)
Your own site
<a href="https://agentmods.dev/skills/datagallery-ai/dataagent/add-columns"><img src="https://agentmods.dev/badge/skills/datagallery-ai/dataagent/add-columns/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 add-columns

Your own site · 80×15
<a href="https://agentmods.dev/skills/datagallery-ai/dataagent/add-columns"><img src="https://agentmods.dev/badge/skills/datagallery-ai/dataagent/add-columns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,178 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.00067 $0.02178
Opus 5.5 $0.00027 $0.00871
Sonnet 5.5 $0.00013 $0.00436
Haiku 4.5 $0.00007 $0.00218

Measured 2d ago against content hash 17e881fee580, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-columns 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 2d ago.

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.

dataagent/plugins/de-agent/skills/add-columns/SKILL.md · 140 lines

How it starts

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

加列 Skill(ALTER TABLE ADD COLUMNS)

前置要求:执行本 skill 前,必须先确认已阅读并遵守 instructions.md 中的通用规则,本 skill 不重复上述内容。当发生冲突时,以本 skill 要求为准。

编写、修改或审核 SQL 前,读取 sql_rules skill 的 SKILL.md:ALTER DDL 使用 references/ddl_rules.md 中适用的字段类型、命名及词根校验规则;INSERT 使用 references/dml_rules.md。新建表专属的 CREATE、PARTITIONED BY、STORED AS 等声明要求不适用于 ALTER ADD COLUMNS。已有表的分区策略、已有列定义和顺序保持不变。

何时使用

  • 用户明确要求给已有表添加新字段/新列
  • 用户提到"加字段"、"新增列"、"追加特征到现有表"、"在 xxx 表上加一列"等意图
  • 目标表已在数仓中存在,只需增量扩展列定义

最终交付件

最终交付物使用 write_file 写入 workspace 目录下,交付内容:

  • 目标表 ALTER DDL 文件:alter_<table_name>.sql (Hive方言)
  • 目标表 INSERT 文件:modified_insert_<table_name>.sql (Spark SQL方言)
  • (可选) 前置原始表 ALTER DDL 文件:alter_<table_name>.sql (Hive方言)
  • (可选) 前置原始表 INSERT 文件:modified_insert_<table_name>.sql (Spark SQL方言)

工作流

按照以下工作流生成并输出任务计划,计划必须包含所有步骤。

Step 1: 确定目标表

  • 完整表名由数据库名加表名构成({数据库名}.{表名}),两者均相同才算同一张表,否则视为不同表
  • 如果用户提供了具体表名,调用 validate_table_name 工具校验表名是否合法;如果表名不合法,要求用户确认
  • 如果用户未指定表名
    • 使用 read_file 读取本 skill 目录下的 references/base_feature_tables.md,根据用户需求关键词匹配最相关的表
    • 使用 task(subagent_type="metadata-recall") 工具获取这些表的详细信息,分析后选择最相关的表
    • 目标表必须是 base_feature_tables.md 所列出的表,如果无法确定目标表,要求用户确认

Step 2: 查询已有表的元数据

  • 使用 check_table_existence 工具检查目标表是否存在:该工具查询元数据服务并返回完整 schema
    • 如果返回 exists=False(表不存在):立即跳转”降级”章节,禁止重试、使用 task(subagent_type="metadata-recall") 搜索、禁止跳过继续执行后续步骤
    • 如果返回 exists=True:继续后续步骤,schema 信息已包含在返回结果中
  • 使用 query_sql_process 工具获取目标表当前的 INSERT SQL,如果无法获取,要求用户提供当前表的 INSERT SQL,禁止重试或跳过该步骤

Step 3: 检查前置原始表

  • 使用 read_file 读取本 skill 目录下 references/base_feature_tables.md,如果目标表存在前置原始表(数据库名与表名均相同才视为同一张表),则:
    • 使用 check_table_existence 检查是否存在,如果不存在则告知用户并跳过该步骤
    • 使用 query_sql_process 获取前置原始表的 INSERT SQL,如果不存在则告知用户并跳过该步骤
    • 将前置原始表也纳入修改范围,后续步骤需同步处理
    • 前置原始表只能是文件中列出的表,禁止根据 SQL 内容推断前置表

Step 4:理解现有表的业务逻辑

  • 基于前面步骤的表结构、INSERT SQL,完整理解现有表的业务逻辑
  • 使用 task(subagent_type="metadata-recall") 查询 SQL 中用到的其他的表、列、UDF 等元数据的详细信息,禁止对这些表使用 query_sql_process 工具

Read the full file on GitHub · 140 lines

Files

What ships with it

1 file 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. 2d ago First seen · 140 lines · 67 tokens per session scan A 17e881fee580

Subscribe to this mod's changes

add-columns is a skill published in the GitHub repository datagallery-ai/dataagent (748 stars, last pushed 3d ago), licensed Apache-2.0. It adds 67 tokens to every session and 2,178 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-11-28.

Related

add-columns compared with skills from other repositories

add-columns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-columnsdatagallery-ai/dataagentSkill7483d agoApache-2.0A67Claude Code, Codex
fetch-dataagentscope-ai/QwenPaw-DataSkill2085d agoApache-2.0A286Claude Code, Codex
cm-skillsagentscope-ai/QwenPaw-DataSkill2085d agoApache-2.0A73Claude Code, Codex
query-odpsagentscope-ai/QwenPaw-DataSkill2085d agoApache-2.0A111Claude Code, Codex
sql-analysisrunxhq/runxSkill106yesterdayApache-2.0A43Claude Code, Codex
setup-data-workspacedanielrosehill/Claude-Data-Analyst-pluginSkill1327d agoMITA73Claude Code
documentdb-collection-adminKnuckles-Team/documentdb-mcpSkill24d agoMITA78Claude Code, Codex