Prompt Slimmer for Openclaw

A specialized utility to audit and optimize OpenClaw workspace files, reducing system prompt token overhead and API costs.

xiaoyaner0201
v1.1.0
Mar 12, 2026
0
982
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install prompt-slimmer

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 prompt-slimmer 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 Prompt Slimmer?

Prompt Slimmer is a performance optimization tool designed to solve the problem of workspace bloat. In many AI agent environments, every Markdown file in the root directory is injected into the system prompt on every API call. As a workspace grows, this overhead can lead to massive token usage and context window exhaustion. This skill provides a systematic approach to slimming down files like SOUL.md, MEMORY.md, and HEARTBEAT.md through frequency-based layering and intelligent archiving. By using this tool, developers can maintain a lean and responsive agent while significantly lowering operational expenses. It is a critical component for anyone managing a sophisticated library of Openclaw Skills.

Prompt Slimmer Use Cases

  • High API token costs caused by large system prompts.
  • AI context window filling up too quickly during long sessions.
  • Redundancy and conflicting information across multiple workspace files.
  • Identifying ghost files that are being unintentionally injected into the system prompt.
  • Archiving completed projects while maintaining their accessibility via memory search.

How Prompt Slimmer Works

  1. Perform a Ghost File Scan to identify non-standard Markdown files in the workspace root that contribute to token bloat.
  2. Measure character and line counts for standard files including SOUL.md, IDENTITY.md, and MEMORY.md.
  3. Analyze individual sections of each file based on usage frequency and critical necessity.
  4. Detect cross-file duplication where identical rules or information exist in multiple locations.
  5. Generate an actionable slim-down plan with predicted before and after token metrics.
  6. Execute the plan by moving archival content to the memory/archive/ directory and replacing it with concise pointers.

Prompt Slimmer Setup

To initiate the optimization process, you can trigger the skill using phrases like slim prompt or reduce tokens. Use the following command to manually inspect your current workspace overhead:

# List all Markdown files in the workspace root and their sizes
for f in *.md; do [ -f "$f" ] && echo "$f: $(wc -c < "$f") chars"; done

Prompt Slimmer Data Schema & Taxonomy

The skill organizes content into three distinct layers to ensure optimal performance across your Openclaw Skills:

Layer Target Location Data Type
Layer 1: Always-On Workspace Root (.md) Core identity, active relationships, and safety constraints.
Layer 2: Searchable memory/archive/ Historical records, technical specs, and completed tasks.
Layer 3: Skill-Embedded SKILL.md files Task-specific workflows and code templates loaded on-demand.

Prompt Slimmer Advanced Features

  • Ghost File Detection: Automatically finds and flags old reports or temporary notes that are bloating the system prompt.
  • Frequency-Based Layering: Intelligently categorizes information by how often it is needed in active sessions.
  • Cross-File Deduplication: Specifically targets overlaps between identity, soul, and memory files to ensure information lives in the most specific location.
  • Integrity Verification: Includes a post-slimming checklist to ensure safety constraints and core personality traits remain intact.
  • Token Savings Estimator: Provides a clear table of cost impacts based on current model pricing like Claude 3.5 Opus.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*