skills/scheduled-task/SKILL.md
创建定时任务,支持一次性、每日、每周、每月、Cron 等调度方式。当用户想设置定期自动执行的任务时使用。Create scheduled tasks for recurring or one-time automated execution.
npx skillsauth add giggle-official/storyclaw-assistant scheduled-taskInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
当用户想要:
先与用户确认以下信息(如果用户未提供):
一次性执行(at):
{ "type": "at", "datetime": "2026-03-15T09:00:00" }
Cron 表达式(cron)— 5 字段格式:分 时 日 月 周
{ "type": "cron", "expression": "0 9 * * *" }
常用 Cron 示例:
| 表达式 | 含义 |
|--------|------|
| 0 9 * * * | 每天 9:00 |
| 0 8 * * 1 | 每周一 8:00 |
| 0 9 * * 1-5 | 工作日 9:00 |
| 0 0 1 * * | 每月1号 0:00 |
| */30 * * * * | 每30分钟 |
| 0 * * * * | 每小时整点 |
| 0 9,18 * * * | 每天 9:00 和 18:00 |
@file 方式,避免 Windows 中文编码问题)当 payload 含中文时,不要把整段 JSON 直接作为命令行参数传入。
请先写入 UTF-8 文件,再用 @文件路径 传给脚本。
cat > /tmp/scheduled-task.json <<'JSON'
{
"name": "任务名称",
"schedule": { "type": "cron", "expression": "0 9 * * *" },
"prompt": "任务运行时 Claude 将执行的详细指令...",
"workingDirectory": "/path/to/project"
}
JSON
bash "$SKILLS_ROOT/scheduled-task/scripts/create-task.sh" @/tmp/scheduled-task.json
| 字段 | 必填 | 说明 |
| ------------------ | ---- | ----------------------------------------------------------------------- |
| name | ✅ | 简短的任务名称 |
| prompt | ✅ | 任务运行时 Claude 收到的指令(应清晰完整) |
| schedule | ✅ | 调度配置(见上方类型说明) |
| workingDirectory | ❌ | 执行目录(默认空) |
| description | ❌ | 详细描述(默认空) |
| systemPrompt | ❌ | 自定义系统提示词(默认空) |
| executionMode | ❌ | "auto" / "local" / "sandbox"(默认 "local") |
| expiresAt | ❌ | 过期日期 "YYYY-MM-DD"(默认 null,不过期) |
| notifyPlatforms | ❌ | 通知平台数组:["dingtalk","feishu","telegram","discord"](默认 []) |
| enabled | ❌ | 是否立即启用(默认 true) |
脚本返回 JSON 响应:
{ "success": true, "task": { "id": "...", "name": "...", ... } }{ "success": false, "error": "错误信息" }向用户确认以下信息:
@file 方式,避免命令行参数编码导致标题/提示词乱码prompt 应描述“任务触发时要执行的动作”,不要提前执行任务并把静态结果写进 prompt。示例:写“到点后检索昨天 AI 新闻并发送摘要”,不要先把新闻列表整理好再塞进 prompt。node -e 'const d=new Date();const p=n=>String(n).padStart(2,"0");console.log(`${d.getFullYear()}-${p(d.getMonth()+1)}-${p(d.getDate())}T${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`)'
prompt 是任务独立运行时 Claude 收到的唯一指令,应写得清晰完整type: "at" 的任务执行后自动禁用tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
development
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
development
X2C Distribution and Wallet API — publish video to X2C platform, manage assets (balance, claim X2C, swap to USDC, withdraw, transactions).
data-ai
Manage X (Twitter) accounts — post tweets, like, reply, retweet, view timeline, search, auto-interact, analyze data.