Claude Code CLI for Openclaw

A powerful integration that delegates complex coding, refactoring, and codebase exploration tasks to the Claude Code CLI.

atelypham
v0.2.0
Feb 28, 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 claude-code-cli

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 claude-code-cli 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 Claude Code CLI?

The Claude Code CLI skill enables your AI agent to leverage Anthropic's official terminal-based coding tool for deep repository interactions. By integrating with Openclaw Skills, developers can background long-running tasks like feature implementation or PR reviews while maintaining full control via PTY (pseudo-terminal) or headless modes. It bridges the gap between high-level agent instructions and low-level file manipulations, providing a robust environment for iterative development.

This skill is designed for technical workflows that require more than simple one-liner edits. It excels at tasks involving multiple files, complex logic changes, and environment-aware coding. Whether you are running it in an interactive mode to handle manual permissions or using headless pipe mode for CI/CD-like automation, it provides the flexibility needed for modern Openclaw Skills implementations.

Claude Code CLI Use Cases

  • Building new features through iterative coding and comprehensive file exploration.
  • Performing deep codebase refactors across multiple modules and directories.
  • Reviewing Pull Requests in isolated environments to identify bugs, security flaws, or performance bottlenecks.
  • Handling parallel issue fixes by spawning multiple background sessions using Git worktrees.
  • Automating code analysis and data extraction with structured JSON output in headless mode.

How Claude Code CLI Works

  1. The agent initiates a coding task by specifying the target command and choosing between interactive PTY mode or headless pipe mode.
  2. For interactive tasks, the skill allocates a pseudo-terminal to ensure Claude Code can handle permission prompts and user confirmations without hanging.
  3. The execution environment is set to a specific working directory, ensuring the agent remains focused on the relevant project context.
  4. Long-running tasks are managed as background processes, providing a unique sessionId that allows for real-time monitoring of logs and process status.
  5. Upon completion or if input is required, the agent can interact with the session via write, submit, or signal commands, ensuring a continuous development lifecycle.

Claude Code CLI Setup

To use this skill within your Openclaw Skills environment, you must first install the Claude Code CLI package globally using npm:

npm install -g @anthropic-ai/claude-code

Ensure that the claude binary is accessible in your system's PATH. No additional configuration is required within the skill itself, though you should ensure your terminal environment supports PTY allocation for interactive features.

Claude Code CLI Data Schema & Taxonomy

Element Type Description
sessionId String A unique identifier used to track, monitor, and resume background coding tasks.
permission-mode String Defines the safety guardrails, such as acceptEdits for automation or plan for read-only reviews.
output-format String Determines the response structure, supporting text, json, or stream-json.
max-budget-usd Number A safety cap that limits the API spend for a specific automated session.

Claude Code CLI Advanced Features

  • Session continuity allows you to resume, continue, or fork previous coding conversations using unique session IDs.
  • Inline dynamic subagents can be defined with custom system prompts and granular tool restrictions (e.g., restricting Bash to specific git commands).
  • Support for Git worktrees enables the agent to work on multiple features or bug fixes simultaneously in isolated directories.
  • Headless automation mode includes JSON schema validation to ensure structured outputs meet specific technical requirements.
  • Integrated completion triggers allow the background agent to send system events to Openclaw Skills immediately upon finishing a task.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins claude
Github Stars: 0
forks: 0

Featured*