Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/zuoyebang/aiweavenpx agentmods add skills/zuoyebang/aiweave/new-saga-stepWrote 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/zuoyebang/aiweave/new-saga-step)<a href="https://agentmods.dev/skills/zuoyebang/aiweave/new-saga-step"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-saga-step/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/zuoyebang/aiweave/new-saga-step"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-saga-step.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.00066 | $0.01815 |
| Opus 5 | $0.00033 | $0.00907 |
| Sonnet 5 | $0.00013 | $0.00363 |
| Haiku 4.5 | $0.00007 | $0.00181 |
Grade A, and why
new-saga-step 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 10d 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 — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
生成 Saga 步骤代码。参数:$ARGUMENTS,格式 {module}/{Method}/step-{N}。
公共步骤模板见 skills-spec/01_skill_authoring_guide.md §A-§E。
第 0 步:🚫 模块 + 启用状态检查
- 读
BUILD_STATUS.md§0 —— 命中 🚫 模块立即拒绝 - 读
INDEX.md§0 AIWeave 采纳进度 —— 如docs-spec/21_distributed_transaction未启用 → 拒绝,提示"本工程未启用 21,请先启用"
第 1 步:读设计文档
按顺序读:
docs/service/transaction_design.md—— §2 事务边界清单 + §3 补偿逻辑设计 + §4 幂等性设计 + §6 失败路径全景图docs/service/{module}_service.md—— §4.N 单个方法的完整规格 + §4.N.3 处理步骤伪码 + §4.N.8 事务与一致性docs/architecture/concurrency_safety.md§2 —— 涉及的共享状态(如 Redis Key 锁)docs/architecture/ai_dev_guide.md§8.2 —— 事务与一致性约束总清单
第 2 步:校验前置
- 目标方法必须在
transaction_design.md §2标 "Saga N 步";如未登记 → 拒绝,要求先补 §2 - 目标 step-N 必须在 §3 补偿逻辑设计表中有"正向 + 补偿"对照行;如缺 → 拒绝,要求先补 §3
- 幂等 Key 必须在 §4 已定义;如缺 → 拒绝,要求先补 §4
第 3 步:生成代码
按 service 方法伪码生成 step-N 代码。必须包含以下结构:
// {Module}{Method}Step{N} 是 Saga 第 N 步的正向操作
func (s *{Module}Service) {Method}Step{N}(ctx context.Context, req *{Method}Step{N}Req) error {
// [IDEMPOTENT-CHECK: key={ns}:idemp:{action}:{key-field}]
if exists, err := s.checkIdempotent(ctx, req); err != nil {
return err
} else if exists {
return nil // 幂等,跳过
}
// [INVARIANT-CHECK: I-N] // 如本步关联领域不变量
if violates := s.checkInvariant(req); violates != nil {
return violates
}
// [SAGA-STEP-N] 正向操作
if err := s.do{Step-N-Action}(ctx, req); err != nil {
return err
}
// [METRIC-EMIT: {action}_step_{N}_total{result="ok"}]
return nil
}
// {Module}{Method}Compensate{N} 是 Saga 第 N 步的补偿操作
// 必须可重复执行而不产生副作用(详见 transaction_design.md §3.2)
func (s *{Module}Service) {Method}Compensate{N}(ctx context.Context, req *{Method}Step{N}Req) error {
// 补偿幂等去重
lockKey := "{ns}:compensation_lock:{key-field}"
if locked, err := s.acquireLock(ctx, lockKey); err != nil || !locked {
return err
}
defer s.releaseLock(ctx, lockKey)
// [COMPENSATE-N] 补偿操作
return s.undo{Step-N-Action}(ctx, req)
}
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.
- 10d ago First seen · 141 lines · 66 tokens per session scan A e00263148720
new-saga-step is a skill published in the GitHub repository zuoyebang/aiweave (20 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,815 once invoked, about $0.0003 per session on Opus 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-08-30.
Other skills, from other repositories
build-teaql-app
Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…
add-rpc
Guide for adding new RPC calls to Wave Terminal. Use when implementing new RPC commands, adding server-client communication methods, or extending the RPC interface with new functionality.
wps-events
Guide for working with Wave Terminal's WPS (Wave PubSub) event system. Use when implementing new event types, publishing events, subscribing to events, or adding asynchronous communication between components.
electron-api
Guide for adding new Electron APIs to Wave Terminal. Use when implementing new frontend-to-electron communications via preload/IPC.
compact-error-handling
How to eliminate verbose, repetitive try-catch blocks in generated code by using multi-exception tuples, contextlib.suppress, and functional Result types, cutting error boilerplate by 60%.
api-runtime-verify
Verify an implemented backend HTTP surface at runtime: per route, record the request actually made, the HTTP status, the response content-type, and the observed body shape, assert each response against the slice's acceptance behavior, classify the findings, and decide a PASS/FAIL/BLOCKED runtime gate. The probe's real…