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-scheduled-taskWrote 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-scheduled-task)<a href="https://agentmods.dev/skills/zuoyebang/aiweave/new-scheduled-task"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-scheduled-task/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-scheduled-task"><img src="https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-scheduled-task.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.00035 | $0.01113 |
| Opus 5 | $0.00017 | $0.00557 |
| Sonnet 5 | $0.00007 | $0.00223 |
| Haiku 4.5 | $0.00003 | $0.00111 |
Grade A, and why
new-scheduled-task 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 — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
根据 $ARGUMENTS 生成定时任务实现。
公共步骤模板见 skills-spec/01_skill_authoring_guide.md §A-§E。本 Skill 特定内容如下。
第 0 步:拒绝规则与依赖前置
- ⛔ 拒绝(§A.1):任务名命中
BUILD_STATUS.md§0 中 🚫 任务(如{disabled-task})时立即拒绝 - 状态检查(§A.2):读
BUILD_STATUS.md§6 定时任务明细 - 依赖(§A.3):对应 service 方法未实现 → 先调
/new-service生成
第 1 步:读取设计文档(公共必读见 §B)
- 主文档:
docs/service/scheduled_tasks_design.md中对应任务章节 - 确认任务类型(cobra / cycle / crontab)、并行策略(SPOP / 分布式锁 / 单进程)、涉及的 DB 和 Redis 操作
第 2 步:识别 router/command.go 整体结构
router/command.go 应有固定 4 函数(参见 docs-spec/10 §10):
func Commands(rootCmd *cobra.Command, engine *gin.Engine) { ... }
func run(...) error { ... }
func Tasks(engine *gin.Engine) { startCycle(engine); startCrontab(engine) }
func startCycle(engine *gin.Engine) { ... }
func startCrontab(engine *gin.Engine) { ... }
新增任务只在对应函数体内追加注册行,不改变签名或拆文件。
第 3 步:生成代码
cobra 任务
a. 在 Commands(...) 追加:
rootCmd.AddCommand(&cobra.Command{
Use: "{task-name}",
Run: func(cmd *cobra.Command, args []string) {
run(engine, command_ctrl.{TaskFunc}, args...)
},
})
b. 创建 controller 入口(controllers/command/{task_name}.go):
package command
import (
"{project}/service/{module}"
"{project}/pkg/gin"
)
func {TaskFunc}(ctx *gin.Context, args ...string) error {
return {module}.{Method}(ctx)
}
cycle 任务
在 startCycle 函数体内追加:
c.AddFunc(<interval>, func(ctx *gin.Context) error {
return {module}.{Method}(ctx)
})
⚠️ c.AddFunc 必须在 c := command.InitCycle(engine) 之后、c.Start() 之前。c.Start() 只调用一次。
crontab 任务
c.AddFunc("0 0 2 * * *", func(ctx *gin.Context) error { // 6 位 cron
return {module}.{Method}(ctx)
})
// InitCrontab 内部已 Start,不要再 Start
第 4 步:并行安全实现
// SPOP 模式
for {
member, err := conn.Do("SPOP", "{name}:dirty")
if member == nil { break }
...
}
// 分布式锁模式
locked, _ := conn.Do("SET", "lock:{task_name}", "1", "NX", "EX", lockTTL)
if locked == nil { return nil }
defer conn.Do("DEL", "lock:{task_name}")
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 · 131 lines · 35 tokens per session scan A 5f3b58479441
new-scheduled-task is a skill published in the GitHub repository zuoyebang/aiweave (20 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,113 once invoked, about $0.0002 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…