No work step here. This is probably a skill that reads or coordinates, not one that produces something.
.md file to compare - side-by-side diff against chat-schedule
chat-schedule
What it does for you
Schedules a task to run later, at the time you choose.
What it produces
A recent result, so you can see the kind of work it returns.
loading…
How to get it
These run inside the Snappy workspace. Want this working in your business? I set skills like this up with you, in one focused week.
For developers how this skill is built, graded, and how it runs
at a glance- the short version
what's inside - the parts that make up a skill 3/4 present
A skill is just a few plain-text files. Only the main one is required. The rest are optional, added as the work needs them. This is what the skill is made of; how it runs is just below.
state/skills/chat-schedule/SKILL.md
present
state/lib/chat-schedule.ts
present
state/bin/chat-schedule/
not present
state/skills/chat-schedule/AGENTS.md
present
how it runs - the shared frame every skill uses 3/5 present
Every skill runs the same way. One part does the work, a separate part checks it, and a short loader hands the AI exactly what it needs for the job. Anything this skill doesn't use shows a one-line note saying why, on purpose, not by accident.
state/log/evals.ndjson what it has learned - fixes written back in over time sample
When a run hits something this skill didn't handle, the fix gets written back into the skill so it doesn't happen again. FIXED means it was corrected on the spot. LOGGED means it's queued for a bigger rewrite. Either way, the skill gets a little better and never makes the same mistake twice.
- Loading feedback rows…
SKILL.md- the skill, written out in plain English
chat-schedule
Enqueue a chat intent to fire at a future time. The scheduled intent is stored in the head-screen server's schedule queue and dispatched at the target timestamp as if the user had typed it.
What it's for
- Timed briefings. Schedule "morning brief" to fire at 08:00 without a cron job.
- Deferred dispatch. Queue a follow-up intent after a long-running task completes.
- QA sequences. Schedule a series of test intents with gaps between them for paced dogfood.
When NOT to use it
- Immediate dispatch. Use
chat-drivefor instant push. - Recurring schedules. Use the snappy-os
schedulerecipe for cron-style recurrence. This skill handles one-shot future dispatch only.
Steps
- POST to
/chat-scheduleon the head-screen server:
curl -XPOST 127.0.0.1:3147/chat-schedule \
-H "Content-Type: application/json" \
-d '{"intent":"morning brief","fireAt":"2026-05-01T08:00:00Z"}'
- The server returns
{"scheduled":true,"id":"<schedule-id>"}. - At
fireAt, the server internally callschat-inject-pushwith the intent, which the React app picks up on its next poll. - Cancel via
DELETE /chat-schedule/<id>before the fire time.
Eval
Kind: auto-shape. Frontmatter + AGENTS.md presence passes the gate. Behavioral test pending the /chat-schedule endpoint being wired in state/bin/head-screen/server.ts.
Files
state/bin/head-screen/server.ts- owns/chat-scheduleandDELETE /chat-schedule/:id(pending wire-up).state/skills/chat-schedule/SKILL.md- this file.
AGENTS.md- what the AI loads when this skill comes up
chat-schedule - loader
Per-turn rules. Full reference: state/skills/chat-schedule/SKILL.md.
Critical Rules
- One-shot only. This skill schedules a single future dispatch. For recurring, use the snappy-os
schedulerecipe. fireAtmust be ISO 8601 UTC. Malformed timestamps are rejected silently. Always pass UTC (Zsuffix).- Head-screen server must be alive AND stay alive. Scheduled intents live in-memory. Server restart = all schedules wiped. Not suitable for overnight scheduling unless the server is daemon-persistent.
- Cancel before fire.
DELETE /chat-schedule/<id>to cancel. After fire, the entry is removed automatically. - Endpoint may not be wired yet. If
/chat-schedulereturns 404, file the gap. Thescheduleskill (snappy-os built-in) is the current workaround for timed dispatch.
Commands
| ui dashboard | state/skills/chat-schedule/resources/ui.openui |
| operation | command |
|---|---|
| schedule | curl -XPOST 127.0.0.1:3147/chat-schedule -H "Content-Type: application/json" -d '{"intent":"<text>","fireAt":"<ISO8601-UTC>"}' |
| cancel | curl -XDELETE 127.0.0.1:3147/chat-schedule/<id> |
| list | curl -s 127.0.0.1:3147/chat-schedule |
| preflight | curl -s 127.0.0.1:3147/healthz |
| server | bash state/bin/head-screen/launch.sh (idempotent) |
Self-Test
- [ ] Pass
fireAtin ISO 8601 UTC. - [ ] Verify server will stay alive until the scheduled fire time.
- [ ] Cancel before fire if the intent is no longer needed.
Self-correcting loader (PID feedback)
echo "[$(date -u +%FT%TZ)] chat-schedule: <what was missing or fixed> [FIXED|LOGGED] action_kind=skill-ran" >> state/log/loader-feedback.log
OpenUI Resource
- Skill-owned OpenUI Lang resource:
state/skills/chat-schedule/resources/ui.openui. Read it before rendering or editing this skill's generated component surface. - Treat this resource as a first-class artifact of the skill, not a generic chat response. Improve it when the skill's user-facing output needs to become richer.
- System resources compose OpenUI primitives and inherit SnappyChat tokens. Use
ui_contract: brandedin SKILL.md only for deliberate platform or client visuals.
api.ts- the code it can call
#!/usr/bin/env npx tsx
/**
* state/lib/chat-schedule.ts — create scheduled agents from the chat surface.
*
* Creates a new state/agents/<id>.json with {name, intent, cron} triplet.
* Minted via snappy-chat POST /agent/create-scheduled.
*
* Schema: Agent from state/lib/agents.ts with optional schedule_cron.
*/
import { writeAgent, normalizeId } from "./agents.ts";
import type { Agent } from "./agents.ts";
export interface ScheduleInput {
name: string; // display name, kebab-case normalized
intent: string; // the prompt/directive the scheduler will run
cron: string; // 5-field cron expression (e.g. "0 9 * * 1")
loader_slug?: string; // optional explicit loader; defaults to inferred
}
export interface ScheduleOutput {
ok: boolean;
id?: string;
name?: string;
intent?: string;
cron?: string;
loader_slug?: string;
error?: string;
}
/**
* Validate cron expression: simple check for 5 space-separated fields.
* Full validation deferred to scheduler.
*/
function isValidCron(cron: string): boolean {
const parts = cron.trim().split(/\s+/);
return parts.length === 5 && parts.every(p => p.length > 0);
}
/**
* Create a scheduled agent from {name, intent, cron}.
*
* Returns {ok: true, id, name, intent, cron, loader_slug} on success.
* Returns {ok: false, error: "..."} on failure.
*
* Idempotent: safe to call multiple times with same inputs (will re-write
* the agent file but result is deterministic).
*/
export function createScheduledAgent(input: ScheduleInput): ScheduleOutput {
// Validate inputs
const name = (input.name || "").trim();
if (!name || name.length === 0) {
return { ok: false, error: "name required" };
}
if (name.length > 100) {
return { ok: false, error: "name >100 chars" };
}
const intent = (input.intent || "").trim();
if (!intent || intent.length === 0) {
return { ok: false, error: "intent required" };
}
if (intent.length > 2000) {
return { ok: false, error: "intent >2000 chars" };
}
const cron = (input.cron || "").trim();
if (!cron || cron.length === 0) {
return { ok: false, error: "cron required" };
}
if (!isValidCron(cron)) {
return { ok: false, error: "cron must be 5 space-separated fields" };
}
const loader_slug = (input.loader_slug || "").trim();
// Mint a collision-safe id: normalized name + short timestamp suffix
const tsSuffix = Date.now().toString(36).slice(-6);
const idBase = normalizeId(name).slice(0, 30) || "scheduled";
const id = `${idBase}-${tsSuffix}`;
// Build the agent record
const agent: Agent = {
id,
status: "running",
prompt: intent,
ticks: 0,
max_ticks: 1000,
started_at: new Date().toISOString(),
last_tick_at: null,
last_tick_status: null,
last_tick_dur_secs: null,
loader_slug: loader_slug || undefined,
schedule_cron: cron,
};
try {
writeAgent(agent);
return {
ok: true,
id,
name,
intent,
cron,
loader_slug: loader_slug || undefined,
};
} catch (e: any) {
return { ok: false, error: e?.message || "writeAgent failed" };
}
}
scripts- helper scripts it can run
prose-only skill - no sidecar under state/bin/ yet. Steps, if any, are described in SKILL.md.
how we check it- the checks, plus the last 3 runs
| timestamp | verb | score | primary_issue | artifact |
|---|---|---|---|---|
| 2026-05-01 09:19Z | - | 1.00 | - | - |
| 2026-05-01 09:19Z | - | 1.00 | - | - |
| 2026-05-01 09:19Z | - | 1.00 | - | - |