Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Context Cleaner

v1.0.0

Automatically compress large contexts and clean up expired sessions, sub-agents, and temporary files.

0· 89·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for liujc007/context-cleaner-1.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Context Cleaner" (liujc007/context-cleaner-1) from ClawHub.
Skill page: https://clawhub.ai/liujc007/context-cleaner-1
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install context-cleaner-1

ClawHub CLI

Package manager switcher

npx clawhub@latest install context-cleaner-1
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The skill name and description (compress contexts, clean expired sessions/sub-agents, remove temp files) align with the SKILL.md content. However, the documented actions (listing sessions, terminating sub-agents, moving/deleting sessions on disk) require access to session/sub-agent management APIs and writable workspace storage; the skill metadata declares no required permissions or credentials and states 'no special permissions required', which understates the privileges actually needed.
!
Instruction Scope
The runtime instructions tell an agent to: run automatically during heartbeat checks; call internal tools 'sessions_list' and 'subagents'; terminate idle sub-agents; compress and replace message histories; archive or delete sessions and update metadata; and write to archive/cache/cleanup paths. These are potentially destructive operations touching session state and on-disk archives. While the doc includes safety checks (verify status, offer archive before delete), the instructions are broad and leave significant discretion to the agent (thresholds, what counts as 'pending tasks', when to delete). The skill also instructs scheduling via cron and heartbeat integration, increasing chance of automated deletions without explicit human confirmation.
Install Mechanism
Instruction-only skill with no install spec and no code files — lowest technical install risk (nothing is downloaded or written by the skill itself).
!
Credentials
The skill declares no environment variables or credentials, yet it requires access to internal session listing and sub-agent control tools and to the workspace filesystem (archive, cache, cleanup directories). That mismatch (no declared privileges but actions that require privileged APIs or file write/delete) is disproportionate and should be clarified before use.
Persistence & Privilege
always:false (not force-included) and model invocation not disabled (normal). Autonomous invocation is allowed, so the skill could perform cleanup during agent operation without explicit human prompts. Combined with the scope of destructive operations (terminating sub-agents, deleting sessions), this increases the blast radius; consider limiting autonomous triggers or requiring confirmation/dry-run by default.
What to consider before installing
This skill's behavior (listing sessions, terminating sub-agents, archiving/deleting session data) is coherent with its stated purpose but requires access and authority that the metadata does not declare. Before installing, verify with your platform operator or runtime: (1) exactly which APIs/tools the skill will be allowed to call (sessions_list, subagents, file system write/delete) and whether those calls require elevated privileges; (2) that there is a safe default (dry-run or preview) and explicit user confirmation before any deletion/termination; (3) that audit logs are enabled so you can review actions taken; and (4) that backups or archives are stored separately so accidental deletions can be recovered. If you cannot confirm those controls, prefer using a manual, user-invoked version or decline installation from this unknown source.

Like a lobster shell, security has layers — review code before you run it.

latestvk975m2zc051tpnzed0qjw6qbpn85132q
89downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

Context Cleaner Skill

Automatically manage session context size by compressing large contexts and cleaning up expired sessions, sub-agents, and temporary files.

Quick Reference

SituationAction
Session exceeds size limitCompress early messages
Sub-agent idle > 30minTerminate automatically
Old sessions (> 7 days)Archive or delete
Large context (> 10K tokens)Summarize and compress

Setup

No special setup required. The skill automatically:

  1. Monitors session sizes - Checks if current session context is growing too large
  2. Terminates idle sub-agents - Stops sub-agents that haven't been used recently
  3. Archives old sessions - Moves completed sessions to archive
  4. Compresses context - Replaces verbose message chains with summaries

Usage

Automatic Operation

The skill runs automatically during heartbeat checks when context size exceeds thresholds.

Manual Trigger

Request cleanup anytime:

"Clean up context now"
"Remove expired sessions"
"Compress my context"

API Call

Use sessions_list and subagents tools internally. The skill orchestrates:

  1. List all sessions
  2. Check sub-agent status
  3. Terminate idle sub-agents
  4. Compress large contexts
  5. Archive old sessions

Operation Logic

Context Compression

When a session's context exceeds thresholds:

  1. Identify compressible regions - Early messages, completed task steps
  2. Generate summaries - Create concise summaries of message chains
  3. Replace verbose content - Keep only essential information
  4. Preserve key context - Maintain user preferences, decisions, ongoing tasks

Session Cleanup

Expired session criteria:

  • Idle time: No activity for 7+ days
  • Completed tasks: Sessions that finished long ago
  • Orphaned sessions: No associated work

Sub-Agent Management

Termination criteria:

  • Idle: No messages sent/received for 30+ minutes
  • Failed tasks: Sub-agents that encountered repeated errors
  • Manual request: User explicitly requests cleanup

Best Practices

  1. Preserve working sessions - Never clean active sessions
  2. Keep recent history - Maintain last 24-48 hours of messages
  3. Archive not delete - Move to archive before deleting
  4. Respect user context - Don't clean sessions with pending tasks
  5. Notify before major cleanup - Warn before deleting important sessions

Integration Points

Heartbeat Integration

Add to HEARTBEAT.md:

## 上下文管理
- [ ] 检查会话大小
- [ ] 清理过期子代理
- [ ] 压缩过大上下文

Cron Integration

Schedule regular cleanup:

# Weekly full cleanup
cron add -name "weekly-context-clean" -schedule "0 3 * * 0" -payload "Compress contexts and clean expired sessions"

Compression Strategies

Message Chaining

Convert:

User: Ask question
Model: Answer with detailed explanation
User: Follow-up
Model: More details

To:

User: Ask question
Model: ✅ Answered with 4-point explanation
User: Follow-up
Model: Continued discussion

Context Summarization

Summarize long conversation threads:

  • Key decisions: User preferences, important conclusions
  • Task progress: Completed items, pending actions
  • Context notes: Relevant background information

Session Archiving

Archive strategy:

  1. Check completion status - Is session finished?
  2. Verify no active work - No pending tasks
  3. Check age - Created more than 7 days ago?
  4. Move to archive - Session archive directory
  5. Update metadata - Record completion details

File Structure

workspace/
├── .archive/          # Archived sessions
│   ├── 2026-04/
│   │   ├── session-uuid-1/
│   │   └── session-uuid-2/
│   └── 2026-05/
├── .cache/            # Temporary compression data
└── .cleanup/          # Cleanup logs and reports
    └── cleanup-report.md

Safety Checks

Before any cleanup operation:

  1. Verify session status - Not actively being used
  2. Check pending tasks - No incomplete operations
  3. User preferences - Respect "keep forever" flags
  4. Recent activity - Last message within threshold
  5. Archive option - Offer archive before delete

Example Outputs

Cleanup Report

## Context Cleanup Report

**Time**: 2026-04-17 10:43
**Operations**:
- ✅ Compressed 3 large contexts (saved 15K tokens)
- ✅ Terminated 2 idle sub-agents
- ✅ Archived 1 old session (30 days)
- ⚠️ Skipped 1 active session (pending task)

**Impact**:
- Context size: Reduced by 25%
- Free tokens: ~50K available
- Active sessions: 5 (unchanged)

Related Skills

  • self-improvement: Log learnings about context management
  • taskflow: Manage multi-step cleanup tasks
  • memory: Keep important context in long-term memory

Note: This skill works alongside existing OpenClaw tools without requiring special permissions.

Comments

Loading comments...