claw-shell for Openclaw

A terminal execution skill that allows AI agents to run shell commands within a dedicated, persistent tmux session.

zlshiny
v1.0.0
Mar 4, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install claw-shell-1-0-0

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-1-0-0 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 robust utility designed to provide AI agents with a stable and persistent terminal interface. By restricting all operations to a dedicated tmux session named claw, this skill ensures that shell executions are organized and do not interfere with other system processes. It bridges the gap between high-level agent logic and low-level system commands, making it a cornerstone for developers building complex automation within the Openclaw Skills framework.

This skill is particularly valuable for maintaining state across multiple agent turns. Since tmux keeps the session alive, agents can initiate long-running processes, check their progress later, and read back the captured output without losing context. This persistent environment is essential for sophisticated Openclaw Skills that require continuous terminal interaction.

claw-shell Use Cases

  • Running persistent background processes that need to survive agent session timeouts.
  • Executing routine development tasks such as git status, directory listing, or file movements.
  • Running third-party CLI tools and capturing their output for agent analysis.
  • Maintaining a consistent shell environment for multi-step DevOps workflows.

How claw-shell Works

  1. The AI agent invokes the claw_shell_run tool with the desired command as a string input.
  2. The skill attempts to attach to a tmux session specifically named claw.
  3. If the session does not exist, claw-shell automatically creates it in the background.
  4. The provided command is sent to the active tmux pane followed by a newline character to trigger execution.
  5. The skill captures the most recent text output from the tmux pane and returns it to the agent for processing.

claw-shell Setup

To integrate this skill into your environment, ensure that tmux is installed and accessible in your system path. Openclaw Skills will handle the session management automatically.

# Install tmux if not already present
sudo apt-get update && sudo apt-get install tmux -y

No further configuration is required as the skill defaults to the claw session name for all operations.

claw-shell Data Schema & Taxonomy

Element Type Description
Session ID String Constrained to claw to ensure isolation.
Tool Name Function claw_shell_run
Input Parameter String command: The shell command to execute.
Output Format String Raw terminal output captured from the tmux pane.
Safety Filter Logic Intercepts sudo, rm, and system power commands for user confirmation.

claw-shell Advanced Features

  • Contextual Persistence: Keeps your terminal state alive across different agent interactions.
  • Integrated Safety Guardrails: Automatically detects and pauses execution for high-risk commands like rm -rf or sudo.
  • Automatic Session Recovery: Restarts the dedicated claw session if it is accidentally terminated.
  • Seamless Workflow Integration: Designed to work in tandem with other Openclaw Skills to provide a full-stack automation experience.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*