Claude Code CLI for OpenClaw
Install, authenticate, and use Claude Code CLI as a native coding tool for any OpenClaw agent system.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/asif2bd/claude-code-cli-openclawWhat This Skill Does
The Claude Code CLI for OpenClaw skill integrates Anthropic’s official Claude Code CLI into your OpenClaw agent workflow. Unlike standard API-based agents that dump massive file contents into the context window, this skill utilizes Claude Code’s native file exploration and tool-calling capabilities. By acting as a specialized developer tool, it reduces token usage by 80-90%, improves edit precision, and allows your agent to work directly with your project codebase using a persistent, authenticated Claude Max session. It bridges the gap between raw terminal access and intelligent coding assistance.
Installation
- Ensure Node.js and npm are installed on your environment.
- Install the package globally via your terminal:
npm install -g @anthropic-ai/claude-code. - Run the installation script provided in the skill directory to configure paths:
bash /root/.openclaw/workspace/skills/claude-code/scripts/install.sh. - Initialize authentication using
claude setup-token. Follow the browser-based OAuth flow to generate a long-livedsk-ant-oat01-token. Note that standard API keys are not compatible; a valid Claude Max subscription is required.
Use Cases
- Refactoring: Efficiently apply structural changes across multiple files without exceeding context limits.
- Complex Bug Fixes: Allow the agent to explore the directory, read logs, and trace code execution flow natively.
- Project Onboarding: Use the CLAUDE.md file to help the agent understand architecture, style guides, and project-specific constraints automatically.
- Automated Scaffolding: Generate boilerplate code, unit tests, and documentation files with high fidelity.
Example Prompts
- "Claude Code, scan the
src/directory and propose a refactor for the authentication module to improve error handling." - "Use Claude Code to fix the integration bug in
database.jsafter reading the project documentation inREADME.md." - "Run a code review on the latest commit and generate a summary of technical debt in the
components/folder."
Tips & Limitations
- TTY Requirement: This skill requires a PTY-enabled terminal for the OAuth setup process.
- Token Efficiency: Always prefer this tool for large-scale edits to keep costs flat under your Claude Max subscription.
- Limitations: It is strictly for coding tasks; do not use it as a general-purpose chat interface. Ensure your Git repo is clean before running autonomous edits to allow for easy reverts.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-asif2bd-claude-code-cli-openclaw": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: file-write, file-read, external-api, code-execution
Related Skills
nmap
Nmap reference tool. Use when working with nmap in devtools contexts.
Thesaurus
Look up synonyms, antonyms, and related words with history and export. Use when finding alternatives, checking usage, running drills, analyzing frequency.
move
Move reference tool. Use when working with move in blockchain contexts.
slashing
Analyze slashing operations. Use when you need to understand slashing mechanisms, evaluate protocol security, or reference on-chain concepts.
meta-business
Skill for the Meta Business CLI. Complete WhatsApp, Instagram, Facebook Pages, and Messenger automation via the Graph API. Supports messaging, media, templates, analytics, webhooks, and systemd service management.