惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
M
MIT News - Artificial intelligence
博客园_首页
IT之家
IT之家
L
LangChain Blog
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
博客园 - Franky
云风的 BLOG
云风的 BLOG
罗磊的独立博客
量子位
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
博客园 - 叶小钗
S
SegmentFault 最新的问题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
T
Tailwind CSS Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Why skill-tree writes state to two different paths
J Now · 2026-04-25 · via DEV Community

J Now

I built skill-tree to classify my own Claude Code sessions against Anthropic's AI Fluency Index — 11 behaviors measured across 9,830 conversations in their February 2026 study. The core loop is straightforward: analyze session history, assign one of seven archetype cards, pick a behavior I haven't touched as a growth quest for next session.

The growth quest only works if it persists. In Claude Code, that's simple: write to ~/.skill-tree/ and it's there next session.

Cowork broke this immediately.

Cowork's $HOME is ephemeral. Anything written there during a session is gone when the session ends. I didn't catch this in early testing because I was developing against Claude Code exclusively, and the two environments look identical from inside the plugin. The quest would be assigned, written to $HOME/.skill-tree/state.json, and silently vanish before the next SessionStart hook could read it.

The fix required detecting which runtime you're in and routing writes accordingly. Cowork exposes $CLAUDE_PLUGIN_ROOT as a durable path — it survives between sessions. Claude Code doesn't set that variable. So now the state path resolves like this:

const stateDir = process.env.CLAUDE_PLUGIN_ROOT
  ? path.join(process.env.CLAUDE_PLUGIN_ROOT, '.user-state')
  : path.join(os.homedir(), '.skill-tree');

Enter fullscreen mode Exit fullscreen mode


n
Two lines. But it took a full session of debugging a quest that kept resetting to find the right two lines.

The rest of the 7-step pipeline — extract user messages, remote classifier on Fly.io (Claude Haiku), archetype assignment, narrative synthesis, render, return stable URL — runs the same in both environments. The dual state path is the only fork.

If you're building plugins that target both Claude Code and Cowork, test state persistence explicitly in Cowork early. The ephemeral $HOME is not documented prominently, and it will silently swallow anything you write there.

Live example of the rendered archetype card: skill-tree-ai.fly.dev/fixture/illuminator

github.com/robertnowell/skill-tree