一键导入
new-task
Scaffold a scheduled task (cron or interval) in app/tasks. Use when asked to run something periodically, on a timer, or on a schedule.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a scheduled task (cron or interval) in app/tasks. Use when asked to run something periodically, on a timer, or on a schedule.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffold a new slash command in app/commands. Use when asked to add or create a slash command, a subcommand, or an autocomplete option.
Scaffold a persistent button, modal, or select-menu handler in app/components. Use when asked to handle a component interaction by customId.
Scaffold a right-click context-menu command (on a user or message) in app/context. Use when asked to add a context-menu or right-click command.
Scaffold a gateway event handler in app/events. Use when asked to react to a Discord event like GuildMemberAdd, MessageCreate, or Ready.
Scaffold a new text (prefix) command in app/prefixes, e.g. ".ping". Use when asked to add a message-based or prefix command.
Scaffold an HTTP API route in app/routes on the Elysia server. Use when asked to add an HTTP endpoint, REST route, or webhook receiver.
| name | new-task |
| description | Scaffold a scheduled task (cron or interval) in app/tasks. Use when asked to run something periodically, on a timer, or on a schedule. |
.agents/context.md (Scheduled tasks section) if not already loaded.app/tasks/<name>.ts.BaseTask, decorated with @Cron("...") or @Interval("..."); implement execute().import { Interval, BaseTask } from "engine";
@Interval("5m")
export default class Presence extends BaseTask {
async execute() {
this.client.user?.setActivity("with decorators");
}
}
@Interval("30s" | "5m" | 60000): fires on a setInterval; accepts a lib/duration string or raw milliseconds.@Cron("*/5 * * * *"): a 5-field cron expression (engine/cron.ts), evaluated once per minute.setInterval or setTimeout loop inside a command, event, or index.ts; declare a task instead.this.client is injected. Wrap unsafe work in try/catch; a crashing task must not take the process down.bun run shard every shard runs its own copy. Guard with a shard check if the work must run once cluster-wide.Run bun run typecheck and bun run lint. Tasks are live on next boot; no deploy step.