Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

session-context会话上下文

Agent Skill

session-context 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,381

周安装

222

GitHub Stars

公开资料未说明

下载量

1,758
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:session-context(会话上下文)
来源仓库:https://github.com/thomasmarcel/session-context
安装命令:
openclaw skills install session-context
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install session-context

简介

会话上下文用于加载最近对话摘要到新会话中保持连续性。

  • 适合在重置后恢复工作状态,尤其在压缩期间生成 AI 摘要。
  • 可预填充项目背景信息,提升后续任务启动效率。
  • 安装时请确认目标目录可写,避免因权限问题无法写入内存文件。
  • session-context 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
Session Memory & Summarization
slug
session-context
description
Automatically loads recent conversation memory into new sessions and generates AI summaries during compaction to maintain continuity across conversations. Preserves the last 10 raw messages verbatim so the agent can resume exactly mid-conversation without paraphrasing loss.
author
AniBot (Thomas)
version
0.2.0
license
MIT
tags
hooks
repository
https://github.com/animo66/openclaw-skills
homepage
https://clawhub.ai/skills/session-context
minOpenClawVersion
0.29.0

Session Memory & Summarization Skill

Provides automatic conversation continuity across sessions by loading recent memory at session start and generating AI summaries during compaction.

What It Does

  • Memory Loading: Injects the latest AI summary AND the last 10 raw message turns verbatim so you resume exactly where you left off
  • AI Summarization: Generates concise summaries when approaching token limits, written to daily memory files
  • Raw Continuity: Stores the last N exact interactions alongside the summary so nothing is lost in translation
  • Seamless Experience: No manual intervention required — just natural conversation flow

Hooks

session:start

Runs when a new session begins. Loads the most recent daily memory file and injects two context blocks:

  1. AI summary block — distilled summaries from today + yesterday (up to 6000 chars)
  2. Recent messages block — last 10 raw user/assistant turns, verbatim, so the AI can resume mid-conversation with exact phrasing and decisions intact

session:compact:before

Runs before automatic compaction (20+ messages OR 60% of token limit). Does two things:

  1. Generates an AI summary via agent.generateSummary() and prepends it to today's memory file
  2. Captures the last 10 user/assistant turns as a JSON block at the end of the file (under <!-- recent_messages_block -->) — this is what session:start reads back next session

Installation

clawhub install session-context

Or manually:

cd ~/.openclaw/workspace/skills
git clone https://github.com/thomasmarcel/openclaw-skill-session-context.git session-context
openclaw skills enable session-context

Requirements

  • OpenClaw ≥ 0.29.0
  • Workspace with memory/ directory (created automatically)
  • Access to agent's LLM for summarization

Configuration

Customize thresholds in hooks/session/compact:before/handler.js:

return (
  msgCount >= 20 ||           // minimum messages before summarizing
  tokenCount > maxTokens * 0.6 // trigger at 60% of token limit
);

Adjust how many raw messages to preserve:

// In both handler files:
const MAX_RECENT_MESSAGES = 10;  // last N user/assistant turns to preserve verbatim

Adjust summary context size:

// In hooks/session/start/handler.js:
const MAX_SUMMARY_CHARS = 6000;  // cap on AI summary injected at session start

Memory Structure

memory/
  2026-04-03.md  # daily files — summaries at top, recent_messages block at bottom
  2026-04-04.md

Each file has this structure:

## HH:MM:SS
<AI summary of the session>

---

## Earlier timestamp
<earlier summary>

<!-- recent_messages_block -->
[{"role":"user","content":"..."},
 {"role":"assistant","content":"..."},
 ...]

The <!-- recent_messages_block --> section is always at the end and replaced each compaction with the latest N turns.

How It Works

  1. During a conversation: As token usage grows, OpenClaw monitors session size.
  2. Before compaction: The session:compact:before hook checks thresholds. If met:

- Generates an AI summary and prepends it to memory/YYYY-MM-DD.md - Captures the last 10 raw message turns as a JSON block at the end of the file

  1. Compaction proceeds: Older messages are pruned.
  2. Next session: The session:start hook loads the file and injects both:

- The AI summary (for high-level context) - The raw recent messages (to resume exactly where you left off)

License

MIT

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

89.06%
按下载量换算1,566

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills