session_capture

session_capture is a skill for Claude Code 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 Code

Written for Claude Code: ${CLAUDE_PROJECT_DIR} variable. Also seen: mentions Claude Code.

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

Good fit It captures questions, answers, uploaded-file discussions, decisions, and topic changes for later reports, architecture records, or technical designs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/johnnywuj81/tokenknows/session_capture
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.

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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session_capture

Your own site · 80×15
<a href="https://agentmods.dev/skills/johnnywuj81/tokenknows/session_capture"><img src="https://agentmods.dev/badge/skills/johnnywuj81/tokenknows/session_capture.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00091 $0.01732
Opus 5.5 $0.00036 $0.00693
Sonnet 5.5 $0.00018 $0.00346
Haiku 4.5 $0.00009 $0.00173

Measured 1mo ago against content hash f00bf1bbf539, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 1mo ago), licensed MIT. It adds 91 tokens to every session and 1,732 once invoked, about $0.0004 per session on Opus 5.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

An example relationship-memory and persona package for an AI agent, written in Chinese. It contains placeholder details and explicitly does not describe a real person.

M00NZ1/Persona-Distill-skill · 10 tokens

create-ex

A skill for turning information about a former partner into an AI skill, using imported chat histories, photos, and social-media posts to create relationship memories and a persona.

M00NZ1/Persona-Distill-skill · 69 tokens

kiro-steering-custom

Create custom steering documents for specialized project contexts.

gotalab/cc-sdd · 14 tokens

memory-import

Bulk-import an external knowledge base into Prismer memory via the three-layer import pipeline (07 §3.1). Use when the user asks to import/migrate documents, a knowledge base, or notes into workspace memory. Layer 1 lands raw documents (zero LLM, instantly searchable); Layer 2 is YOUR distillation work — you read the…

Prismer-AI/PrismerCloud · 111 tokens

identity-snapshot

Generate a living profile of the user's working patterns, decision tendencies and quality preferences from their Dex data. Use when the user says 'what are my patterns', 'how do I work', or during week-review. Also use proactively when the model (older than 7 days) is stale. Not for planning a week; use week-plan.

davekilleen/Dex · 74 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