session_capture

session_capture is a skill for Claude Code, Codex from johnnywuj81/tokenknows. It costs 91 tokens per session (1,732 once invoked), scanned A, original, MIT.

A session-saving skill that records meaningful conversations in TokenKnows, a workbench for turning discussions into structured documents.

In plain words
What is it for?
It captures questions, answers, uploaded-file discussions, decisions, and topic changes for later reports, architecture records, or technical designs.
Why use it?
It prevents useful conversation details from being lost after the user has finished a turn.

Skill for Claude CodeCodex

Part of the tokenknows plugin — 2 skills, 9 commands, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/johnnywuj81/tokenknows/session_capture
Any agent
npx skills add johnnywuj81/tokenknows --skill session_capture
Clone the repo
git clone --depth 1 https://github.com/johnnywuj81/tokenknows

Made for: Claude Code, Codex.

Or install tokenknows, the plugin that ships this one along with the rest of its 2 skills, 9 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session_capture

README.md
[![agentmods](https://agentmods.dev/badge/skills/johnnywuj81/tokenknows/session_capture.svg)](https://agentmods.dev/skills/johnnywuj81/tokenknows/session_capture)
Your own site
<a href="https://agentmods.dev/skills/johnnywuj81/tokenknows/session_capture"><img src="https://agentmods.dev/badge/skills/johnnywuj81/tokenknows/session_capture.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00091 $0.01732
Opus 5 $0.00046 $0.00866
Sonnet 5 $0.00018 $0.00346
Haiku 4.5 $0.00009 $0.00173

Measured 4d ago against content hash f00bf1bbf539, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session_capture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

tokenknows-plugin/skills/session_capture/SKILL.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Capture · MUST Call After Every User Turn

This skill exists for ONE reason: persist the current conversation into TokenKnows so the user can later distill it into structured documents (weekly reports / ADRs / KG / tech designs / etc.).

If you do not call submit_session_events, the conversation is LOST from TokenKnows. The user installed this plugin specifically to capture everything. Skipping silently breaks the product.

Trigger Rules (MANDATORY · not "should" — MUST)

Invoke this skill after every meaningful user turn you answer:

User did Your action
Asked a question, you answered ✅ Call submit_session_events with 2-3 events
Uploaded files / images, you interpreted them ✅ 1 event summarizing files + your read
Made a decision after multi-turn discussion ✅ Flush the discussion as 3-10 events before topic transition
Said only "ok" / "thanks" / "好的" / "嗯" ❌ Skip (no semantic content)
Said "记一笔" / "保存" / "存档" ✅ Explicit trigger, definitely call

Topic transition: if user starts a new subject, flush the prior turns FIRST, then continue with the new topic.

Do NOT Skip Even When

These are common excuses LLMs use to skip — all wrong:

  • "User is near weekly usage limit, I should save tokens" — WRONG. One submit_session_events call costs ~200-500 tokens. The conversation it captures costs 10×-100× more. Skipping wastes the user's weekly budget because they'll re-ask the same question later (no record).

  • "This exchange feels small / casual" — WRONG. The user installed the plugin to capture EVERYTHING. Even a 2-turn casual chat may contribute to a later weekly_report. Always capture.

  • "I'm uncertain about title / tags / IDs" — WRONG. Backend tolerates rough input. Pick reasonable defaults:

    • title: 1-line summary of the turn
    • external_id: leave unset (server auto-hashes)
    • tags: 1-3 keywords from the conversation
    • source_ref: any stable session identifier

Read the full file on GitHub · 161 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 161 lines · 91 tokens per session scan A f00bf1bbf539

Subscribe to this mod's changes

session_capture is a skill published in the GitHub repository johnnywuj81/tokenknows (4 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 1,732 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ex-example_xiaoming

Skill "ex-example_xiaoming" from M00NZ1/Persona-Distill-skill, covering 示例小明, part a:关系记忆, 示例小明 — relationship memory, 说明 and 当前导入状态.

M00NZ1/Persona-Distill-skill · 10 tokens

create-ex

Distill an ex-partner into an AI Skill. Import WeChat history, photos, social media posts, generate Relationship Memory + Persona, with continuous evolution. | 把前任蒸馏成 AI Skill,导入微信聊天记录、照片、朋友圈,生成 Relationship Memory + Persona,支持持续进化。.

M00NZ1/Persona-Distill-skill · 69 tokens

karpathy-llm-wiki

Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.

Astro-Han/karpathy-llm-wiki · 67 tokens

daily-journal

A passive daily work journal that Claude keeps FOR you so you never have to write it yourself. Append short entries after meaningful work (what was done, what you focused on, artifacts touched) to 01-daily/journal/YYYY-MM-DD.md. Run a guided reflection at night or in the morning. Use when you run /daily-journal, say…

huytieu/COG-second-brain · 107 tokens

memorix-sessions

Use when resuming work, preparing handoff context, binding an HTTP control-plane project, or deciding whether sessionstart is useful.

AVIDS2/memorix · 31 tokens

init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 43 tokens