Openclaw Session Manager
OpenClaw skill from BrantonLiu
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
OpenClaw Session Manager Skill
A Claude Code skill for managing OpenClaw AI agent sessions - list, find, and compact sessions to reduce token usage.
Features
- List all active OpenClaw sessions
- Find specific sessions by channel ID or name
- Compact sessions to reduce token usage
- Support for Discord, Telegram, and other channel types
- Gateway RPC interface management
Installation
For Claude Code
Copy the skill to your Claude skills directory:
# Download the skill
git clone https://github.com/litangjuan/openclaw-session-manager.git
# Copy to Claude skills directory
cp -r openclaw-session-manager ~/.claude/skills/
Or install from the packaged .skill file:
# Download the .skill file and extract
unzip openclaw-session-manager.skill -d ~/.claude/skills/openclaw-session-manager
For ClawHub
This skill is compatible with ClawHub (OpenClaw's skill marketplace). The metadata in SKILL.md follows the ClawHub skill format specification.
Usage
Once installed, the skill automatically triggers when you ask Claude to:
- Compact or compress a session
- List or find sessions
- Check session token usage
- Manage Discord/Telegram channel sessions
- Work with openclaw gateway commands
Example Prompts
- "Compact the Discord session for the iran channel"
- "List all OpenClaw sessions"
- "Find the session for Telegram user 123456789"
- "清理上下文" (Chinese: clean up context)
Session Key Format
OpenClaw session keys follow this pattern:
agent:<agent-id>:<channel-type>:<channel-subtype>:<channel-id>
Common examples:
- Discord channel:
agent:main:discord:channel:1480369833789882398 - Discord DM:
agent:main:discord:user:123456789012345678 - Telegram user:
agent:main:telegram:user:123456789 - Telegram group:
agent:main:telegram:group:123456789 - Cron job:
agent:main:cron:766877d4-d234-4e60-8ff6-431c8368dd11
Prerequisites
- OpenClaw CLI installed
- Gateway service running (
openclaw gateway start)
Core Commands
# List all sessions
openclaw sessions --json
# Find specific session
openclaw sessions --json | grep -i "<channel-id>"
# Compact a session
openclaw gateway call sessions.compact --params '{"key": "<session-key>"}'
# Check gateway status
openclaw gateway status
License
MIT-0
Links
// HOW IT'S BUILT
KEY FILES