Skip to content

v0.1.21 — resource panels (Agents/Workflows/Output Styles/Rules/Hooks) + symlink discovery fix

Latest

Choose a tag to compare

@weixiaospace weixiaospace released this 19 Jun 13:49

[0.1.21] - 2026-06-19

Added

Five new resource panels — surfacing the .claude/ resources that Claude Code added over the last year:

  • Agents (~/.claude/agents/, .claude/agents/) — subagent definitions. Recursive scan; identity from YAML name frontmatter (filename fallback). Tree shows model · N tools · color from the frontmatter; first-occurrence wins on duplicate names within a scope.
  • Workflows (~/.claude/workflows/, .claude/workflows/) — saved /<name> scripts. Recursive scan; identity from filename.
  • Output Styles (~/.claude/output-styles/, .claude/output-styles/) — system-prompt modifiers. Identity from YAML name (filename fallback). A "Set Active" command writes the chosen style to .claude/settings.local.json#outputStyle (matching what /config does). The active style is marked in the tree with a star icon.
  • Rules (~/.claude/rules/, .claude/rules/) — modular CLAUDE.md companions. Recursive scan, including subdirectories like frontend/. Rules with a paths: frontmatter get a path-scoped chip in the tree.
  • Hooks (read-only view, merges 4 sources: user / project / local settings.json + plugin hooks/hooks.json). Grouped by event (PreToolUse, PostToolUse, SessionStart, …); each handler tagged with source label. Click an entry to open its source file. Per-type icons: command / http / mcp_tool / prompt / agent.

Documentation

  • New ADR-0001 recording the file-backed resource abstraction decision: which resources share an abstraction, what the escape hatches are, and what is explicitly out of scope.
  • New CONTEXT.md project glossary: scope, file-backed resource, bespoke module, first-wins, settings minimization, provider profile.

Changed

Internal abstraction harvest (zero user-facing change):

  • New src/core/file-resource.ts (FileResourceDescriptor + listResource / createResource / deleteResource + frontmatter helpers). Two discovery modes: recursive (recursive .md scan with first-wins de-dup) and flat-subdirs (the Skills pattern: <dir>/<basename>).
  • New src/tree/file-resource-tree.ts generic provider with cache + inflight loading and injectable display/tooltip adornments.
  • New src/commands/file-resource-commands.ts generic .create / .delete registrar.
  • Skills + Agents migrated to the abstraction: skills-tree.ts dropped from 72 to 13 LOC, agents-tree.ts from 73 to 27 LOC, with equivalent shrinkage on the command modules. Existing tests untouched and still pass.

Fixed

  • Symlinked resources are now discovered. readdir reports a symlinked directory as a non-directory, so symlinked skills / agents / output-styles / rules (and plugin-vendored skills) were silently dropped from their panels. Discovery now resolves symlinks and guards against symlink cycles.
  • No more clobbering settings.local.json. Setting an active output style on a malformed settings.local.json previously parsed it as empty and overwrote the file, destroying the user's other keys (hooks / permissions / mcpServers). A corrupt file now surfaces an error instead of being silently replaced; reads no longer mask parse/permission errors.
  • Usage no longer hides errors. A blanket catch reported every failure (including permission errors and bugs) as zero usage; only the benign "file vanished mid-scan" race is now tolerated.
  • Resource listing tolerates a file disappearing mid-scan instead of blanking the whole panel.

Tests

  • 148 core-layer tests (up from 35) — added 10 Agents + 20 file-resource + 6 Workflows + 7 Rules + 9 Output Styles + 9 Hooks, plus symlink-discovery and corrupt-settings regression coverage.