From canon
This skill should be used when the user asks to "set up CLAUDE.md", "initialize project memory", "bootstrap claude.md", "create MEMORY.md", "set up persistent context", "install Karpathy's CLAUDE.md trio", or wants to add the CLAUDE.md / MEMORY.md / ERRORS.md persistence layer to a project root.
How this skill is triggered — by the user, by Claude, or both
Slash command
/canon:canon-initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Bootstrap a project with the persistent-context trio that pairs with Compound Engineering: `CLAUDE.md` (behavioral spec the agent reads at session start), `MEMORY.md` (decision log written as work happens), and `ERRORS.md` (failure log consulted before suggesting approaches).
Bootstrap a project with the persistent-context trio that pairs with Compound Engineering: CLAUDE.md (behavioral spec the agent reads at session start), MEMORY.md (decision log written as work happens), and ERRORS.md (failure log consulted before suggesting approaches).
The pattern raises Claude Code coding accuracy from ~65% to ~94% on its own (per the viral Karpathy CLAUDE.md thread) by killing three waste-buckets: re-explaining context every session, unauthorized scope changes, and forgotten decisions.
Trigger this skill when the user:
Before writing any files, ask the user:
/ce:plan in current community knowledge instead of stale training data)If the user doesn't supply these, infer from the project's existing files (package.json, pyproject.toml, README) and confirm before writing.
Compound Engineering is a separate plugin by @EveryInc that provides /ce:plan and /ce:work — the planning + execution half of the loop. canon is the persistence half. They are designed to compose: every /ce:plan lands on top of an agent that has read CLAUDE.md, MEMORY.md, and ERRORS.md; every /ce:work that ships writes its outcome back via the Stop hook.
If the user opted in (default):
Check for prior install. Look for the /ce:plan slash command in the current environment. If it's available, skip ahead — Compound Engineering is already installed. Confirm this to the user with one line and move on.
Add the marketplace. If /ce:plan is not available, instruct the user (or run on their behalf, if the host environment allows) to execute:
/plugin marketplace add EveryInc/compound-engineering-plugin
This registers the plugin source. It is a one-time operation per host environment, not per project.
Install the plugin. Then run:
/plugin install compound-engineering
The user may need to confirm the install in the Claude Code or Cowork UI. Wait for confirmation before proceeding to the file-writing step.
Verify. After install, confirm /ce:plan is now available. If verification fails (because the marketplace name changed, the plugin moved, or the user is on a host that doesn't support plugin installs from a skill), report the failure clearly and continue with the rest of the bootstrap — the persistence half still works without Compound Engineering, the user just won't have /ce:plan and /ce:work to pair with it.
Note for offline / restricted hosts. If the host environment is Cowork without plugin-install permissions, or the user is offline, surface the marketplace add + install commands as a copy-paste block they can run later when they next open Claude Code, and continue with the rest of the bootstrap.
If the user opted out, skip this entire step.
/last30days is an open-source skill by Matt Van Horn (github.com/mvanhorn/last30days-skill). It runs parallel searches across Reddit, Hacker News, Polymarket, GitHub, X / Twitter, YouTube, TikTok, Instagram, Threads, Pinterest, Bluesky, and the open web — typically returning a structured brief in 2-3 minutes. The point: ground /ce:plan in current community knowledge instead of training-data-era information.
Cost and setup model (bring your own keys). Most of /last30days is free out of the box: Reddit (with comments), Hacker News, Polymarket, and GitHub work with zero credentials. X / Twitter works free via browser session (just be logged into x.com), YouTube via yt-dlp (free), Bluesky via app password (free). The paid unlocks are optional: TikTok, Instagram, Threads, Pinterest, and YouTube comments require a ScrapeCreators API key (10,000 free calls, paid after). Perplexity Sonar (via OpenRouter) and Brave web search are optional pay-as-you-go layers. The /last30days setup wizard handles all of this on first run — users who only want the free tier can skip the paid unlocks.
The canonical loop is research → plan → work:
/last30days <topic> # research
/ce:plan <task> # plan, grounded in fresh research
/ce:work # execute
If the user opted in (default):
Check for prior install. Look for the /last30days slash command in the current environment. If it's available, skip ahead and confirm one-liner to the user.
Install via the Claude Code marketplace. If not available, run:
/plugin marketplace add mvanhorn/last30days-skill
That's the install per Matt's README. If Claude Code prompts for an explicit install confirmation, accept it. For other surfaces (claude.ai web, OpenClaw, Gemini CLI, manual), see the install matrix in the upstream README.
Verify. After install, confirm /last30days is now available. If verification fails, report clearly and continue with the rest of the bootstrap — the persistence + planning loop still works without /last30days, the user just won't have the research step pre-wired.
First-run wizard. On first invocation of /last30days, the upstream setup wizard appears and walks the user through optional credential setup. Reddit + HN + Polymarket + GitHub work without any credentials, so the wizard can be fully skipped without losing core value.
Note for offline / restricted hosts. Same fallback as Compound Engineering — surface the GitHub URL and install command as a copy-paste block for the user to run later, and continue.
If the user opted out, skip this entire step.
Read existing CLAUDE.md, MEMORY.md, ERRORS.md at the project root. If any exist:
## Existing heading), or skipUse templates in ${CLAUDE_PLUGIN_ROOT}/templates/:
CLAUDE-minimal.md — Karpathy's 4 viral rules onlyCLAUDE-standard.md — 4 rules + stack lock + MEMORY/ERRORS pointers + voice rulesCLAUDE-full.md — the full template from the viral threadMEMORY.md — empty decision log with the expected section headersERRORS.md — empty failure log with the expected section headersFor each template, do a find-and-replace pass on these placeholders before writing to the project root:
{{PROJECT_NAME}} — project name{{USER_NAME}} — user's name{{USER_ROLE}} — user's role{{STACK}} — tech stack lines (one per line: Language, Framework, Package manager, etc.){{VOICE}} — writing-style description if provided, otherwise leave the section as a TODO comment{{DATE}} — today's date (YYYY-MM-DD) for MEMORY.md and ERRORS.md headersIf the user didn't provide a field, leave a {{TODO: ...}} marker so the file is obviously incomplete and easy to grep for.
The bundled hooks in ${CLAUDE_PLUGIN_ROOT}/hooks/hooks.json are auto-registered when the plugin is installed. No file copying is needed. But explain to the user what the hooks do:
SessionStart — reads MEMORY.md + ERRORS.md into the agent's context at the start of every sessionStop — when Claude finishes a response that completes a unit of work, appends a structured entry to MEMORY.mdIf the user opts out of hooks, instruct them to instead say "session end" or "log this decision" verbally when they want a write — the decision-log skill in this plugin will pick that up.
After writing files, output:
/last30days install status (installed by this run, already present, or skipped per user opt-out / install failed)decision-log and errors-check skills handle the manual write/read cases when the hooks aren't sufficientlook-back, protected-sections, and optimize are also available for workflow mining, Markdown invariants, and eval-gated skill improvement/last30days <topic> → /ce:plan <task> → /ce:work/last30days <topic related to your project> followed by /ce:plan <your first task> — to verify the full loop is wired up end to endAlways produce these at the project root (unless skipped due to collision):
CLAUDE.md — the behavioral specMEMORY.md — empty decision log, ready to growERRORS.md — empty failure log, ready to grownpx claudepluginhub orthogon-ai-labs/canonGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.