My Claw: Build Your AI System with Claude Code
Glossary
Every term used in the course, defined in context. Bookmark this.
A
Adapter
A module that wraps a data source behind a standard interface. The gatherer uses adapters for email and calendar. Each adapter exports the same function signature (e.g., gws() for live data, fixture() for test data). Adding a new data source means writing a new adapter, not changing the gatherer.
Introduced: Lesson 02 — Background Awareness. Related: Gatherer, Digest
--append-system-prompt
A claude -p flag that adds text to the default system prompt instead of replacing it. Compare with --system-prompt, which replaces the entire default prompt. For soul injection, --system-prompt works better because the default prompt is large and drowns out personality.
Introduced: Lesson 05 — Soul. Related: --system-prompt, Prompt hierarchy
B
Bootstrap (BOOTSTRAP.md)
A self-destructing file that guides the claw through its first-run identity conversation. It tells the claw to weave questions into natural conversation until all identity blanks are filled, then delete itself. The deletion is agent-driven. The claw uses its own Write tool to remove the file. No code needed.
Introduced: Lesson 05 — Soul. Related: IDENTITY.md, USER.md, Prompt hierarchy
C
Channel
A messaging platform the claw is reachable on. Telegram, Discord, Slack, WhatsApp. The Chat SDK normalizes all channels into the same interface. Adding a channel means adding an adapter and an environment variable. The message handler doesn't change.
Introduced: Lesson 03 — Channels. Related: Chat SDK, Polling mode, onSubscribedMessage
Chat SDK
The Vercel Chat SDK. A unified interface for building bots across messaging platforms. Handles polling, webhooks, message normalization, typing indicators, deduplication, and thread management. The course uses it for Telegram with mode: "polling".
Introduced: Lesson 03 — Channels. Related: Channel, onLockConflict, onSubscribedMessage
claude -p
Claude Code's programmatic (headless) mode. Sends a prompt and returns structured output without interactive UI. The foundation of the entire course. Every claw invocation uses claude -p with flags like --output-format json, --resume, --model, and --system-prompt.
Introduced: Lesson 00 — The Substrate. Used in every lesson. Related: execFileSync, Session, --resume
CLAUDE.md
The claw's instruction file. Claude Code reads it automatically on every invocation from the working directory. Contains identity, skill references, behavioral instructions, and observability directives. Updated in lessons 00, 01, 02, 04, and 07 as capabilities are added.
Introduced: Lesson 00 — The Substrate. Updated: Lesson 01, Lesson 02, Lesson 07. Related: Skill
Claw
The personal AI system you build in this course. Named after the claw machine metaphor: it reaches into your digital life, grabs what matters, and brings it back. Technically, it's a set of scripts that call claude -p, manage sessions, and wire into messaging platforms. See also: Familiar
D
Delta awareness
A gather strategy where the gatherer reports what changed since the last cycle, not the full state. "3 new emails" instead of "here are all 25 emails." Achieved by maintaining a continued session with --resume and including the previous digest in the prompt.
Introduced: Lesson 02 — Background Awareness. Related: Gatherer, Digest, --resume
Digest
The cached output of the gatherer, stored at .claw/cache/digest.md. A structured markdown summary of email and calendar data, interpreted by Haiku. The claw reads this file before every response instead of making live API calls. Instant, pre-warmed, already-thought-about.
Introduced: Lesson 02 — Background Awareness. Wired into claw: Lesson 02. Related: Gatherer, Adapter, Prompt hierarchy
E
execFileSync
Node.js function that runs a subprocess by passing arguments as an array directly, bypassing the shell. Used for all claude CLI calls instead of execSync, which joins arguments into a string and runs them through bash. Shell quoting destroys multi-line prompts with JSON or markdown. Replaced by spawn in Lesson 03 when async is needed.
Introduced: Lesson 00 — The Substrate. Related: claude -p
F
Familiar
The design metaphor for the claw. Not an assistant (generic, interchangeable) but a familiar (personal, opinionated, knows its operator). A familiar has a soul, a name, preferences, and a relationship to one specific person.
Introduced: Lesson 05 — Soul. Related: SOUL.md, Bootstrap
G
Gate
See: Script gate
Gatherer
A background process (gather.mjs) that pulls data from adapters, interprets it with Haiku, and writes a digest file. Runs on a timer or manually via ./run.sh gather. The gatherer and the claw use separate sessions and separate models.
Introduced: Lesson 02 — Background Awareness. Related: Adapter, Digest, Delta awareness, Model routing
gws
The Google Workspace CLI. Provides structured JSON access to Gmail, Google Calendar, Google Drive, and Sheets. The claw's first skill wraps gws commands in a SKILL.md file.
Introduced: Lesson 01 — Your First Skill. Used by: Lesson 02 (adapters). Related: Skill, Adapter
H
Haiku
Anthropic's fastest and cheapest Claude model. Used for background work (gathering, script gates) where speed and cost matter more than output quality. ~$0.02 per gather cycle. The course uses Haiku for any task the operator doesn't directly read.
Introduced: Lesson 02 — Background Awareness. Related: Sonnet, Opus, Model routing
Hook
A shell command that fires on a Claude Code lifecycle event. Configured in hooks/hooks.json. The course uses a UserPromptSubmit hook to inject the current datetime before every Claude turn. Hooks output JSON with additionalContext to add information to the conversation.
Introduced: Lesson 04 — Memory. Related: Plugin
I
IDENTITY.md
The claw's surface identity. Name, creature type, vibe, emoji. Starts with blanks that the bootstrap conversation fills in. Injected as part of the system prompt.
Introduced: Lesson 05 — Soul. Related: Bootstrap, SOUL.md, USER.md, Prompt hierarchy
Interaction log
A JSONL file (.claw/interactions.jsonl) that records every operator message and claw response. Timestamped, per-chat, truncated to 500 characters per response. The memory analyzer reads this log to curate MEMORY.md.
Introduced: Lesson 04 — Memory. Related: Memory analyzer, JSONL
J
JSONL
JSON Lines. One JSON object per line, newline-delimited. Used for the interaction log (lesson 04) and structured activity logs (lesson 07). Appendable (no array wrapper to manage), greppable, and queryable with jq. The standard log format throughout the course.
Introduced: Lesson 04 — Memory. Expanded: Lesson 07 — Observability. Related: jq, Interaction log
jq
A command-line JSON processor. Used to query .claw/logs/claw.jsonl for activity, costs, and errors. The ./run.sh logs, ./run.sh costs, and ./run.sh errors commands pipe JSONL through jq.
Introduced: Lesson 07 — Observability. Related: JSONL
K
KeepAlive
A launchd plist key that tells macOS to restart a process if it dies. KeepAlive: true in the channel plist means launchd brings the claw back after a crash, OOM kill, or any other exit. The schedule plist uses StartInterval instead because scheduled tasks are periodic, not continuous.
Introduced: Lesson 06 — Durability. Contrast: Lesson 08 — Scheduling uses StartInterval. Related: launchd, ThrottleInterval, Plist
L
launchd
The macOS process manager. Manages services via plist files in ~/Library/LaunchAgents/. The course uses two plist files: one for the channel (continuous, KeepAlive) and one for the scheduler (periodic, StartInterval). The Linux equivalent is systemd.
Introduced: Lesson 06 — Durability. Extended: Lesson 08 — Scheduling. Related: Plist, KeepAlive, ThrottleInterval
M
MCP (Model Context Protocol)
A protocol for connecting Claude Code to external data sources and tools. The course explicitly avoids MCP servers, using gws via Bash skills instead. The --strict-mcp-config flag prevents auto-discovered MCP servers from bleeding into the container.
Introduced: Lesson 04 — Memory. Related: --strict-mcp-config, Skill
MEMORY.md
A curated briefing document stored at .claw/MEMORY.md. Contains operator preferences, VIPs, active projects, standing orders, and behavioral patterns. Written by the memory analyzer (Sonnet), not the operator. Injected into user context before every response.
Introduced: Lesson 04 — Memory. Related: Memory analyzer, Interaction log, Prompt hierarchy
Memory analyzer
A background process (memory.mjs) that reads the interaction log, compares against current memories, and sends both to Sonnet for curation. Fires on a 10-minute timer inside the channel process. Only runs when 3+ new interactions exist. ~$0.03 per cycle.
Introduced: Lesson 04 — Memory. Related: MEMORY.md, Interaction log, Model routing
Model routing
Using different Claude models for different tasks based on cost and quality tradeoffs. Haiku ($0.02) for background gathering. Sonnet ($0.03) for memory analysis. Opus ($0.04-0.10) for operator conversation. Emerges from cost pressure, not abstraction.
Introduced: Lesson 02 — Background Awareness. Deepened: Lesson 04 — Memory, Lesson 08 — Scheduling. Related: Haiku, Sonnet, Opus
O
onLockConflict: "force"
A Chat SDK option that interrupts the current handler when a new message arrives while processing. Without it, overlapping messages get dropped. With it, the claw stays steerable: sending a new message cancels the old one.
Introduced: Lesson 03 — Channels. Related: Chat SDK, onSubscribedMessage
onSubscribedMessage
A Chat SDK event handler for follow-up messages in a subscribed thread. After onNewMention fires and calls thread.subscribe(), all subsequent messages in that thread route to onSubscribedMessage. This is how the claw maintains conversation continuity at the channel level.
Introduced: Lesson 03 — Channels. Related: Chat SDK, Session
Opus
Anthropic's most capable Claude model. Used for operator-facing conversation where response quality matters. The most expensive model in the routing table. The claw uses Opus (or your default model) for direct interactions.
Related: Haiku, Sonnet, Model routing
P
Plugin
A Claude Code extension that bundles hooks, skills, and settings. The course creates a plugin (.claude-plugin/plugin.json) that injects datetime on every turn via a UserPromptSubmit hook. Loaded with the --plugin-dir flag.
Introduced: Lesson 04 — Memory. Related: Hook
Plist
A macOS property list file in XML format. Used by launchd to define services. The course generates plist files from templates, replacing __CLAW_DIR__ and __HOME__ placeholders with actual paths.
Introduced: Lesson 06 — Durability. Related: launchd, KeepAlive, ThrottleInterval
Polling mode
A Telegram bot mode where the bot pulls messages from Telegram's getUpdates API on a loop. No public endpoint needed, no ngrok, no Vercel deploy. The right mode for a personal system running locally. Switch to mode: "webhook" when you have a public URL.
Introduced: Lesson 03 — Channels. Related: Chat SDK, Channel
Prompt hierarchy
The layered injection order for claw context. Most stable at the top, most volatile at the bottom: Soul > Identity > Operator > Bootstrap > Memory > Digest > Message. Soul files go in the system prompt. Memory and digest go in the user context. The operator's message comes last.
Introduced: Lesson 05 — Soul. Related: --system-prompt, SOUL.md, MEMORY.md, Digest
R
--resume
A claude -p flag that resumes an existing session by ID. The claw saves session IDs to files (.claw/sessions/*.session) and passes them on subsequent calls. This gives conversational continuity across invocations. If a session goes stale, the claw clears the file and retries fresh.
Introduced: Lesson 00 — The Substrate. Stale recovery: Lesson 03 — Channels. Related: Session, claude -p
run.sh
The launcher script that handles Docker args, auth setup, and subcommands. Entry point for ask, gather, channel, memory, logs, costs, errors, and schedule. Gains commands as the course progresses.
Introduced: Lesson 03 — Channels. Extended: Lesson 04 (memory), Lesson 07 (logs, costs, errors), Lesson 08 (schedule)
S
Script gate
A bash script that decides whether a scheduled task should wake the claw. Exits with no output to skip (gate closed). Outputs JSON with wakeAgent: true to proceed (gate open). Gates are free and instant. The claw only spends tokens when a gate opens. Inspired by NanoClaw's scheduling architecture.
Introduced: Lesson 08 — Scheduling. Related: wakeAgent, Model routing
Session
A Claude Code conversation state identified by a session ID. Sessions allow --resume to continue a conversation across invocations. The claw maintains per-chat sessions (one per Telegram conversation) and a separate session for the gatherer. Sessions are files in .claw/sessions/.
Introduced: Lesson 00 — The Substrate. Per-chat: Lesson 03 — Channels. Related: --resume, Delta awareness
Skill (SKILL.md)
A markdown file in skills/<name>/SKILL.md that teaches the claw how to use a tool. Contains commands, when-to-use mappings, and behavioral instructions. Claude Code reads skill files from the skills/ directory automatically. No code, no plugin API, no configuration beyond the file. The pattern scales to any CLI tool. You write six across the course.
Introduced: Lesson 01 — Your First Skill. Repeated: Lessons 02, 04, 06, 07, 08. Related: CLAUDE.md
Sonnet
Anthropic's balanced Claude model. More capable than Haiku, cheaper than Opus. Used for memory analysis where the task requires judgment but isn't operator-facing. ~$0.03 per analysis cycle.
Introduced: Lesson 04 — Memory. Related: Haiku, Opus, Model routing
SOUL.md
The claw's behavioral DNA. Personality, values, boundaries, continuity instructions. Injected as the first layer of the system prompt. Rarely changes after initial setup. Tells the claw to be a familiar, not an assistant.
Introduced: Lesson 05 — Soul. Related: Familiar, IDENTITY.md, Prompt hierarchy
--strict-mcp-config
A claude -p flag that prevents auto-discovered MCP servers from loading. Without it, host MCP servers (Gmail, Calendar) bleed through and the claw suggests connecting integrations it doesn't have. Combined with a CLAUDE.md note, this stops the claw from hallucinating capabilities.
Introduced: Lesson 04 — Memory. Related: MCP, claude -p
--system-prompt
A claude -p flag that replaces the default Claude Code system prompt with custom text. Used for soul injection. The soul files become the primary instruction set instead of being appended to a large default prompt that drowns out personality.
Introduced: Lesson 05 — Soul. Related: --append-system-prompt, Prompt hierarchy, SOUL.md
T
ThrottleInterval
A launchd plist key that sets minimum seconds between restarts. Prevents a crash loop from consuming the machine. The course uses ThrottleInterval: 10 (10 seconds between restarts).
Introduced: Lesson 06 — Durability. Related: KeepAlive, launchd
U
USER.md
The operator profile. Name, timezone, how the operator wants to be addressed. Injected as part of the system prompt. Filled in during the bootstrap conversation. More stable than MEMORY.md (which the analyzer updates), less stable than SOUL.md (which rarely changes).
Introduced: Lesson 05 — Soul. Related: Bootstrap, IDENTITY.md, Prompt hierarchy
W
wakeAgent
The boolean field in a script gate's JSON output that tells the schedule runner whether to invoke the claw. {"wakeAgent": true} opens the gate. {"wakeAgent": false} or no output closes it. The term comes from NanoClaw's scheduling architecture.
Introduced: Lesson 08 — Scheduling. Related: Script gate