Make /insights a first-class workflow primitive (3 asks)
TL;DR
/insights produces useful data, but the format and lifecycle make it hard to compose with skills or act on systematically. I built a wrapper skill (/insights-enhanced) that materializes a browser checkbox picker and routes selected findings to a dedup-checking application skill (/harness-enhancement). Building this surfaced three concrete improvements that would unlock the same pattern for everyone without the workaround.
Context
Over ~286 sessions / ~885 commits, /insights has been a regular weekly ritual. The data is genuinely valuable, but the friction of acting on it pushed me to build a wrapper. The wrapper works, but it's fighting the runtime in three specific ways that Anthropic could fix in one pass.
The workflow I ended up with:
/insights ← run weekly, generates findings
↓
/insights-enhanced ← opens a browser picker with checkboxes per finding
↓
(user toggles + copies prompt with a routing header baked in)
↓
/harness-enhancement ← dedup-checks against existing CLAUDE.md/skills/hooks,
proposes diffs, applies on per-edit approval
This converts insights from prose into shipped harness changes in one round-trip. Multiple users likely want this; let's make it native.
Concrete asks
1. Persist /insights structured JSON to disk
Today, the structured JSON only lives in model context for one turn (delivered as a system-reminder block). It gets embedded into ~/.claude/usage-data/report.html but only as rendered HTML — not as a discrete JSON blob a wrapper can read back.
Ask: write the same JSON to ~/.claude/usage-data/insights-<timestamp>.json (or alongside report.html) at run time. With that file, wrapper skills can:
- Reuse the data across multiple invocations without re-running
/insights(which has a real generation cost). - Render alternative views (pickers, dashboards, diffs vs. last run).
- Power workflows that span sessions.
My wrapper had to seed a cache by capturing the system reminder in the same turn /insights ran. That's brittle — if the user invokes the wrapper in a fresh session, the data is gone.
2. Built-in browser-based picker / cherry-pick UI
The default prose output is hard to act on:
- Long, paragraph-shaped suggestions where each one is independently actionable.
- No checkboxes, no per-finding toggle.
- Duplicates ("Self-Healing Parallel Wave Orchestrator" appeared twice in one of my reports — same item, two slightly different framings).
- "Horizon" items that are aspirational but get bundled with quick wins.
When I rebuilt the report locally, I added a checkbox UI per finding grouped by category (CLAUDE.md additions / Features to try / Usage patterns / Horizon), with filter buttons ("CLAUDE.md only", "Features only", etc.), a live char count, and a copy button that emits a properly-formatted prompt.
Ask: ship a similar picker as part of /insights itself, or make report.html extensible (e.g., expose a documented JS hook for adding custom panels). The data is already there; only the presentation is missing.
3. Allow skills to invoke idempotent slash commands programmatically
/insights is a CLI command intercepted by the Claude Code client before reaching the model. The model has no way to invoke it. This forced my wrapper into an awkward shape: "the user must type /insights first; I can't do it for them."
I understand why most slash commands shouldn't be model-callable (stateful ones like /clear, /compact, /model would be dangerous). But read-only, idempotent, data-fetching commands like /insights, /cost, and a few others are different — they produce data, don't mutate state, and benefit from being chainable.
Ask: introduce a way for skills to declare and invoke a small allowlist of slash commands. Could be:
- A new tool (
InvokeSlashCommand) restricted by command name allowlist. - A frontmatter field in
SKILL.mddeclaring which slash commands the skill needs, surfaced for user approval like a tool permission. - A model-readable "side channel" that the user grants per-skill or per-session.
Without something like this, every wrapper skill hits the same wall and ends up instructing the user to type the command manually.
What I built (for reference)
All under ~/.claude/skills/ and ~/.claude/hooks/:
/insights-enhanced(skill): wraps/insights. Caches JSON to~/.claude/state/last-insights.json(workaround for #1). Materializes a focused HTML page from a template via a Python script (workaround for #2). Opens it in the browser. Waits for the user to paste back the assembled prompt, which begins with a/harness-enhancementrouting header./harness-enhancement(skill): applies the pasted findings. Dedups against the global CLAUDE.md, project CLAUDE.md files, skills, hooks, andsettings.json. Proposes diffs per finding, waits for per-edit approval, then writes.harness-size-guard.sh(PostToolUse hook onWrite|Edit): warns at 190 lines, hard-blocks at 200 lines for CLAUDE.md / MEMORY.md /.claude/rules/*files. Catches harness bloat at write time.
Happy to share the implementation if useful — the workflow has been a meaningful productivity unlock and I suspect other power users would benefit from the same shape, ideally as a first-class feature rather than three people each building their own version.
Not asking for
- Overnight / unattended automation — not relevant here.
- Cross-machine sync of insights data — local-only is fine.
- Reformatting the existing prose output — keep it; just also offer the structured / pickable view.
Thanks for /insights — it's one of the more useful additions to Claude Code. These three asks would make it a real workflow primitive instead of a one-off report.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗