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.
npx skills add datagallery-ai/dataagent --skill feature-engineeringgit clone --depth 1 https://github.com/datagallery-ai/dataagentWrote 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.
[](https://agentmods.dev/skills/datagallery-ai/dataagent/feature-engineering)<a href="https://agentmods.dev/skills/datagallery-ai/dataagent/feature-engineering"><img src="https://agentmods.dev/badge/skills/datagallery-ai/dataagent/feature-engineering/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.
<a href="https://agentmods.dev/skills/datagallery-ai/dataagent/feature-engineering"><img src="https://agentmods.dev/badge/skills/datagallery-ai/dataagent/feature-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.04226 |
| Opus 5.5 | $0.00029 | $0.01690 |
| Sonnet 5.5 | $0.00014 | $0.00845 |
| Haiku 4.5 | $0.00007 | $0.00423 |
Grade A, and why
feature-engineering 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.
How it starts
The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
特征开发
根据用户的需求进行特征开发。计划内容包含但不仅限于:
- 查询相关的元数据、表、知识、命名规范等信息
- 根据查询到的相关内容,编写口径冻结表(仅作写 SQL 的前置契约,不写入 / 不驱动 DataTaskIR)
- 编写DDL/INSERT的SQL, 必须先写DDL,再写INSERT SQL
- 根据查询到的相关规范内容,对生成的SQL进行校验,是否符合规范和要求
- 在你认为SQL质量无问题后,将SQL打印出来给用户看,与用户交互确认是否完成任务,等待用户确认是否结束
- 结束之前告诉用户生成的文件、工作目录在哪里。
- 当你需要写INSERT SQL语句的时候,你必须要使用wrapped_nl2sql_sub_agent_tool工具。
- 你需要保证在wrapped_nl2sql_sub_agent_tool工具调用前已经调用过task(subagent_type="metadata-recall")工具。
- 历史SQL检索(强制步骤):schema linking 完成后、调用 wrapped_nl2sql_sub_agent_tool 之前,你必须再调用一次 task(subagent_type="metadata-recall") 检索相似历史SQL,把检索结果作为过滤口径、列用法、UDF 用法的参考。步骤:
- 从口径冻结表提取⌈输出特征名称表⌋(第 9 项)与目标粒度(本次输出主键)。
- 对每个输出特征标注用户行为(曝光/点击/下载/激活/使用/卸载/通话/搜索/推送/计费/注册…,依据特征名、业务目标与源表语义)。
- 一次调用 task(subagent_type="metadata-recall") 携带全部特征(该工具要求整合后单次调用),query 按模板书写: "检索历史SQL作为参考,要求:输出特征1:<特征名>(用户行为:<行为>);…;本次输出主键:<主键字段组合>;加分项:<特征类型/时间周期/排序维度>;源表必须包含:<已确认源表>(源表已确认时填写)"
- 检索有匹配时,wrapped_nl2sql_sub_agent_tool 的 query 中必须包含⌈## 历史SQL参考⌋段落:写入子代理返回的过滤口径摘录、列用法摘录、UDF 用法摘录(合计不超过 2000 字符),并注明"历史SQL仅供参考,与已确认口径/DataTaskIR 冲突时以 DataTaskIR 为准";无匹配时如实说明"未找到相似历史SQL",query 不带该段落;工具返回"历史SQL检索功能未启用"时,说明当前部署未开启该能力(并非"已检索但无匹配"),直接跳过历史SQL检索与引用,query 不带该段落。
- 历史SQL检索必须委托 task(subagent_type="metadata-recall") 子代理完成,禁止自己用read_file/grep/glob 直接翻历史SQL目录文件。
- 自由调用:多个候选源表且元数据无法定夺时,可在选表阶段提前调用 task(subagent_type="metadata-recall"),请求改为"检索使用了表 X/Y/Z 的历史SQL并对比它们在各历史SQL中的实际用法(过滤口径、列用法、粒度)",用返回证据辅助选表。
- 你需要保证在 wrapped_nl2sql_sub_agent_tool 工具调用后,至少调用过 1 次
check_and_repair_sql。 - 数据探查(写 SQL 前确认字段真实存在 / 取值分布 / 空值情况):
- 何时调、调用硬约束(
partition_filter/columns/ 占位符)、返回结果解读、工具签名,详见skill/dataops_probe/SKILL.md。 - 调用入口:
dataops_probe_table,仅 SELECT LIMIT,失败自动跳过不抛错。 - 与 task(subagent_type="metadata-recall") 的分工:task(subagent_type="metadata-recall") 回答"表/列是什么",dataops_probe_table 回答"字段实际长什么样"。
- 何时调、调用硬约束(
- wrapped_nl2sql_sub_agent_tool 调用时,DataTaskIR 记录的已确认口径是最高优先级业务口径:当其他业务口径描述(包括你在 query 中附加的“业务口径”段落、中间推导)与 DataTaskIR 冲突时,以 DataTaskIR 为准;不得在 query 中附加与 IR 冲突的过滤、去重、聚合口径说明。
- query 的“已确认口径(最高优先级)”“业务口径”段落只允许包含 DataTaskIR 已记录的操作;IR 未记录去重(sources 事实/维度 dedup、sequence.dedup 均无已确认内容)时,禁止在 query 中写入任何去重口径(如“同一设备同一标签只保留一条”“按 weight DESC 取最大一条”“先按键去重”等),也禁止把“源表为天级增量表/多分区/多版本”作为去重依据。
- 历史SQL检索结果是参考级证据,不是口径来源:其时间窗口、源表选择、过滤条件、聚合实现不得写入 query 的“已确认口径”“业务口径”段落,不得据此改写或补充 IR 已记录/未记录的任何口径,也不得作为口径冻结表的口径依据(freeze_calibration_to_ir 冻结的口径只能来自用户原始需求与已确认上下文);用户原话与 IR 均无对应口径时保持留空,禁止把历史SQL 的口径当作默认值填充。历史SQL 的正确用法是写法参考:UDF 调用形态、列用法、序列拼接方式只放在⌈## 历史SQL参考⌋段落传达,并保留“仅供参考,与已确认口径/DataTaskIR 冲突时以 DataTaskIR 为准”的声明。
- 最终输出列语义 = 已确认特征主键(identity.components,必选前缀,即使未出现在 output_features 中)+ expand(output_features) 业务/指标语义;多时间窗口 × 多特征等交叉场景必须以 IR 中确定性展开后的字段条数为准(如 3×3=9),不得在 query 中压缩成更少的“代表列”。IR 给出的展开列名(field_name / name_pattern)仅供主 Agent 对照参考,query/SQL/DDL 不要求照抄同名。
- 主键/分组键防重复:identity.components 是主键列唯一权威;禁止在 output_features(measures/extras/features)再写同名输出列。aggregation.grain 可引用主键 field_ref(表示按该键聚合),这不等于还要再输出一列同名键。query 中也不要把主键既当“已确认主键前缀”又当“业务特征列”各写一遍。
- 仅当用户明确要求不要去重时:IR 的
aggregation.grain与 sources/sequence dedup 均应保持未确认(null);禁止因“每个应用/设备”或 identity 在 query/SQL 中 invent GROUP BY 折叠、DISTINCT、ROW_NUMBER 去重。这是特例,不是默认。 - 常规聚合(默认):用户多数情况下不会显式说“要聚合/GROUP BY”;只要有求和/计数/均值等聚合语义,IR 应照常填写 grain,query/SQL 按已确认 grain 实现。禁止把“禁止去重时不填 grain”误用成漏填聚合粒度。
- 若展开后各特征 aggregation.grain 不同,query/SQL 必须按列分别说明并实现各自聚合粒度;禁止用单一全局 GROUP BY 覆盖全部特征。
- SQL checker:DDL/DML 写完后调用
check_and_repair_sql,只按它返回的 issues 修 SQL;PASS 才继续,BLOCKED/ERROR 不得当作通过。- checker 做确定性规则检查和有界模型修复,最多 6 次模型调用;不要用自然语言推断替代规则。
- DDL 与对应 DML 必须作为同一交付单元,DDL 未通过不得继续提交 DML。
- DataOps 校验(checker 内部阶段):由
check_and_repair_sql.config.dataops_validation_enabled控制,默认开启;仅需静态检查时设为false。- 开启后,程序规则检查通过才会在 DataOps 临时表上按 DDL → DML 顺序校验;DDL 失败不提交 DML。
- 失败返回 BLOCKED 及
dataops.results中的日志分析摘要;处理问题后重新调用 checker。同一交付文件对每条 SQL 最多提交 10 次,修改 SQL 不重置预算。预算耗尽时报告会写明「总共几次 / 已用几次 / 接下来怎么做」,并附带dataops.failure_history里最近一次的真实失败摘要 —— 按摘要修根因,不要盲目重复调用。 - 提交次数上限全仓库只有一个来源:
dataagent.utils.constants.DEFAULT_DATAOPS_VALIDATION_ATTEMPTS(=10)。check_and_repair_sql.config.dataops_max_attempts只能在 1-10 之间调低,不能调高。 - 开启但服务未配置/校验被跳过时不得当作通过;配置关闭时报告 DISABLED,不声称完成 DataOps 验证。
- checker 未通过时不自动发布候选补丁。
- 维度表选表经验:
- 事实表中已存在所需要的列时,默认无需关联对应的维度表,除非用户明确要求。例如事实表中已提供应用三级分类时,默认无需使用应用信息维表。
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.
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.
- 2d ago First seen · 134 lines · 72 tokens per session scan A 4b35b9eb1d27
feature-engineering is a skill published in the GitHub repository datagallery-ai/dataagent (748 stars, last pushed 3d ago), licensed Apache-2.0. It adds 72 tokens to every session and 4,226 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.
feature-engineering compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| feature-engineeringdatagallery-ai/dataagent | Skill | 748 | 3d ago | Apache-2.0 | A | 72 | Claude Code, Codex |
| setup-data-workspacedanielrosehill/Claude-Data-Analyst-plugin | Skill | 13 | 27d ago | MIT | A | 73 | Claude Code |
| alibabacloud-data-agent-mcp-skillaliyun/data-agent-skill | Skill | 59 | today | none | B | 141 | Claude Code, Codex |
| wren-usageCanner/wren-engine | Skill | 659 | 6mo ago | Apache-2.0 | A | 126 | Claude Code |
| wren-onboardingCanner/wren-engine | Skill | 659 | 6mo ago | Apache-2.0 | B | 98 | Claude Code |
| embeddingsruvnet/ruflo | Skill | 83k | today | MIT | A | 62 | Claude Code |
| rag-pineconedavila7/claude-code-templates | Skill | 34k | today | MIT | A | 65 | Claude Code, Codex |