Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add MattHuanglol/openclaw_skill --skill "claude-code"
Install specific skill from multi-skill repository
# Description
Run Anthropic's `claude` CLI for agentic coding. Supports single-shot commands (-p) and interactive sessions. Use this for complex refactoring, bug fixing, or when you need Claude 3.7 Sonnet's specialized coding agent capabilities.
# SKILL.md
name: claude-code
description: Run Anthropic's claude CLI for agentic coding. Supports single-shot commands (-p) and interactive sessions. Use this for complex refactoring, bug fixing, or when you need Claude 3.7 Sonnet's specialized coding agent capabilities.
Claude Code Skill 🤖
This skill integrates the official claude CLI tool into OpenClaw, allowing you to leverage Anthropic's specialized coding agent.
🛠 Prerequisites
- Install:
npm install -g @anthropic-ai/claude-code - Auth: Run
claude auth loginonce (interactive) or ensureANTHROPIC_API_KEYis set.
🚀 Usage Patterns
1. Single-Shot Task (Best for Agents)
Use the -p (prompt) flag to execute a task and exit. This is the preferred method for OpenClaw automation.
# Basic usage
claude -p "Refactor src/utils.js to use arrow functions"
# Auto-approve (YOLO mode) - WARNING: Risks applying changes without review
claude -p "Fix the lint errors in app.tsx" --dangerously-skip-permissions
Tips:
- Always be specific about file paths.
- Combine with --dangerously-skip-permissions if you want the agent to edit files without asking (use with caution).
2. Interactive Session
Start a persistent session to discuss code or run multiple steps.
// Start the session (must use pty=true)
exec({ command: "claude", pty: true });
// Send commands
process({ action: "write", data: "/bug Fix the crash in main.rs\n" });
⚙️ Configuration
- Compact Mode: Use
--compactto reduce output noise. - Verbose: Use
--verbosefor debugging.
📋 Example Workflow
- Read Context: The agent reads files.
- Delegate: Agent calls
claude -p "Analyze these files and fix X". - Review: Agent checks the changes made by Claude Code.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.