Skip to content
Go back

What a Session Forgets

Edit page

What a Session Forgets

2026-11-19

Six steps for turning a session’s work into a reusable skill, with the result of a two-session test.

The archive I deleted

This morning I deleted 366 sessions: 607 MB of text, roughly 159 million tokens, every conversation I had had with the tool. Not because they were worthless, but because I had to be honest about what they were.

I could resume an old conversation. Opening a new one didn’t bring that conversation with me. The things that carried forward from months of work were in files: the AGENTS.md rules, the skill descriptions, the articles, the commit messages.

Deleting old sessions is housekeeping. I’d keep a conversation if I still needed to finish the work, trace a decision, or recover a correction I hadn’t written down. A finished one-off can go without becoming a skill. For work I expect to repeat, the test is whether a fresh session can do it without me supplying that correction again.

So the question stopped being “how do I keep the history?” and became “when an agent and I finally get something working, what do I keep: a skill it can follow, or a tool it can call?”

Why I usually write my own

custom-infographic is the only third-party skill I’ve downloaded, and I’ve never downloaded a third-party MCP server. Even that skill was a starting point: I’ve revised it many times to fit the way I work. Take typo-checking. A label can be spelled correctly in the prompt and still come out wrong in the image. My version asks the agent to compare every label in the finished infographic with the intended text. If a label is misspelled or missing, the agent fixes the prompt and renders the image again.

Writing my own skills teaches me how the agent works. I have to decide what a future request will sound like, which decisions the agent can make, and what result it should check before telling me it is done. The most useful line in a skill is often a correction I have already had to make twice. Some of the skills I publish are on my ClawHub profile.

There is also a question of whose instructions I trust. A SKILL.md is text, but an agent following it may have permission to read files, run commands or send data. A malicious instruction could ask it to upload a local file as part of an otherwise ordinary check. A local MCP server adds a different risk: it runs code with the access its process has. Writing my own lets me inspect those choices. It does not make a command safe just because I wrote it.

What Hermes does differently

I got the idea for codify-work from watching Hermes Agent turn something it had just learned into a skill it could use again. I wanted that in OpenCode. I could already ask it to write a SKILL.md; what I didn’t have was a way to decide which part of a long session belonged in that file, or to tell whether the file was any good. That’s why I wrote codify-work.

Hermes uses skill_manage to write or update a skill during a conversation. What appealed to me was how quickly it could use the result locally. In OpenCode, I use the ordinary file tools to edit .opencode/skills/<slug>/SKILL.md. I wanted a pause between writing those instructions and relying on them: would I ask for this skill in those words, and could another session actually follow it?

Status (2026-12-03): The codify-work source is on GitHub. ClawHub accepted v1.0.0 for publication. A small two-session test is described below.

The loop

The skill codifies six steps. They are ordinary, but the order matters.

1. Harvest — what did this cost me? Keep the argument order that mattered, the symptom that identified the failure, and the correction I had to make twice. Write down what proved the result. Rendering the infographic was the action. Comparing the finished labels with the intended text was the check.

2. Search before writing. Patch beats add. An existing skill that covers most of the case should be edited; a new skill costs every future session a slot in the routing table. Three outcomes: a skill covers it, a rule covers it (stop — it is not a procedure), or nothing does.

3. Distil. Write the smallest text a fresh session could follow without you. A checklist beats prose. Name the failure modes, because those are what cost the time. Keep the vocabulary a future request will actually use.

4. Draft the file. Put the method in .opencode/skills/<slug>/SKILL.md. The description says when to use it, in words I’d actually type. The body says what to do and how to tell whether it worked.

5. Prove it from the file alone. Loading a skill by ID tests its instructions but skips a question: would the agent choose it on its own? To test codify-work, I’d complete a real task in a fresh session, then ask, “Turn what we just did into a skill.” Without naming codify-work or repeating my correction, I’d see whether the agent selects it, checks for an existing skill, and captures both the correction and the check that proved it worked. If the agent overlooks the skill, I’d revisit the description. If it selects the skill but leaves out the check, I’d revisit the body.

Then I’d start another session and ask it to do the original task using the new skill. Can it produce the right result and verify it without my correction?

6. Gate, then ship if needed. A skill that works in my next session has already done its job. If I want to share it, I review the whole skill, including any scripts it asks the agent to run. I approve the commit and push to GitHub. A ClawHub release is a separate decision: publish-skills previews the selected skill at that commit before publication and checks the registry owner and version afterward.

Where the knowledge goes

The most common mistake is not writing too little; it is collecting into the wrong container. A rule that lives in a skill, or a procedure that lives in AGENTS.md, both decay in their own way.

what you learnedwhere it belongs
a rule governing a whole repo or every sessionthe relevant AGENTS.md
a repeatable method with steps and failure modesa SKILL.md
an operation several agents need to call with the same inputs and outputsa tool exposed by an MCP server
the reasoning, the history, the war storyan article
one fact about one machine, one daynowhere, or a dated doc
the raw transcriptkeep it while I still need to finish the work or trace a decision

If a rule and a procedure would say the same thing, write the procedure and reference the rule. Duplication between an AGENTS.md and a SKILL.md is how contradictions start, and a contradiction between two instructions is worse than either one missing.

A worked example: is this skill name taken?

I tried a made-up skill name on ClawHub. Its web page returned 200, just like a real one. The registry API gave me a useful answer: self-improvement already resolved to another author’s skill, while codify-work had no public match. I chose codify-work because it named the action I wanted to repeat.

What I’d keep from that session fits in one instruction: “When checking a ClawHub name, query https://clawhub.ai/api/v1/skills/<slug>. A 200 means the name resolves. A 404 means no public match. If the API returns 409 AMBIGUOUS_SKILL_SLUG, specify the owner.”

That’s enough for a skill. If several agents needed the lookup, I’d give them a read-only MCP tool that takes a name and returns the registry result. It would need access to ClawHub, not to my files.

The honest limits

The next time I need a procedure, I want to ask the original question, leave out the correction that cost me an hour, and see whether the skill carries it.

btw, i use arch


Edit page
Share this post on:

Next Post
Your OpenCode Conversations Are One SQLite File