insights
Use when the user asks about patterns across their past sessions: how am I using Claude Code, recurring friction, what keeps going wrong, what do I keep repeating to the agent, my prompting mistakes, habits, what should I make permanent. Reads recent sessions, extracts facets per session, and reports what works, what hinders, and instructions worth making permanent.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- insights
- description
- Use when the user asks about patterns across their past sessions: how am I using Claude Code, recurring friction, what keeps going wrong, what do I keep repeating to the agent, my prompting mistakes, habits, what should I make permanent. Reads recent sessions, extracts facets per session, and reports what works, what hinders, and instructions worth making permanent.
03 SKILL.md 正文
Insights
One session shows a mistake, fifty show a habit. The output that matters is the instruction given
in two or more sessions: the person should not give it a third time. Nothing is added to a file
unless the person confirms. Shared reading and apply rules are in the usage skill. A subagent
cannot start subagents, so the main agent runs this pipeline.
1. Collect
The ~50 newest sessions. Counts (turns, tokens, tools, skills, agents) come from
mcp__qsm-usage__ledger. What was asked and what went wrong exists only in the transcripts,
~/.claude/projects/*/*.jsonl: skip sessions with fewer than 2 user messages. For sessions before
the ledger, count with jq, not a model: messages, tool calls and errors, [Request interrupted by user markers, git commit and git push in Bash calls.
2. Facets per session
Haiku workers (model: haiku), about ten sessions each. A session over ~30,000 characters is
summarised in chunks first, keeping file names and error text. Each writes
<scratchpad>/facets/<session>.json with:
| Field | Holds |
|---|---|
underlying_goal |
what the user fundamentally wanted |
outcome |
fully_achieved, mostly_achieved, partially_achieved, not_achieved, unclear_from_transcript |
friction_counts |
{type: count}: misunderstood_request, wrong_approach, buggy_code, user_rejected_action, excessive_changes |
friction_detail |
one sentence, or empty |
prompting_issues |
what in the user's request caused rework: missing context, two tasks in one, a goal stated after work began |
user_instructions |
standing instructions the user gave ("always run tests", "no em-dash") |
brief_summary |
one sentence: wanted, got it or not |
Satisfaction and outcome come from explicit signals only ("perfect", "thanks", "try again", "I give
up"); no signal means unclear_from_transcript.
3. Synthesis
One sonnet worker (model: sonnet) reads the counts and all facet files and writes, in second
person, with examples: project areas with session counts; 3 workflows worth keeping; 3 friction
categories, each with 2 examples, splitting the agent's fault from the user-side cause and naming
prompting mistakes plainly; make it permanent; an at-a-glance block with no raw numbers.
Make it permanent: each instruction given in 2 or more sessions, as the exact line to add, where it goes (a rule, an instruction file, a skill, or a hook when it must be enforced) and why, after checking it is not already in a loaded file.
Findings
A new line costs tokens in every session: count it with qsm-usage count. Its finding has
savingTokens 0 and a savingNote with the cost and the reason ("adds ~25 tokens; given in 6 of
50 sessions"). "Make it permanent" is change.kind: "edit" with the target file and the line in
detail, verdict: "fix", question: "cleanup". Friction and prompting findings are verdict: "warn", change.kind: "none", question: "none", examples in evidence.
Red flags
- When a facet claims satisfaction or a goal with no explicit signal, mark it unclear, because inferred feelings make the habits look false.
- When a "make it permanent" line is already in a loaded file, drop it, because it would be paid for twice.
Say it in the reply
The at-a-glance block, the path of the Markdown file holding every section, and the "make it
permanent" list, since those are the lines the person can act on today. /insights is the
harness's own HTML version.
04 同仓库更多 Skills
worktrunk
Use when working with git worktrees or wt (worktrunk): creating, switching, merging or removing a branch workspace, configuring wt (project or personal config, workflow hooks around switch, commit and merge, commit-message generation, hook approvals), or a wt command that failed. Triggers: make a worktree for this branch, wt merge, wt remove, configure wt, .config/wt.toml, run tests before merge, install deps when a worktree is created, wt hook, wt switch does not cd, nastav wt, wt nefunguje.
web-ladder
Use when a task needs something the internet holds: look something up, search the web, find which page answers a question, read a page, check a library's current docs, a page that needs a browser or shows a captcha. Runs one research loop: searxng search, keywords, cases, search again up to three times, Context7 for a library, Tavily when the keywords will not come, one page in a browser, the person on a wall. Triggers: look this up, search the web, find out online, read this page, check the docs, the page is blocked, captcha, najdi na webu, otevri tu stranku. A multi-round question goes to the qsm-web:web-research agent; one tool's commands are its own skill (searxng, browserbox, opensrc).
searxng
Use when running a web search through the person's own SearXNG instance with qsm-web searxng: choosing a search profile or engines, the instance, time range or language, reading its JSON, a suspended engine. Triggers: search with searxng, qsm-web searxng, search profile, niche search, academic search, IT search, vyhledavaci profil, searxng is down, which engines. The research loop around it is the web-ladder skill.
opensrc
Use when the source code of an open-source library or repository is needed on disk to read: the docs are silent, the behaviour must be checked in code, the version the project pins. Runs qsm-web opensrc get with a package spec or a repository address. Triggers: get the source of this package, clone this library, read the library's code, qsm-web opensrc, stahni zdrojak knihovny. Library docs are the Context7 skill; the research loop is the web-ladder skill.
browserbox
Use when one page needs a real browser through qsm-web browserbox: content built by script, a page that blocks plain fetching, a captcha to solve or hand to the person, a scripted sequence of clicks, a login the person is present for. Triggers: open it in a browser, the page is empty without JavaScript, captcha, take over the browser, run these steps on the page, log in to this site, browserbox. When to reach for a browser at all is the web-ladder skill.
usage
Use when the user wants a review of how they use Claude Code, or setup hands over after a first install: review my Claude Code usage, audit my setup, what does my setup cost, where did my tokens go, clean up my Claude Code, usage report, zkontroluj moje pouzivani. One walkthrough of four stages (machine, work, habits, extensions), questions after each, then one plan. A question about one topic (which hooks are slow) goes to that topic's skill; this session's tokens alone is `/qsm-usage`.