schedule-task
БесплатноБез исполняемых скриптовНе проверенUse when the user wants to create, set up, or configure a scheduled task in Treasure Studio. Covers TASK.md authoring, schedule.yaml configuration, script…
от treasure-data★ 23 звезды на GitHubОб этом скилле
Schedule Task Creator
Create scheduled tasks in Treasure Studio that mix deterministic script execution with agent-driven analysis and delivery.
Task Directory Placement
Determine where to create the task based on your current working directory:
If inside a workspace: find the nearest ancestor directory (including the current one) that contains a
tdx.jsonfile and at least one ofgoals/oritems/folders. That directory is{workspace}.- Create under
{workspace}/schedules/{task-name}/ - Workspace context (accepted guides, goals) is automatically available at execution time
{workspace}becomes the working directory during execution
- Create under
Otherwise (standalone):
- Create under
~/.tdx/schedule-tasks/{task-name}/
- Create under
Workflow
CRITICAL: Never just create files and stop. Always run the task and iterate until it works.
- Capture Intent — What to automate, how often, what tools/data needed, where results go
- Ask the user for output format (Slack message, CSV, HTML report, etc.) and notification channels before creating files. Never assume a Slack channel — always confirm.
- Create the Task — Always use the
create_scheduleMCP tool for the initial task scaffold; do not hand-createschedule.yaml,TASK.md, or the standard subdirs (data/,reference/,scripts/,results/) with Write/Bash. The tool generates those files/directories and stamps the active Studio profile into schedule.yaml. Extra files underscripts/orreference/may be added afterwards with Write. - Validate — Run
schedule_validateto check schedule.yaml - Reload — Run
schedule_reloadto pick up new/changed tasks - Review — Load the
schedule-reviewskill and run a full review (structure + quality checks in parallel) - Fix Issues — Address any findings from the review
- Test Run — Run
schedule_runto execute immediately - Check Results — Use
schedule_resultsto review output.md and check for errors - Fix & Retry — If the run failed or output is wrong, edit the files and repeat from step 4
- Enable — Only after a successful test run, use
schedule_enableto activate the cron schedule
Steps 5-8 are mandatory — a task is not complete until it has been reviewed and executed successfully at least once.
Task Directory Structure
{task-dir}/
├── TASK.md # Instructions (frontmatter + markdown body)
├── schedule.yaml # Cron schedule, permissions, notifications
├── scripts/ # Deterministic scripts (bash, python, etc.)
├── reference/ # Immutable reference files (templates, specs, configs)
├── data/ # Persistent data across runs (snapshots, state, caches)
└── results/{run_id}/ # Auto-created per execution (pruned over time)
├── metadata.json # System-managed run metadata
└── output.md # Execution summary (REQUIRED — agent writes this)
Use create_schedule to scaffold the directory — it generates schedule.yaml, TASK.md, and the four subdirs in one call and auto-registers the task. Add extra files under scripts/ and reference/ afterwards with Write. The system will pick up subsequent edits after schedule_reload.
TASK.md Anatomy
YAML frontmatter with name and description, followed by markdown instructions:
---
name: daily-sales-report
description: Fetch sales data, analyze trends, and post to Slack
---
## Steps
1. Run `bash scripts/fetch-sales-data.sh` to download data
2. Analyze the CSV: revenue, order count, top products
3. Compare with previous run (check results/ for yesterday's output.md)
4. Write results/{run_id}/output.md with findings
5. Post summary to Slack, attach chart via slack_upload_file
## Data Files
- `data/previous-metrics.csv` — Yesterday's metrics for trend comparison. Update after analysis.
## Notes
- Revenue thresholds: flag if daily total < $10K
- Use reference/report-template.html for formatting
- If fetch script fails, retry once then report the error
Additional sections (## Notes, ## Constraints, ## Data Files, ## Output Format, etc.) are welcome. The run_id is provided to the agent automatically in the prompt.
Do NOT write Slack channel names or notification targets in TASK.md. Notification channels are configured in schedule.yaml (notify.on_success / notify.on_failure) and injected into the prompt automatically at execution time. Writing them in TASK.md causes conflicts when the yaml is updated.
Using data/ for Cross-Run State
data/ persists across runs (unlike results/ which is pruned). When a task uses data/, describe the files and their purpose in TASK.md under a ## Data Files section.
schedule.yaml Format
name: daily-sales-report
profile: "@tdx-studio:<site>:<account-id>:<user-id>" # AUTO-STAMPED by create_schedule — DO NOT hand-author. Omit to make the task visible under every Studio account (reserved for
Установить schedule-task в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл schedule-task?
Use when the user wants to create, set up, or configure a scheduled task in Treasure Studio. Covers TASK.md authoring, schedule.yaml configuration, script creation, and direct file-based task setup. Triggers on "create a scheduled task", "set up a recurring job", "automate daily report", "schedule a task", "cron job", etc.
Как установить скилл schedule-task?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл schedule-task запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic