analyzing-sessions
Skill83 starsChanged 6 days agoMITView on GitHub
Reads past Claude Code sessions looking for the user's corrections, in two modes. Count - labels every correction since the last report with an error type from common-ai-errors.md or other, has the user confirm the labels on a page and writes the counts to ~/.kulmine/corrections/. Session page - turns a finished session into a page the user comments on message by message, then acts on every comment. Use it when the user asks to count their corrections, which errors keep coming back or whether a change to the agent setup made them rarer, and when they want to review, comment on or walk through a finished session.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MK27MK/kulmineword for word, first seen Nov 29, 2026
Other versions1 project uses a version of this.
Word for word · 1
- MK27MK/kulmine★ 83100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- domain-modelingSkill
- interview-meSkill
- orchestrateSkill
- pagesSkill
- prototypingSkill
- researchingSkill
- teachingSkill
- trackingSkill
- wait-whatSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Outcome: Update the same page with the total, the error type that changed most since the previous report in corrections per 100 turns, the …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Analyzing sessions
A correction is a user turn saying the previous reply or action was wrong, unwanted, too long, incomplete or off topic, that repeats an instruction already given, or that interrupts the agent. New requests, approvals, answers and follow-up questions are not.
Count
The error types are the rows of the table in ${CLAUDE_SKILL_DIR}/../../docs/common-ai-errors.md. During the Count don't touch that file or the agent setup: you are measuring them.
- Turns.
python3 "${CLAUDE_SKILL_DIR}/scripts/turns.py" > <scratchpad>/turns.jsonl, with--since <date>only if the user gives a range. One line per turn since the last report:useris the turn,agentthe end of the text before it. Empty file: say so and stop. - Labels. One line per correction in
<scratchpad>/labels.jsonl:{"id", "type", "words", "quote", "did"}.typeis a code from the table, orotherif it only fits by forcing it;wordsthe user's words copied exactly fromuser;quotethe same in English, at most 20 words;didwhat the agent had done, in one line. Several complaints in the same turn: a single line, on the main point. - Confirmation. A page with
kulmine:pages, typereport: the turns read, each error type with its habit in a few words, and one row per correction (quote, what the agent had done, proposed error type) withdata-k-optionsoption buttons on the codes,otherandnot a correction. In the page's reply the user adds the missing corrections. Apply the reply tolabels.jsonl. - Report.
python3 "${CLAUDE_SKILL_DIR}/scripts/count.py" <scratchpad>/turns.jsonl <scratchpad>/labels.jsonl > <scratchpad>/report.md; if it flags wrong labels, fix them and run it again. Append## Candidates for a new error type: every cause that corrections from two or more sessions share and no error type names, with one quote per session, orNone.. Copy it to~/.kulmine/corrections/<today>.md(<today>T<HHMM>.mdif it already exists). - Outcome. Update the same page with the total, the error type that changed most since the previous report in corrections per 100 turns, the report's path and the candidates: one becomes an error type only if the user picks it up.
Session page
- Page.
python3 "${CLAUDE_SKILL_DIR}/scripts/session_page.py" --project <session folder> --grep "<words from the first prompt>" -o <scratchpad>/<name>.html. The folder comes from the user or, if they name the session by title, from thecwdofmcp__ccd_session_mgmt__list_sessions. Check that the first message is the prompt the user meant. - Publish with Artifact,
capabilities: {"db": {}},icon: "chat"; for a session already reviewed, republish to itsurl, so the comments stay on the messages. Give the link only to the user: the page contains the whole transcript. - Read when the user is done:
ArtifactDatalistoncommentsand onreplieswithquery: {"limit": 1000}, andArtifactCommentsread. Acommentsdocument opens a thread on messagen(selectedquote,text, sometimes the firstreply); arepliesdocument is a later turn of it (comment,role,text,at). A thread is waiting for you if its last turn byatis notagent. - Act on every waiting comment following "Changing the agent setup" in kulmine's
AGENTS.md; comments with the same cause get a single fix. A question gets an answer and no change. - Answer in the page, not in chat: an
ArtifactDatabatchwith onesetinrepliesper thread (newdoc_id,{comment, role: "agent", text, at},atthe current ISO time); for platform threadsreply, thenresolve. One or two sentences: what changed or why nothing did. In chat, one line.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

