db_rows

GitHub

作为数据库查询步骤的占位符,输出固定行数据及总和,通过 recompute_gate 重算核对总数,确保数据一致性。

plugins/agentic-sop-kit/kit/skills/db_rows/SKILL.md s0912758806p/agentic-sop-to-work

触发场景

需要模拟数据库查询步骤 验证数据总和计算逻辑

安装

npx skills add s0912758806p/agentic-sop-to-work --skill db_rows -g -y
更多选项

非标准路径

npx skills add https://github.com/s0912758806p/agentic-sop-to-work/tree/main/plugins/agentic-sop-kit/kit/skills/db_rows -g -y

不安装直接使用

npx skills use s0912758806p/agentic-sop-to-work@db_rows

指定 Agent (Claude Code)

npx skills add s0912758806p/agentic-sop-to-work --skill db_rows -a claude-code -g -y

安装 repo 全部 skill

npx skills add s0912758806p/agentic-sop-to-work --all -g -y

预览 repo 内 skill

npx skills add s0912758806p/agentic-sop-to-work --list

SKILL.md

Frontmatter
{
    "name": "db_rows",
    "description": "Use as the database example step — emit query rows plus a stated total (`rows@1`) that a recompute_gate re-derives and compares. Stand-in for a real SQL query (psql); the gate is what catches a total that does not add up. Single tool."
}

Example skill — db_rows(資料庫範例:總數要能重算)

workflow/examples/db.json 的唯一一步。stand-in 輸出固定的查詢列與它們的加總; 接上真的查詢時換掉 run(),保留 recompute_gate——報出來的總數由程式重算核對,不信任上游自報。

綁定的單一工具

  • python3(標準庫)。實務上換成 psql 或 DB driver,一步仍只綁一個工具。

依賴(完整宣告;缺項明確報錯)

  • python >= 3.8

參數化(無硬編碼)

  • 輸入:--in <任意輸入>(stand-in 不讀;真的實作讀查詢參數)
  • 輸出:--out <rows artifact.json>

介面

  • 輸出 artifact:{"schema":"rows@1","produced_by":"db_rows","data":{"rows":[10,20,30],"total":60},"trace":[]}
  • 閘門:recompute_gate,args = {"op":"sum","over":"rows","equals":"total"}。

執行

python3 skills/db_rows/tool.py --in <任意輸入> --out <out/db.json>

版本历史

  • 11ac66b 当前 2026-11-02 14:27

同 Skill 集合

plugins/agentic-sop-kit/kit/skills/accept/SKILL.md
plugins/agentic-sop-kit/kit/skills/ai_claims/SKILL.md
plugins/agentic-sop-kit/kit/skills/be_api/SKILL.md
plugins/agentic-sop-kit/kit/skills/compute/SKILL.md
plugins/agentic-sop-kit/kit/skills/draft/SKILL.md
plugins/agentic-sop-kit/kit/skills/report/SKILL.md
plugins/agentic-sop-kit/kit/skills/verdict/SKILL.md
plugins/agentic-sop-kit/skills/agentic-sop/SKILL.md
plugins/agentic-sop-kit/skills/agentic-workflow-audit/SKILL.md
plugins/agentic-sop-kit/skills/six-rung-ladder/SKILL.md
plugins/agentic-sop-kit/skills/sop-flow/SKILL.md
plugins/alcoa-guard/skills/alcoa-guard/SKILL.md
plugins/plugin-forge/skills/plugin-forge/SKILL.md
plugins/second-opinion-honesty/skills/second-opinion/SKILL.md

元信息

文件数
0
版本
11ac66b
Hash
508a57a6
收录时间
2026-11-02 14:27

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 16:19
浙ICP备14020137号-1