claw-shell for Openclaw

A terminal-focused skill that enables AI agents to run shell commands within a dedicated, persistent tmux session named claw.

imaginelogo
v1.0.0
Feb 1, 2026
8
14.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install claw-shell

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 claw-shell 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 claw-shell?

claw-shell is a specialized tool designed to provide AI agents with a stable and isolated environment for command-line interactions. By forcing all executions into a specific tmux session, it prevents the agent from interfering with other active terminal sessions or the user's manual workspace. This skill is a core component of the Openclaw Skills library, allowing for complex multi-step terminal workflows that maintain state across different interactions.

The primary value of this skill lies in its ability to not only send commands but to read the resulting output back to the agent in real-time. This creates a feedback loop where the agent can verify the success of a command or debug errors immediately, making it ideal for development, system administration, and automation tasks within a controlled shell environment.

claw-shell Use Cases

  • Running background processes or development servers that need to stay alive between agent turns.
  • Automating Git operations such as status checks, commits, and pushes within a specific directory.
  • Performing system inspections using tools like ls, cat, or top without losing context.
  • Integrating with CLI-based research tools and scripts that require a persistent terminal buffer.

How claw-shell Works

  1. The agent identifies a shell command that needs to be executed and calls the claw_shell_run tool.
  2. The skill attempts to attach to a tmux session specifically named claw; if the session does not exist, it creates it in the background.
  3. The provided command is sent directly to the tmux session followed by a newline character to initiate execution.
  4. The skill captures the current content of the latest tmux pane buffer.
  5. The captured output is returned to the agent as a string, allowing the agent to parse the results and determine the next action.

claw-shell Setup

To use this skill, ensure that tmux is installed on your host system. Openclaw Skills will manage the session lifecycle automatically once the tool is invoked.

# Install tmux on Ubuntu/Debian
sudo apt-get install tmux

# Install tmux on macOS
brew install tmux

No manual session creation is required, as the skill will execute tmux new -s claw -d if the session is missing.

claw-shell Data Schema & Taxonomy

Element Type Description
Session Name String Restricted to claw to ensure isolation.
Input Command String The raw shell string to be executed in the terminal.
Output Buffer String The text output scraped from the active tmux pane.
Safety Level String Categorized as SAFE or DANGEROUS based on command keywords.

claw-shell Advanced Features

  • Intelligent Session Persistence: Maintains the terminal state even if the agent disconnects or the primary process restarts.
  • Built-in Safety Filters: Automatically detects destructive commands like rm -rf or sudo and triggers a mandatory user confirmation prompt.
  • Output Synchronization: Ensures the agent receives the most recent terminal output, facilitating reactive scripting and debugging.
  • Multi-tool Compatibility: Designed to work alongside other Openclaw Skills by providing a reliable CLI execution backend.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*