Overview
- Skill Key
- 0range-x/session-rotate-80
- Author
- 0range-x
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/0range-x/session-rotate-80
- Latest Commit SHA
- f6b85ecf644192fc2f5df4e4e850d177f5742b86
Auto-create a new session when OpenClaw context usage reaches 80% without requiring Mem0 or file memory systems. Use when users want default OpenClaw to proactively rotate sessions and avoid context overflow in long chats.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 session-rotate-80 技能。 若已安装,则直接安装 session-rotate-80 技能。
# Session Rotate 80 ## Overview Trigger a standard `[NEW_SESSION]` message when context usage reaches 80%. This skill is memory-system-agnostic and works in plain default OpenClaw setups. ## Workflow 1. Read current context usage from runtime status. 2. Run `scripts/context_guard.py <used_tokens> <max_tokens>`. 3. If threshold reached, output the new-session trigger and handoff hint. 4. Keep old session only for short handoff, then continue in new session. ## Command ```bash python scripts/context_guard.py <used_tokens> <max_tokens> --threshold 0.8 --channel boss ``` Example: ```bash python scripts/context_guard.py 220000 272000 --threshold 0.8 --channel boss ``` ## Expected Output At or above threshold: - `[ROTATE_NEEDED]` - `[NEW_SESSION] 上下文达到80%(used/max),自动切换新会话` - `[HANDOFF_HINT] ...` Below threshold: - `[ROTATE_NOT_NEEDED] ratio=x.xx < 0.800` ## Integration Hint (Heartbeat) In heartbeat flow, after reading context usage: 1. Call `context_guard.py`. 2. If `[ROTATE_NEEDED]`, emit `[NEW_SESSION]...` directly. 3. Stop handling new tasks in old session except handoff confirmation. ## scripts/ - `scripts/context_guard.py`: threshold detector and trigger emitter (no memory dependency).
# Session Rotate 80 不依赖记忆系统的 OpenClaw 会话轮换技能。 当上下文占用率达到 80% 时,自动输出新会话触发指令,避免长对话把上下文顶满。 ## 特性 - ✅ 默认 OpenClaw 可用(无 Mem0、无文件记忆也能工作) - ✅ 上下文占用率阈值触发(默认 80%) - ✅ 标准化新会话触发消息(`[NEW_SESSION] ...`) - ✅ 提供最小交接提示,减少会话切换后的信息断层 ## 适用场景 - 你只想要“到 80% 就切新会话”的硬规则 - 你不准备搭建完整记忆系统 - 你在 Discord 长时间连续对话,想避免上下文溢出降质 ## 快速开始 ### 安装 ```bash clawhub install session-rotate-80 ``` 或手动: ```bash git clone https://github.com/0range-x/session-rotate-80.git ``` ### 运行 ```bash python scripts/context_guard.py <used_tokens> <max_tokens> --threshold 0.8 --channel boss ``` 示例: ```bash python scripts/context_guard.py 220000 272000 --threshold 0.8 --channel boss ``` ## 输出说明 ### 触发时 - `[ROTATE_NEEDED]` - `[NEW_SESSION] 上下文达到80%(used/max),自动切换新会话` - `[HANDOFF_HINT] 在旧会话保留3行交接:当前目标、已完成、下一步` ### 未触发时 - `[ROTATE_NOT_NEEDED] ratio=x.xx < 0.800` ## 接入建议(Heartbeat) 在你的心跳或状态检查流程里: 1. 读取当前上下文占用(used/max) 2. 调用 `context_guard.py` 3. 命中后直接发送 `[NEW_SESSION] ...` 4. 旧会话只做交接,不再承载新任务 ## 与记忆系统关系 - 本技能可以独立工作 - 即使无记忆系统,也能稳定执行“80%自动切换” - 若后续接入记忆系统,可在触发前加“自动交接摘要写入”获得更好连续性 ## 实用指南 推荐搭配规则: 1. 阈值固定 80% 2. 切换后第一条消息粘贴交接三行 3. 单会话尽量只做一个主题 4. 2到3天主动切一次会话,即使没到 80% ## 作者 小橘(vulcanx_14970) Twitter: [@maru_49940](https://x.com/maru_49940) ## 许可证 MIT
heyixuan2
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).
capt-marbles
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.
carlulsoe
Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, or processing voice recordings locally without cloud APIs.
carlzhao007
飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化。 使用场景:飞书自动化工作流、任务进度追踪、批量任务处理、需要实时反馈的场景。
cartoonitunes
BottyFans agent skill for autonomous creator monetization. Lets AI agents register, build a profile, publish posts (public, subscriber-only, or pay-to-unlock), upload media, accept USDC subscriptions and tips on Base, send and receive DMs, track earnings, and appear on the creator leaderboard. Use this skill when an agent needs to monetize content, interact with fans, manage a creator profile, handle payments in USDC, or operate as an autonomous creator on the BottyFans platform.
camopel
Local arXiv paper manager with semantic search. Crawls arXiv categories, downloads PDFs, chunks content, and indexes with FAISS + Ollama embeddings. No cloud API keys required — everything runs locally.