Context
Currently pulser is run-once: edit SKILL.md → run pulser → see results → repeat. During active skill development, a --watch flag that re-runs on file changes would save time.
Proposed
pulser --watch
# Watches ~/.claude/skills/ for changes, re-runs scan on save
What to do
- Add
--watch flag to CLIOptions in src/types.ts
- In
src/index.ts, after initial scan, enter a watch loop using fs.watch (recursive) on the skills directory
- Debounce re-scans (300ms) to avoid flooding on multi-file saves
- Clear terminal and re-run the TUI monitor on each change
The TUI monitor (src/monitor/tui.ts) already handles terminal rewriting, so the rendering infrastructure exists.
Considerations
fs.watch behavior varies across platforms — test on macOS and Linux
- Debounce is important: editors may trigger multiple events per save
- Ctrl+C should exit cleanly
Files to modify
src/types.ts (CLIOptions)
src/index.ts (watch loop)
Difficulty: Medium
Context
Currently pulser is run-once: edit SKILL.md → run pulser → see results → repeat. During active skill development, a
--watchflag that re-runs on file changes would save time.Proposed
pulser --watch # Watches ~/.claude/skills/ for changes, re-runs scan on saveWhat to do
--watchflag toCLIOptionsinsrc/types.tssrc/index.ts, after initial scan, enter a watch loop usingfs.watch(recursive) on the skills directoryThe TUI monitor (
src/monitor/tui.ts) already handles terminal rewriting, so the rendering infrastructure exists.Considerations
fs.watchbehavior varies across platforms — test on macOS and LinuxFiles to modify
src/types.ts(CLIOptions)src/index.ts(watch loop)Difficulty: Medium