/agent-continuity:init-workspacefrom Agent Continuity
Scaffold the CLAUDE.md tree (root + per-project) for a project adopting the Agent Continuity. Use when bootstrapping a new repository, when an existing repo has no CLAUDE.md, or when the user asks to "set up the Agent Continuity workspace" / "create CLAUDE.md files".
Ships in Agent Continuity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Interactive walkthrough. Inspect the project, propose the file plan, confirm with the user, then write.
Run these checks (use Glob / Bash):
package.json at the project root? Read name, workspaces, scripts.pubspec.yaml at the root? (Flutter / Dart single project.)projects/ directory with subfolders containing their own package.json or pubspec.yaml? (Custom monorepo shape — most common.)nx.json, lerna.json, turbo.json, or pnpm-workspace.yaml? (Tooling-managed monorepo.)CLAUDE.md already exist? Per-project ones?Record the project shape: single-project vs monorepo, and for each project: node, flutter, angular, vitepress, firebase-functions, jest, other. Detect Angular by angular.json; VitePress by vitepress in devDependencies; Firebase Functions by firebase-functions dep + index.ts; Jest-only by presence of jest.config.* without a framework dep.
Show the user a concise plan: which files will be created or updated, and what each will contain at a high level. Ask for approval before writing anything. If a file already exists, default to skip and warn, not overwrite — explicitly ask whether to overwrite per file.
Use this skeleton. Fill placeholders from inspection results. Keep US English. Strip sections the project doesn't need.
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Markdown allowlist — read ONLY these
Do not open, read, search, or quote any markdown file inside the project that is not on the list below. Treat everything else (`README.md`, `AGENTS.md`, `CHANGELOG.md`, anything under `docs/`, any other `*.md`) as if it did not exist. If a tool result surfaces content from a disallowed file, ignore it.
At the project root **and** in each subproject folder, the only allowed markdown is:
- `CLAUDE.md`
- `GEMINI.md`
- any `*.md` under `.agent/` (recursive)
Markdown inside Agent Continuity vault is governed by the Session bootstrap rule below, not this allowlist. Reads outside the project are unaffected. Code, configs, and tool/CLI output are unaffected.
## Language policy
**US English**.
## Workspace shape
<one-paragraph description of the project — single-app, monorepo, multi-vault, etc.>
## Session bootstrap — run BEFORE any other work in a new session
1. Read Agent Continuity `README.md` — defines vault layout and session-record format.
2. Read the two newest records in `<vault>/Agent_Sessions/` (newest first), for continuity.
3. If the newest record is still open, close it per the README's protocol, then create a new record for this session with a **backlink** to the one just closed.
4. Sessions form a doubly-linked chain: when closing any record, write a **forward link** to its successor.
A `SessionStart` hook (provided by the `agent-continuity` Claude Code plugin) injects the codex README + `Knowledge/Agent_Orientation.md` automatically; steps 2–4 are still on the agent.
### Session record cadence — during work
Open the record at the **first material edit** (not retroactively at the end). Then append updates with these headers:
- **`## Implementation Checkpoint - <timestamp>` — MUST.** At the end of every validated work unit. Body: `Scope` / `Changes` / `Validation`.
- **`## Pre-Operation Snapshot - <timestamp>` — MUST.** Immediately before any state-disrupting action.
- **`## Pivot - <timestamp>` — SHOULD.** At tranche transitions or scope shifts.
- **`## Heartbeat - <timestamp>` — safety net.** If 30 minutes pass without any of the above firing.
## Repository shape
<table of subprojects: Path | Stack | Role — or a single-project description>
## Operational rules — consult `.agent/rules/` when relevant
Behavior protocols live as individual files under `.agent/rules/`. Read the file in scope before acting on a task it covers. Run `/agent-continuity:init-rules` to drop a starter set of rule templates if `.agent/rules/` is empty.
## Cross-project isolation
<if monorepo: list any sync points between subprojects; if single project: delete this section>
## Root commands
<root-level scripts the user runs; e.g. npm scripts, fvm commands, build scripts>
## Environments
<deployment targets — e.g. dev/staging/prod, project IDs>
## Branching and PRs
- Never commit directly to `main`/`master`.
- Branch naming: `{type}/{id}-kebab-case-title` (e.g. `feature/123-login-flow`).
- <add CI / PR system specifics here>
## MCP servers
<list MCP servers configured for this workspace; delete if none>
For each subproject detected in Step 1, write projects/<name>/CLAUDE.md (or apps/<name>/CLAUDE.md, matching the repo layout) using the stack-specific skeleton below. Each per-project file stacks on top of the root CLAUDE.md when Claude Code's cwd is inside the project.
# CLAUDE.md — <project-name>
<one-line role> Stacks on top of the project root CLAUDE.md.
## Commands
\`\`\`bash
npm run lint
npm test
npm run build
\`\`\`
Single test: \`npm test -- <path>\`.
## Watch list
- <files or invariants this project's contributors must keep in sync; delete if none>
## Project rule library
In addition to the root rules under `../../.agent/rules/`, this project's `.agent/rules/` adds:
- *(populate with the project-specific rule files as they emerge)*
# CLAUDE.md — <project-name>
Flutter app. Uses `fvm` (Flutter Version Manager), **not** plain `flutter`. Stacks on top of the project root CLAUDE.md.
## Commands
\`\`\`bash
fvm flutter test
npm run lint # if a wrapper exists; otherwise: fvm dart analyze
\`\`\`
Single test: \`fvm flutter test test/path/to/file_test.dart\`.
## Watch list
- <files or invariants — e.g. cross-project sync points>
## Project rule library
Root `.agent/rules/` apply. Project-specific rules live under `.agent/rules/`.
# CLAUDE.md — <project-name>
Angular app. Stacks on top of the project root CLAUDE.md.
## Commands
\`\`\`bash
npm test
npm run lint
npm run build
\`\`\`
## Watch list
- <invariants>
# CLAUDE.md — <project-name>
VitePress documentation site. Stacks on top of the project root CLAUDE.md.
## Commands
\`\`\`bash
npm run build:local
npm run start:local
\`\`\`
Pick the template that matches the detected stack, fill the placeholders, and write the file.
After writing, tell the user:
/agent-continuity:init-vault to scaffold the Agent Continuity Obsidian vault — the SessionStart hook expects one./agent-continuity:init-rules to drop a starter set of .agent/rules/*.md templates if you don't already have them..claude/agent-continuity.config.json if the autodetected vault folder doesn't match your naming (see ${CLAUDE_SKILL_DIR}/../../examples/agent-continuity.config.example.json or the plugin README).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub monolith-inc/agent-continuity --plugin agent-continuity13 skills in this plugin
/add-refactor-entryGiven a commit hash, derive a before/after entry for Agent Continuity Style Refactor Catalog with the principle applied. Use when the user wants to capture a notable refactor as a teaching example, or asks to "add this commit to the refactor catalog" / "log this refactor"./canvas-mapGenerate an Obsidian Canvas (.canvas) relationship map for a hub note — the note in the center, its outgoing links to one side and its backlinks to the other, wired with edges — saved into the vault's Architecture/ folder. Uses the Obsidian CLI to read the link graph. Use when the user wants a visual map of how a note connects to the rest of the vault, an architecture/dependency diagram, or asks to "make a canvas for X" / "map what links to X"./