← Back to Skills Marketplace
zzqsama066

session-compress

by ZZQSAMA066 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
103
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install session-compress
Description
Compress OpenClaw session .jsonl files by trimming old messages while preserving system messages, recent turns, and task-relevant context.
Usage Guidance
This skill is instruction-only and does not include the PowerShell script it tells you to run. Before using it: 1) Verify that scripts/compress.ps1 actually exists on your system and inspect its contents line-by-line to ensure it only touches the intended session files and does not exfiltrate data or run network calls. 2) Back up any .jsonl files or use -OutputPath / DryRun as recommended. 3) Confirm <OPENCLAW_DIR> location and platform (instructions use PowerShell; they assume a Windows/PowerShell environment). 4) Be cautious about letting an agent execute these commands autonomously — prefer manual invocation until you’ve reviewed the script. If the skill came with the compress.ps1 content or a trusted install source (and you’ve audited the script), the incoherence is resolved and the risk drops.
Capability Analysis
Type: OpenClaw Skill Name: session-compress Version: 1.0.1 The skill bundle describes a utility for compressing OpenClaw session files but relies on an external PowerShell script (scripts/compress.ps1) that is not included in the provided file set, preventing a full security audit of the actual execution logic. While the instructions in SKILL.md outline a logical workflow for trimming logs, the use of PowerShell to perform destructive file operations (overwriting .jsonl session history) on sensitive data constitutes a high-risk capability that cannot be verified as benign without the script's source code.
Capability Assessment
Purpose & Capability
The skill's stated purpose (compress .jsonl session files) matches the instructions' goal, but it presumes the presence of a local PowerShell script (scripts/compress.ps1) and an <OPENCLAW_DIR> path. Because the skill includes no code or install spec, it cannot itself perform compression; it only documents how to run an external script that is not provided. That mismatch is an incoherence a user should confirm.
Instruction Scope
Instructions tell the operator/agent to list and modify files under <OPENCLAW_DIR>\agents\main\sessions\*.jsonl and to run powershell -File scripts/compress.ps1. These are narrowly scoped to main agent sessions (appropriate), but they instruct execution of an external PowerShell script whose content is unknown. The SKILL.md does not include the script contents, nor does it define how <OPENCLAW_DIR> is resolved — both gaps increase risk and ambiguity.
Install Mechanism
No install spec and no bundled code means nothing will be written to disk by installing the skill itself, which lowers risk. However, the runtime instructions rely on an external script rather than installing it.
Credentials
The skill does not request environment variables, credentials, or config paths. The only filesystem access referenced is the agent's session directory, which is proportional to the stated purpose.
Persistence & Privilege
The skill does not request persistent/always-on presence (always:false) and is user-invocable. It does allow the agent to invoke the instructions autonomously by default (disable-model-invocation:false), which is platform normal; combined with other issues this is worth noting but not flagged by itself.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install session-compress
  3. After installation, invoke the skill by name or use /session-compress
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Documentation updated to use <OPENCLAW_DIR> as a placeholder for the directory path, replacing the previous user-specific example. - Task relevance keywords in the compression logic now use English terms instead of Chinese. - Minor improvements to clarity and instructions in the workflow and important notes. - Removed references to a fixed session path; now specifies applicability to main agent session files in general.
v1.0.0
- Initial release of the session-compress skill for OpenClaw. - Compresses session .jsonl files by trimming old messages, preserving active tasks and plans. - Always keeps system messages and the most recent 30 turns (configurable). - Task-relevant context is preserved using keyword matching. - Non-essential message history is summarized to a single placeholder. - Supports in-place compression or saving to a new file. - Includes a safe dry run mode for previewing changes.
Metadata
Slug session-compress
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is session-compress?

Compress OpenClaw session .jsonl files by trimming old messages while preserving system messages, recent turns, and task-relevant context. It is an AI Agent Skill for Claude Code / OpenClaw, with 103 downloads so far.

How do I install session-compress?

Run "/install session-compress" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is session-compress free?

Yes, session-compress is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does session-compress support?

session-compress is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created session-compress?

It is built and maintained by ZZQSAMA066 (@zzqsama066); the current version is v1.0.1.

💬 Comments