Exec Inspector for Openclaw

A comprehensive command-line utility for tracking, auditing, and analyzing the execution history of OpenClaw Agent tool calls.

zhengzk-bj
v1.0.0
Feb 10, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install exec-inspector

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 exec-inspector 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 Exec Inspector?

Exec Inspector is a specialized observability tool designed for the OpenClaw ecosystem. It provides developers and power users with the ability to inspect the execution history of the exec tool, which is used by agents to run shell commands. By parsing session logs, the tool offers a transparent view of every command an agent has triggered, including timestamps, model metadata, and token usage.

As a core component for those using Openclaw Skills, it bridges the gap between agent autonomy and developer oversight. It allows for the auditing of automated tasks, debugging of command failures, and the generation of usage reports to optimize agent performance and security. Whether you are running a single session or managing complex multi-agent workflows, this skill ensures you never lose track of what your AI is doing in your terminal.

Exec Inspector Use Cases

  • Auditing an agent's recent terminal activity to ensure security compliance.
  • Generating statistical reports on the most frequently used CLI tools by an agent.
  • Debugging session failures by searching for specific command patterns in historical logs.
  • Real-time monitoring of agent actions during long-running autonomous tasks.
  • Exporting command history to JSON for external data analysis or reporting.

How Exec Inspector Works

  1. The OpenClaw agent executes shell commands using the exec tool, which records the activity in JSONL session files.
  2. Exec Inspector scripts access these logs located in the session directory to extract structured data.
  3. The tool utilizes jq to filter and format the raw JSON data into human-readable lists or statistical summaries.
  4. Users can invoke the utility through shell commands or directly via AI prompts to see history, stats, or specific searches.
  5. For live updates, a background daemon monitors the session files and streams new command detections to a dedicated monitor terminal.

Exec Inspector Setup

To get started with this component of Openclaw Skills, follow these steps:

  1. Ensure you have jq installed for JSON processing:
sudo apt install jq # On Ubuntu/Debian
  1. Create the execution history script at ~/.openclaw/scripts/exec-history.sh using the provided template in the repository.

  2. Set the appropriate permissions for the scripts:

chmod +x ~/.openclaw/scripts/exec-history.sh
chmod +x ~/.openclaw/scripts/exec-monitor-daemon.sh
  1. (Optional) Add aliases to your ~/.zshrc or ~/.bashrc for quick access:
alias exec-list='~/.openclaw/scripts/exec-history.sh list'
alias exec-monitor='~/.openclaw/scripts/exec-monitor-daemon.sh start'

Exec Inspector Data Schema & Taxonomy

The skill organizes data by parsing the standard OpenClaw session format. Data is stored in ~/.openclaw/agents/main/sessions/*.jsonl. The key fields analyzed include:

Field Description
timestamp ISO 8601 formatted time of execution
message.content[0].arguments.command The specific shell command executed by the agent
message.model The specific LLM (e.g., GPT-4) that generated the command
message.usage Token metrics including input, output, and total tokens

Exec Inspector Advanced Features

  • Background Daemon Support: Run a persistent monitor that tails logs and alerts you to every new command in real-time.
  • Interactive AI Prompts: The skill is configured so that the AI agent can autonomously run history checks and provide insights when asked.
  • Deep Search Filtering: Search command history using keywords or specific time ranges using built-in grep and jq integrations.
  • Session-Specific Auditing: Isolate command logs for a single unique session ID to track specific task progressions.
  • Tool Usage Analytics: Aggregate data across all tools to see a breakdown of agent capabilities used over time.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*