be_api

GitHub

模拟后端API响应,输出符合api@1规范的JSON数据。通过schema_gate校验必填字段(id,name),拦截畸形响应,作为真实HTTP调用的占位符供下游使用。

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

Trigger Scenarios

需要模拟后端API返回固定结构数据时 测试API响应Schema校验逻辑时

Install

npx skills add s0912758806p/agentic-sop-to-work --skill be_api -g -y
More Options

Non-standard path

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

Use without installing

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

指定 Agent (Claude Code)

npx skills add s0912758806p/agentic-sop-to-work --skill be_api -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": "be_api",
    "description": "Use as the backend example step — emit an API-response artifact (`api@1`) that a schema_gate checks for required fields. Stand-in for a real HTTP call (curl \/ requests); the gate is what catches a malformed response. Single tool."
}

Example skill — be_api(後端範例:回應要過 schema 閘門)

workflow/examples/be.json 的唯一一步。stand-in 輸出一筆固定的「API 回應」; 真正接上 API 時換掉 run(),保留 schema_gate,缺欄位的回應就不會流到下游。

綁定的單一工具

  • python3(標準庫)。實務上換成 curl 或 HTTP client,一步仍只綁一個工具。

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

  • python >= 3.8

參數化(無硬編碼)

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

介面

  • 輸出 artifact:{"schema":"api@1","produced_by":"be_api","data":{"id":1,"name":"widget","price":9.99},"trace":[]}
  • 閘門:schema_gate,args.required = ["id","name"]。

執行

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

Version History

  • 11ac66b Current 2026-11-02 14:27

Same Skill Collection

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/compute/SKILL.md
plugins/agentic-sop-kit/kit/skills/db_rows/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

Metadata

Files
0
Version
11ac66b
Hash
a09072ef
Indexed
2026-11-02 14:27

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-04 09:51
浙ICP备14020137号-1