knowledge-session-state-and-context-durable-transcript-and-event-projection

knowledge-session-state-and-context-durable-transcript-and-event-projection is a skill for Claude Code, Codex from echoVic/blade-code. It costs 159 tokens per session (2,810 once invoked), scanned A, a copy of knowledge-session-state-and-context, MIT.

A durable session-history component that records committed events and rebuilds conversation views for different interfaces.

In plain words
What is it for?
It is for ordered event storage, replay, live updates, SQLite read models, and consistent conversation projections in terminal and web interfaces.
Why use it?
It keeps the session history recoverable across processes and lets interfaces catch up or reconstruct their view from the stored record.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit It is for ordered event storage, replay, live updates, SQLite read models, and consistent conversation projections in terminal and web interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/echovic/blade-code/durable-transcript-and-event-projection
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 echoVic/blade-code --skill durable-transcript-and-event-projection
Clone the repo
git clone --depth 1 https://github.com/echoVic/blade-code

Made for: Claude Code, Codex.

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 knowledge-session-state-and-context-durable-transcript-and-event-projection

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/blade-code/durable-transcript-and-event-projection.svg)](https://agentmods.dev/skills/echovic/blade-code/durable-transcript-and-event-projection)
Your own site
<a href="https://agentmods.dev/skills/echovic/blade-code/durable-transcript-and-event-projection"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/durable-transcript-and-event-projection.svg" alt="Measured on agentmods" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,810 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 84% copy Near-identical to another mod 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.00159 $0.02810
Opus 5 $0.00079 $0.01405
Sonnet 5 $0.00032 $0.00562
Haiku 4.5 $0.00016 $0.00281

Measured 4d ago against content hash 76e48f53feab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

knowledge-session-state-and-context-durable-transcript-and-event-projection 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.

Origin

This is a copy

84% identical to knowledge-session-state-and-context — 138 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.trae/knowledges/session-state-and-context/durable-transcript-and-event-projection/SKILL.md · 121 lines

How it starts

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

Module Structure

该组件是 Session 跨运行时、服务和界面的共享事实层:JSONL 保存 committed event,SessionEventLog 在落盘后扇出,SQLite 和 UI reducer 仅构建可丢弃读模型。

Directory Layout

  • packages/cli/src/context/events/:单写者事件日志、delta 与 turn 生命周期 reducer
  • packages/cli/src/context/storage/JSONLStore.ts:crash-safe 逐行存储、seq 分配和 validated 操作
  • packages/cli/src/context/storage/PersistentStore.ts:领域事件构造与恢复事务
  • packages/cli/src/context/storage/sqlite/:Bun/Node 双运行时读侧索引及 FTS
  • packages/cli/src/context/types.ts:committed SessionEvent 联合类型
  • packages/cli/src/server/bus.ts:committed 与 ephemeral 的进程内扇出通道
  • packages/cli/src/store/slices/sessionSlice.ts:TUI conversation read model
  • packages/cli/web/src/store/session/handlers/eventHandlers.ts:Web SSE 事件折叠与 delta 缓冲

Key Entry Points

  • SessionEventLog.for() in packages/cli/src/context/events/SessionEventLog.ts:获取项目路径与 Session 复合键对应的写入/扇出实例
  • JSONLStore.appendValidatedBatch() in packages/cli/src/context/storage/JSONLStore.ts:在同一文件队列内校验最新状态并提交有序批次
  • projectConversation() in packages/cli/src/context/events/reducers/conversationReducer.ts:从 committed history 构建 UI 消息
  • syncAll() in packages/cli/src/context/storage/sqlite/projection.ts:拉取 JSONL 并同步可重建索引

API Surface

SessionEventLog

  • for(sessionId, projectPath):返回进程内共享的复合身份日志实例
  • commit(event) / commitBatch(events):先持久化和分配 seq,再按提交顺序扇出
  • commitValidated(builder) / commitValidatedBatch(builder):在最新 transcript 的同一文件临界区执行单胜者状态转换
  • emitDelta(delta):只向订阅者与 Bus 发布无 seq 的流式增量
  • replay(subscriber, fromSeq):从 JSONL 重放 seq >= fromSeq 的客户端可见 committed event
  • subscribe(subscriber, options) / release():管理实时订阅与有界实例缓存

JSONLStore

  • append() / appendBatch():修复 crash tail 后,以文件尾 seq 为基准追加并 fsync
  • appendValidated*():读取、校验和追加共享同一个 per-file 进程内队列
  • createExclusive():以 wx 创建完整 transcript,供新会话与 fork 防碰撞
  • readAll() / readFromSeq():使用统一解析器读取完整历史或断点区间
  • deleteValidated():在删除前对最新 committed 状态执行谓词

Read Models

  • applyCommittedEvent() / applyDelta():将 durable truth 与临时 overlay 折叠为 TUI 消息
  • materializeSessionEvents():在所有读取投影前应用 append-only rewind marker
  • syncSession() / syncAll():以 mtime/size 门控重物化 SQLite session、part 和 FTS 行
  • searchProjectionText():仅产生 FTS 候选,最终 substring 语义由搜索服务裁决

Read the full file on GitHub · 121 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 · 121 lines · 159 tokens per session scan A 76e48f53feab

Subscribe to this mod's changes

knowledge-session-state-and-context-durable-transcript-and-event-projection is a skill published in the GitHub repository echoVic/blade-code (178 stars, last pushed yesterday), licensed MIT. It adds 159 tokens to every session and 2,810 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. It is 84% identical to knowledge-session-state-and-context, differing in 138 lines, and is treated as a copy.

Related

Other skills, from other repositories

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright…

alleneee/skill-agent · 62 tokens

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external agents through well-designed tools. Use when building MCP servers to integrate external APIs or agents, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

alleneee/skill-agent · 61 tokens

slack-gif-creator

Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".

alleneee/skill-agent · 57 tokens

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

alleneee/skill-agent · 59 tokens

self-improvement

A process for recording useful lessons from unexpected failures, user corrections, missing abilities, and reusable project patterns.

alleneee/skill-agent · 60 tokens

travel-planner

Creates comprehensive travel itineraries with destination analysis, budget planning, transportation, accommodation, and local insights. Use when planning trips, organizing travel schedules, or seeking destination recommendations.

alleneee/skill-agent · 38 tokens