ClawdScan for Openclaw

ClawdScan is a diagnostic utility designed to maintain the health of AI agent environments by identifying session bloat and reclaiming storage.

cheenu1092-oss
v0.3.0
Feb 12, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install clawdscan

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install clawdscan using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ClawdScan?

ClawdScan serves as a vital maintenance utility for developers working with Openclaw Skills. It acts as a zero-dependency Python CLI that deep-scans session JSONL files to pinpoint performance bottlenecks, such as zombie sessions that were never utilized or stale files consuming unnecessary disk space.

By providing granular visibility into how AI models and tools are used, it ensures that your agentic workflows remain lean and efficient. This skill is essential for anyone running long-term AI deployments where session data can quickly accumulate and impact system performance. It offers a suite of commands to inspect individual sessions, track historical trends, and automate the cleanup of problematic data points within the Openclaw Skills ecosystem.

ClawdScan Use Cases

  • Identifying and archiving zombie sessions that were created but never used to save space.
  • Analyzing tool usage patterns to see which Openclaw Skills are most frequently invoked by your agents.
  • Monitoring storage growth and session bloat to prevent disk exhaustion in production environments.
  • Deep-diving into specific session metadata to debug model switching behavior or message count issues.

How ClawdScan Works

  1. The user triggers a scan via the CLI or an automated heartbeat configuration within the Openclaw Skills framework.
  2. ClawdScan parses the local session JSONL files located within the agent directories.
  3. The tool calculates metrics for session size, message counts, and inactivity periods based on defined thresholds.
  4. It aggregates data on tool calls and model usage to identify patterns or potential inefficiencies.
  5. A comprehensive health report is generated with actionable cleanup recommendations for the environment.
  6. If requested, the tool executes safe cleanup operations, creating backups before deleting stale or zombie data.

ClawdScan Setup

To install ClawdScan as part of your Openclaw Skills library, use the built-in package manager:

clawdbot skill install clawdscan

Alternatively, you can run it as a standalone Python script:

chmod +x clawdscan.py
./clawdscan.py --help

You may also configure environment variables like CLAWDBOT_DIR to point the scanner to a custom directory.

ClawdScan Data Schema & Taxonomy

ClawdScan analyzes session data and can export reports in JSON format. It organizes data based on the following taxonomy:

Data Type Description Location
Session Logs JSONL files containing message history agents/*/sessions/
Meta Reports Summary of health scans and issues output.json
History Historical trends and growth metrics CLI output/JSON
Metadata Timestamps, tool IDs, and model names Extracted from JSONL

The tool specifically tracks thresholds for bloat (sessions over 1MB or 300 messages), zombies (created but unused for 48 hours), and staleness (inactive for 7+ days).

ClawdScan Advanced Features

  • Automated Heartbeat Integration for scheduled health checks and automated monitoring alerts.
  • Trend Analysis to track session count and storage growth over 7, 30, or 90-day windows.
  • Tool Analytics to find which Openclaw Skills are causing the most significant session bloat.
  • Safe Cleanup mode with mandatory previews and backup creation before any destructive action.
  • JSON Export capabilities for integration into external monitoring dashboards or custom Python scripts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*