DEV Community

J Now
J Now

Posted on

skill-tree: why Claude Code and Cowork need different state paths

Building a Claude plugin that persists data across sessions taught me something I didn't expect: Cowork's $HOME is ephemeral. Every session starts fresh. Anything written to ~/.skill-tree/ during a Cowork session is gone the next time you open one.

This broke the growth quest feature in skill-tree — a tool I built to classify your Claude sessions against Anthropic's AI Fluency Index (9,830 conversations, 11 observable behaviors) and give you one behavior you haven't tried as a target for your next session. The whole point of a "next session" target is that it survives to the next session.

The fix was a dual-state-path: Claude Code writes to ~/.skill-tree/ because its home directory is durable. Cowork writes to $CLAUDE_PLUGIN_ROOT/.user-state/ because that path persists across Cowork sessions even when $HOME doesn't. One SessionStart hook reads whichever path is populated and loads the previous quest.

# Claude Code install
claude plugin marketplace add robertnowell/ai-fluency-skill-cards
claude plugin install skill-tree-ai@ai-fluency-skill-cards

# Cowork install — drop the zip in your plugin folder
# uses $CLAUDE_PLUGIN_ROOT/.user-state/ automatically
Enter fullscreen mode Exit fullscreen mode

The rest of the tool is a 7-step orchestration (30–60 seconds): find session files, extract user messages, send to a remote classifier running Claude Haiku on Fly.io, assign one of seven archetype cards, synthesize a narrative, render, return a stable URL. The archetype cards are rendered as tarot cards using curated museum art — live example at skill-tree-ai.fly.dev/fixture/illuminator.

The behavior taxonomy comes from Dakan & Feller's 4D AI Fluency Framework. Three of the four axes (Description, Discernment, Delegation) are visible in chat logs and classifiable. The fourth, Diligence, isn't — it lives in how you act on Claude's output, not in the conversation itself.

Also ships as an MCP server (npm install skill-tree-ai) for Cursor, VS Code, and Windsurf.

github.com/robertnowell/skill-tree

Top comments (0)