English | 中文
Fine-grained cognitive state tracking for Claude Code.
Most AI tools treat you as either an expert or a beginner. Contour tracks exactly what you know, what you partially understand, and what you don't — per knowledge point, per domain — and keeps that state synchronized across sessions.
- Node.js environment installed
- Ability to run
npxcommands - Claude Code installed and configured
npx skills add Alexu0317-FATHER/contour- Run
/pluginin Claude Code - Switch to the
Marketplacestab - Select
Add Marketplace, enterAlexu0317-FATHER/contour - It will switch back to the
Discovertab, listing the plugins in contour - Select
Install for you (user scope)so Contour works across all your sessions
To update Contour to the latest version:
- Run
/pluginin Claude Code - Switch to
Marketplacestab (use arrow keys or Tab) - Select
contour - Choose
Update marketplace
You can also Enable auto-update to get the latest versions automatically.
Contour uses four local files per domain:
- Core Profile (
{user}-core.md) — Your communication profile. Loaded globally, rarely changes. - Domain State (
{user}-{domain}.md) — Your cognitive state snapshot for a domain. Updated continuously. - Extract Buffer (
extract-buffer.md) — Cross-session signal buffer.
Two update mechanisms work at different time scales:
- Live monitoring (current session) — A Stop hook fires after every assistant response, calls a lightweight Haiku model to classify your message for cognitive signals, and writes directly to Domain State. Fully automatic — no user action needed. A
CLAUDE.mdprompt layer provides backup coverage if hooks are unavailable. - Historical backfill (past sessions) —
/contour:extractscans a past session for signals the hook didn't cover;/contour:syncdistributes them to Domain State. Run manually when needed.
After a few sessions, Contour builds a picture of your cognitive state per domain:
# Alex — coder Domain State
Last synced: 2026-02-22
## Cognitive State
| Knowledge Point | Partial | Mastered | Updated |
|------------------------------------------|---------|----------|---------|
| Claude Code session file structure | | ✓ | 2026-02 |
| MCP server config on Windows | ✓ | | 2026-02 |
| Claude Code plugin install format | | ✓ | 2026-02 |
## Communication Rules
- When explaining Claude Code internals, verify against docs — don't rely on memory
Claude loads this file at session start and adjusts how it communicates — no over-explaining mastered concepts, no skipping necessary context for partial ones.
| Command | When to run | What it does |
|---|---|---|
/contour:setup |
Once, after install | Initializes your Core Profile, Domain State, and Extract Buffer files and injects monitoring into CLAUDE.md |
/contour:extract |
End of a significant session | Scans the session for cognitive signals, writes to buffer |
/contour:sync |
In a new dedicated session | Reads buffer, updates Domain State, surfaces thinking patterns and core candidates, clears buffer |
/contour:uninstall |
When you want to remove Contour | Removes monitoring injection from CLAUDE.md, optionally deletes data files |
Initializes the Contour environment for your workspace.
/contour:setupWhat it does:
- Creates the necessary data files (
Core Profile,Domain State, etc.) in your local directory. - Injects the live monitoring instructions into your workspace's
CLAUDE.mdfile. - Note: Restart Claude Code after setup completes to activate the live monitoring instruction.
Extracts cognitive signals from your current session.
/contour:extractWhen to use:
Run this at the end of a significant working session where you've learned new concepts or demonstrated mastery of existing ones. It scans the conversation history and writes detected signals to the Extract Buffer.
Synchronizes extracted signals into your permanent cognitive state.
/contour:syncWhen to use:
Run this in a new, dedicated session (to avoid context pollution). It reads the Extract Buffer, updates your Domain State, surfaces any thinking patterns and Core Profile candidates for your review, and then clears the buffer.
Removes Contour from your workspace.
/contour:uninstallWhat it does:
- Removes the Contour monitoring instructions from your
CLAUDE.md. - Optionally prompts you to delete the local data files.
Contour stores your data at ~/.claude/contour/ by default. All files are plain Markdown — readable, editable, and yours.
You might want to move the storage folder if you'd like to sync it with a cloud drive (e.g., OneDrive, Dropbox, iCloud) or keep it somewhere more accessible.
-
Open your shell config file in any text editor:
- If you use Zsh (default on macOS):
~/.zshrc - If you use Bash:
~/.bashrc
- If you use Zsh (default on macOS):
-
Add this line at the end of the file (replace the path with your chosen folder):
export AI_INFRA_DIR="/Users/yourname/Library/CloudStorage/OneDrive/contour"
-
Save the file, then restart your terminal (or run
source ~/.zshrc). -
Run
/contour:setup— Contour will create the data files in your new folder.
- Press
Win + R, typesysdm.cpl, and press Enter. - Click Advanced → Environment Variables.
- Under User variables, click New.
- Set:
- Variable name:
AI_INFRA_DIR - Variable value:
C:\Users\YourName\OneDrive\contour(use your actual path)
- Variable name:
- Click OK to save.
- Restart Claude Code for the change to take effect.
- Run
/contour:setup— Contour will create the data files in your new folder.
Note: If you already ran
/contour:setupbefore changing the path, your existing data files won't move automatically. You'll need to manually copy the files from~/.claude/contour/to your new folder, or run/contour:setupagain to create fresh files in the new location.
Because Contour stores your cognitive state in plain Markdown files, you can manually edit them at any time.
- Want to force Claude to treat you as an expert in a specific domain? Open your
{user}-{domain}.mdfile and manually update the status of concepts tomastered. - Want to adjust your communication preferences? Edit your
{user}-core.mdfile.
Contour will respect your manual edits during the next session.
- File Modification: The
/contour:setupcommand will modify theCLAUDE.mdfile in your current workspace to inject monitoring instructions. - Data Privacy: All cognitive state tracking happens locally on your machine. No data is sent to external servers by Contour itself (though Claude Code sends prompts to Anthropic's API as usual).
v0.3.0 — Pre-release. In active testing.
MIT

