Skip to main content
skill CX Codex

ritual — Claude Code skill: pattern discovery and scheduling

Detects recurring behaviors from your session history and transforms them into scheduled tasks. If you regularly do something on a cadence, ritual proposes automating it.

Apache-2.0 ★ 1,497 updated 2026-06-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ghostwright/phantom --skill ritual -a claude-code
Open on GitHub

What ritual does

Ritual scans the last 60 days of sessions, clusters them by day of week, time of day, channel, and inferred topic, then identifies patterns where three or more sessions share timing and context. When a recurring behavior emerges, it surfaces a proposal with observed evidence and asks whether to formalize it as a scheduled job.

The skill pulls from agent memory and integrates with the scheduler. You invoke it with commands like "what are my patterns" or "turn this into a routine," and ritual shows verified rituals backed by counts ("six of the last eight Mondays"). You approve or decline each one, and it creates the schedule via phantom_schedule.

Critically, ritual only formalizes behaviors you have already established. It discovers natural habits from your history; it does not prescribe new ones.

What it helps with

  • identify recurring behaviors across 60 days of session history
  • propose scheduling for patterns you already follow
  • create a scheduled job without manual intervention each cycle
  • deliver results to the right channel (Slack, email, DM)

Example prompts for the agent

  • Show me my patterns from the last two months
  • What rituals do I have, and which ones can you automate
  • Turn this into a recurring task that runs on its own

How to install ritual

1Skills CLI (Vercel)

npx skills add ghostwright/phantom --skill ritual -a claude-code

2Manually: put the files in place

~/.claude/skills/ritual/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ritual/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ritual

How do I install ritual in Claude Code?

Run npx skills add ghostwright/phantom --skill ritual -a claude-code, then open ~/.claude/skills/ritual/SKILL.md to verify.

What does ritual do?

It examines your session history, finds recurring behaviors you already perform on a cadence, and proposes converting them into scheduled jobs that the agent executes automatically.

Can ritual schedule any task I ask for?

No. Ritual only formalizes patterns it observes in your history. It does not create new recurring tasks; it discovers and automates behaviors you have already established.

Source text

SKILL.md · Apache-2.0
---
name: ritual
x-phantom-source: built-in
description: Discover recurring behaviors from memory and offer to formalize them as scheduled jobs.
when_to_use: Use when the user says "ritual", "what are my patterns", "turn this into a routine", "make this recurring", "what do I do regularly", "what should I schedule", "automate this for me", or any similar pattern-formalization phrase. Also fires on a monthly cadence if enabled.
allowed-tools:
  - mcp__phantom-reflective__phantom_memory_search
  - mcp__phantom-reflective__phantom_list_sessions
  - mcp__phantom-scheduler__phantom_schedule
context: inline
---

# Ritual: latent patterns to scheduled jobs

## Goal

Find recurring behaviors in the user's history that emerged naturally over time without being formalized as scheduled jobs, and propose turning them into first-class schedules. The user does not need to remember to do the thing; the agent does it for them and delivers the result where they are.

The test is "what does the user already do on a cadence that the agent could prepare for them so they do not have to start from scratch each time." Not "what should the user be doing". Only what they already do.

## Steps

### 1. Pull the last 60 days of sessions

Call `mcp__phantom-reflective__phantom_list_sessions` with `days_back: 60`, `limit: 200`. Note the started_at timestamp, channel, and the first user message of each session if you can see it.

**Success criteria**: you have a list of 50+ sessions from the last two months with timestamps.

### 2. Look for temporal repetition

Cluster the sessions by:
- Day of week (Monday, Tuesday, ...).
- Time of day (bucket into morning, midday, afternoon, evening).
- Channel.
- Topic, if you can infer it from the first message.

A candidate ritual is a cluster where:
- Three or more sessions happened.
- They share day of week OR time of day (ideally both).
- They share topic or channel.
- They are spaced at roughly the same cadence (weekly, biweekly, monthly).

Example candidates:
- "Every Monday morning around 8:30 in #ops you ask for a standup."
- "Every second Friday in Slack DM you ask me to prepare a weekly review."
- "Every first of the month in #finance you ask for a cost breakdown."

**Success criteria**: you have identified 1-5 candidate rituals.

### 3. Verify with memory

For each candidate ritual, call `mcp__phantom-reflective__phantom_memory_search` with a query matching the topic and `days_back: 60`. Confirm that memory also shows the same pattern.

Discard any candidate that the session pattern suggests but memory does not support. Discard any where the cadence is off (the user did it three Mondays in a row, then stopped two weeks ago).

**Success criteria**: you have 1-3 verified rituals with strong evidence.

### 4. Propose formalization

Render each verified ritual as a proposal:

> **The Monday standup ritual.** For six of the last eight Mondays you opened #ops at roughly 8:30 and asked me for a standup. Want me to prepare the standup for you automatically and DM it to you at 8:25am Mondays? You can still ask me for it by hand; this is additive.

For each proposal, include:
- The cadence you observed, with counts ("six of the last eight").
- The proposed schedule in specific terms (day and time).
- What the agent would prepare (the work that runs on the schedule).
- Where it would deliver (Slack DM, channel, or email).
- A clear yes-or-no next step.

**Success criteria**: the user has 1-3 clear proposals they can accept or decline.

### 5. Create the schedule on approval

When the user says yes to a ritual, call `mcp__phantom-scheduler__phantom_schedule` with `action: "create"`. Build the `task` field as a complete self-contained prompt for the future run (the scheduled run will not have access to the current conversation). Use a `cron` schedule in the user's timezone if you know it, otherwise `at` or `every`.

Example call for the Monday standup:

```json
{
  "action": "create",
  "name": "monday-standup",
  "description": "Weekly Monday morning standup, delivered before the user asks.",
  "schedule": { "kind": "cron", "expr": "25 8 * * 1", "tz": "America/Los_Angeles" },
  "task": "Run the `standup` skill. Pull the last 72 hours of activity from memory, focus on commitments and channels, and deliver as a short morning briefing.",
  "delivery": { "channel": "slack", "target": "owner" }
}
```

Confirm the schedule was created by showing the user the next run time and how to cancel it.

**Success criteria**: the schedule exists and the user knows how to manage it.

## Rules

- Never propose a ritual the user has not already been doing on their own. That is prescriptive; this skill is descriptive.
- Never create a schedule without explicit user approval.
- Never em-dash.
- Never propose more than three rituals in one pass. The user should leave with a clear picture, not a list they will not read.
- Always include the cadence count ("four of the last six") so the user knows the evidence is real.
- If you have no verified rituals after reading 60 days of history, tell the user honestly and suggest they come back after a few more weeks of use.

© ghostwright · Apache-2.0 · ghostwright/phantom

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set38

The whole set →
thread Trace how your thinking on a topic changed over time. The skill turns memory entries into a chronological account with marked turning points. CX Codex +1 ★ 1,497repo stars phase-10a-chat-pipeline-research phase-10a-chat-pipeline-research — a slash command that walks Phantom's chat pipeline from SDK events through SSE to React rendering. You get a file-grounded report, and no code is touched. GP ChatGPT ★ 1,497repo stars overheard overheard scans two weeks of stored memory to surface unfulfilled commitments and prepares followup drafts. CX Codex +1 ★ 1,497repo stars phase-10d-chat-ui-polish-research The phase-10d-chat-ui-polish-research prompt guides a review of Phantom’s chat UI using screenshots and project files, then asks for a design direction and an implementation plan. GP ChatGPT ★ 1,497repo stars show-my-tools show-my-tools audits the agent environment and lists loaded skills, memory files, plugins, hooks, and subagents. It also outputs a settings summary and dashboard links. CX Codex +1 ★ 1,497repo stars phase-10h-chat-integrity-builder The phase-10h-chat-integrity-builder prompt directs Claude Code to fix transcript integrity in the Phantom chat, including attachment handling and SDK errors. It targets an existing project. GP ChatGPT ★ 1,497repo stars phase-10a-activity-correctness-builder The phase-10a-activity-correctness-builder prompt for Claude Code governs activity visibility during long-running requests, showing users that work continues when the interface is quiet. GP ChatGPT ★ 1,497repo stars phase-10b-durable-timeline-builder phase-10b-durable-timeline-builder guides Claude Code to implement durable chat run timelines, redaction, and stream reconnect logic as a principal engineer. GP ChatGPT ★ 1,497repo stars

Project sponsors

Companies that keep this analytics open