new-scheduled-task

new-scheduled-task is a skill for Claude Code from zuoyebang/aiweave. It costs 35 tokens per session (1,113 once invoked), scanned A, original, Apache-2.0.

A coding helper that creates scheduled-task implementations from a design document, including command-line, recurring, cron, controller, and service parts.

In plain words
What is it for?
Use it to add Cobra command tasks, recurring cycle tasks, or crontab tasks while following the project's documented database, Redis, locking, and registration rules.
Why use it?
It reduces the work of wiring a new scheduled task into the project's existing structure. It also checks project status and required service methods before generating code.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build ./controllers/command/... ./service/{module}/... ./router/....

Good fit Use it to add Cobra command tasks, recurring cycle tasks, or crontab tasks while following the project's documented database, Redis, locking, and registration rules.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/zuoyebang/aiweave
agentmods
npx agentmods add skills/zuoyebang/aiweave/new-scheduled-task

Made for: Claude Code.

Wrote 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.

agentmods badge for new-scheduled-task

README.md
[![agentmods](https://agentmods.dev/badge/skills/zuoyebang/aiweave/new-scheduled-task/github.svg)](https://agentmods.dev/skills/zuoyebang/aiweave/new-scheduled-task)
Your own site
<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.

agentmods 80×15 button for new-scheduled-task

Your own site · 80×15
<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>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash 5f3b58479441, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

templates/skills/new-scheduled-task/SKILL.md · 131 lines

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}")

Read the full file on GitHub · 131 lines

Changes

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.

  1. 10d ago First seen · 131 lines · 35 tokens per session scan A 5f3b58479441

Subscribe to this mod's changes

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.

Related

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…

teaql/teaql-agent-kit · 112 tokens

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.

mits-pl/wove · 36 tokens

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.

mits-pl/wove · 41 tokens

electron-api

Guide for adding new Electron APIs to Wave Terminal. Use when implementing new frontend-to-electron communications via preload/IPC.

mits-pl/wove · 27 tokens

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%.

alivirgo/Major-AI-Skills · 43 tokens

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…

Mozurok/fhorja.dev · 216 tokens