Token导航 LogoToken导航

Agent Skill · 效率

claude-code-cli-openclaw(Claude 代码 CLI OpenClaw)

claude-code-cli-openclaw 用于辅助安全审计、权限检查和凭据风险排查,适合在 OpenClaw 中需要复核安全边界、认证流程或敏感配置时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

claude-code-cli-openclaw 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 3,917。

总安装 15,030周安装 608GitHub Stars 公开资料未说明下载 4,718核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.2

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claude-code-cli-openclaw(Claude 代码 CLI OpenClaw)
来源仓库:https://github.com/asif2bd/claude-code-cli-openclaw
安装命令:
openclaw skills install claude-code-cli-openclaw
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install claude-code-cli-openclaw

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

安装、验证并使用 Claude Code CLI 作为任何 OpenClaw 代理系统的本机编码工具。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install claude-code-cli-openclaw;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

claude-code-cli-openclaw 怎么安装?

在终端执行 openclaw skills install claude-code-cli-openclaw。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

claude-code-cli-openclaw 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

claude-code-cli-openclaw 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

claude-code-cli-openclaw 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

claude-code-cli-openclaw 用的人多吗?

公开数据是累计安装 15,030 次,近一周安装 608 次,下载 4,718 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

claude-code-cli-openclaw 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
claude-code-cli-openclaw

Claude 代码 CLI OpenClaw · 本页

15,030—接触敏感数据MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
Claude Code CLI for OpenClaw
version
1.0.2
author
Matrix Zion (ProSkillsMD)
description
Install, authenticate, and use Claude Code CLI as a native coding tool for any OpenClaw agent system.
homepage
https://missiondeck.ai
tags
[claude-code, coding, cli, anthropic, agent-tools]
openclaw
>=2026.2
metadata

Skill: Claude Code CLI for OpenClaw

Description

This skill teaches OpenClaw agents how to install, authenticate, configure, and use Claude Code CLI as a coding tool. Claude Code is an official Anthropic CLI that provides file-based context efficiency, reducing token usage by 80-90% compared to raw API calls for coding tasks.

Key Benefits:

  • Token Efficiency: ~500 tokens per task vs 10k-50k with raw API (Claude Code reads files via tools instead of dumping full content into context)
  • Flat-Rate Billing: Uses Claude Max subscription (OAuth), not per-token API billing
  • Better Code Quality: Native file exploration, codebase understanding, and precise edits
  • Project Context: CLAUDE.md file provides persistent project brain across sessions

Use Cases:

  • Code implementation and refactoring
  • Bug fixes with file exploration
  • Multi-file code changes
  • Project scaffolding
  • Code reviews and analysis

🎯 Setup Modes

ModeDescription
🤖 OpenClaw BackendUse as claude-cli model in any agent (claude-cli/sonnet-4.6, claude-cli/opus-4.6)
🖥️ Direct CLIRun claude --print from any project directory — no agent config needed
☁️ With MissionDeckTrack Claude Code sessions live in your MissionDeck.ai dashboard via JARVIS integration

Prerequisites

  • Claude Max Subscription: Required for OAuth authentication (cannot use raw API keys)
  • Node.js/npm: For installing the CLI globally
  • TTY Terminal: Required for OAuth setup flow (use pty: true with exec tool)
  • Git: Recommended for managing code changes in branches
  • OpenClaw Gateway: Must be running to apply config patches

Installation

Step 1: Install Claude Code CLI

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

Step 2: Verify Installation

which claude && claude --version

Expected output:

/usr/bin/claude
2.1.75

Quick Install

Use the provided installation script:

cd /root/.openclaw/workspace/skills/claude-code
bash scripts/install.sh

The script handles:

  • NPM package installation
  • Version verification
  • Environment setup preparation

Authentication

Claude Code requires browser-based OAuth authentication using a Claude Max subscription. Raw API keys (sk-ant-api03-*) will NOT work.

Interactive Setup (One-Time)

Run this in a PTY terminal (requires TTY):

claude setup-token

Flow:

  1. CLI shows spinner + authorization URL:
   https://claude.ai/oauth/authorize?code=true&client_id=...&code_challenge=...
  1. Copy URL and open in browser
  2. Authorize the application with your Claude Max account
  3. Browser shows authorization code
  4. Paste code back into terminal at prompt: Paste code here if prompted >
  5. Success: ✓ Long-lived authentication token created successfully!
  6. Token format: sk-ant-oat01-xxxxx (valid for 1 year)

Storing the Token

The token must be available as the CLAUDE_CODE_OAUTH_TOKEN environment variable.

Option 1: Shell RC Files (Recommended)

echo "export CLAUDE_CODE_OAUTH_TOKEN=YOUR_OAUTH_TOKEN_HERE" >> /root/.bashrc
echo "export CLAUDE_CODE_OAUTH_TOKEN=YOUR_OAUTH_TOKEN_HERE" >> /root/.profile
source /root/.bashrc

Option 2: System-Wide

echo "CLAUDE_CODE_OAUTH_TOKEN=YOUR_OAUTH_TOKEN_HERE" >> /etc/environment

Option 3: OpenClaw Config Only

Add to your openclaw.json config patch (see next section) — the token will be available during OpenClaw backend calls but not direct CLI usage.

🔒 Security Warning

CRITICAL: Never commit your CLAUDE_CODE_OAUTH_TOKEN to version control.

  • ✅ Store in environment variables or secrets manager
  • ✅ Add .env* files to .gitignore
  • ✅ Use OpenClaw config.patch (not committed to git)
  • ❌ Never hardcode tokens in scripts
  • ❌ Never share tokens publicly or in screenshots
  • ❌ Never commit tokens to GitHub/GitLab

Add to your .gitignore:

.env
.env.local
.env.*.local
openclaw.json
config.patch

Verification

echo $CLAUDE_CODE_OAUTH_TOKEN
# Should output: sk-ant-oat01-xxxxx

OpenClaw Configuration

Integrate Claude Code as a CLI backend in OpenClaw, enabling it as a model option and fallback.

Config Patch

Create or append to ~/.openclaw/config.patch:

{
  "agents": {
    "defaults": {
      "cliBackends": {
        "claude-cli": {
          "command": "/usr/bin/claude",
          "env": {
            "CLAUDE_CODE_OAUTH_TOKEN": "YOUR_OAUTH_TOKEN_HERE"
          }
        }
      },
      "models": {
        "claude-cli/opus-4.6": {
          "alias": "claude-cli-opus"
        },
        "claude-cli/sonnet-4.6": {
          "alias": "claude-cli-sonnet"
        }
      }
    },
    "list": [
      {
        "id": "tank",
        "model": {
          "primary": "anthropic/claude-opus-4-5",
          "fallbacks": [
            "google/gemini-3-flash-preview",
            "claude-cli/opus-4.6"
          ]
        }
      }
    ]
  }
}

Apply Configuration

gateway config.patch

Verify in gateway logs or test by spawning a coding session.

Available Models

  • claude-cli/sonnet-4.6 → Claude Sonnet 4.6 (fast, general coding)
  • claude-cli/opus-4.6 → Claude Opus 4.6 (complex reasoning, architecture)

Use as primary model, fallback, or invoke directly via exec.

Project Setup (CLAUDE.md)

Critical: Every project using Claude Code should have a CLAUDE.md file in its root directory. This is the "project brain" — Claude Code reads it automatically at session start.

What to Include

# Project: [Name]

## Overview
[1-2 sentence project description]

## Tech Stack
- Language: [e.g., TypeScript, Python, Rust]
- Framework: [e.g., Next.js, FastAPI, Supabase]
- Key Dependencies: [list major packages]

## Directory Structure

/ ├── src/ # Source code ├── public/ # Static assets ├── supabase/ # Database functions, migrations └── docs/ # Documentation


## Key Files
- `src/App.tsx` - Main app component, routing
- `src/lib/supabase.ts` - Database client
- `supabase/functions/` - Edge functions (24 total)

## Coding Standards
- Use TypeScript strict mode
- Functional components (React)
- Tailwind CSS for styling
- ESLint + Prettier configured

## Deployment
- Platform: Netlify (frontend), Supabase (backend)
- Deploy command: `npm run build`
- Environment: `.env.local` (never commit)

## Critical Rules
- Never commit API keys
- Always run `npm run build` before pushing
- All functions must have TypeScript types

## Testing
- `npm test` - Run Jest tests
- `npm run lint` - Check code style

Template Usage

Copy the provided template and customize:

cp /root/.openclaw/workspace/skills/claude-code/templates/CLAUDE.md.template /path/to/your/project/CLAUDE.md
# Edit with project-specific details

Real Example

For MissionDeck project, we created:

  • /root/.openclaw/workspace/missiondeck/CLAUDE.md
  • Result: Claude Code instantly knew: 24 edge functions, signup flow, all routes, coding standards
  • Zero extra context needed in prompts

Agent Workflow

Daily Coding Workflow

Step 1: Sync Project

cd /path/to/project
git pull origin main

Step 2: Run Claude Code with Task

CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Fix the signup redirect bug in src/pages/AuthVerify.tsx — users aren't being redirected to /dashboard after magic link verification"

Step 3: Review Proposed Changes

Claude Code will:

  • Search the codebase
  • Identify affected files
  • Propose changes with diffs
  • Explain reasoning

Step 4: Build Check

npm run build  # or npm test, cargo build, etc.

Step 5: Commit and Push

git checkout -b agent/fix-signup-redirect
git add .
git commit -m "fix: redirect to /dashboard after magic link verification"
git push origin agent/fix-signup-redirect

Step 6: Create PR (Optional)

gh pr create --title "Fix signup redirect" --body "Fixes redirect bug in AuthVerify.tsx"

OpenClaw Exec Pattern

For agents using the exec tool:

exec({
  command: `cd /path/to/project && CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Your task here"`,
  workdir: "/path/to/project",
  pty: false  // PTY not needed for --print mode
})

Subagent Spawn Pattern (Future)

Once ACP harness is configured:

sessions_spawn({
  runtime: "acp",
  agentId: "claude-code",
  message: "Fix the navbar bug in components/Navbar.tsx",
  label: "claude-code-navbar-fix"
})

Prompting Patterns

Effective prompts yield better results. Here are proven patterns:

1. Plan-First Approach

"Show me your plan first. List every file you'll touch and what changes you'll make. Wait for my approval before implementing."

Why: Prevents unwanted changes, gives you control

2. Challenge Mode

"Fix the authentication bug. After you're done, grill yourself — what edge cases did you miss? What could break?"

Why: Forces deeper reasoning, catches edge cases

3. RPI Workflow (Research → Plan → Implement)

For complex tasks, use 3 separate prompts:

Prompt 1 (Research):

"Research how the payment flow works. Show me all relevant files and how they connect."

Prompt 2 (Plan):

"Now plan how to add recurring billing. List the changes step-by-step."

Prompt 3 (Implement):

"Implement the plan. Make the changes."

Why: Breaks complexity into manageable phases

4. Precise Specifications

"In src/pages/AuthVerify.tsx, line 42, the redirect after magic link verification is broken. Expected behavior: redirect to /dashboard. Current behavior: stays on /verify. Fix it."

Why: Clear context = precise fixes

5. File-Focused Tasks

"Refactor src/lib/database.ts — extract the connection pool logic into a separate file src/lib/db-pool.ts"

Why: Claude Code excels at file-level operations

Anti-Patterns (Avoid These)

❌ Vague: "Make the app better" ❌ No context: "Fix the bug" ❌ Too broad: "Rewrite the entire codebase" ❌ Missing paths: "Update the config file" (which one?)

✅ Specific: "Fix the redirect bug in src/pages/AuthVerify.tsx — users should go to /dashboard after email verification" ✅ Scoped: "Refactor the authentication logic in src/lib/auth.ts to use async/await instead of promises" ✅ Clear paths: "Update the database connection pool size in src/config/database.ts from 10 to 20"

Why Claude Code vs Raw API

Token Usage Comparison

MethodTokens per TaskCost Model
Raw API (full file dump)10,000 - 50,000Per-token ($)
Claude Code (tool-based)~500Flat-rate (Claude Max subscription)

Savings: 80-90% reduction in token usage

How It Works

Raw API Approach:

User: "Fix the bug in App.tsx"
Agent: [reads entire App.tsx] [dumps 5,000 tokens into context] [generates fix] [writes back]
Cost: ~7,000 tokens

Claude Code Approach:

User: "Fix the bug in App.tsx"
Claude Code: [uses file tool to read App.tsx] [analyzes in isolation] [generates fix] [uses edit tool]
Cost: ~500 tokens

Result: Same quality, 90% fewer tokens, flat-rate billing

Code Quality Benefits

  • Codebase Exploration: Claude Code searches files, understands structure
  • Precise Edits: Tool-based editing, not regex replacement
  • Context Awareness: Reads CLAUDE.md automatically, no prompt overhead
  • Multi-file Operations: Handles imports, dependencies across files

Real-World Example

Task

"Remove the offer/discount banner from MissionDeck navbar"

Process

Claude Code Execution:

cd /root/.openclaw/workspace/missiondeck
CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Remove the discount banner from the navbar"

What Happened:

  1. Claude Code searched codebase for "banner", "discount", "navbar"
  2. Found DiscountBanner component in src/components/Navbar.tsx
  3. Identified exactly 2 changes needed:

- Remove import { DiscountBanner } from './DiscountBanner' - Remove <DiscountBanner /> JSX element

  1. Proposed changes with diff
  2. Build passed: npm run build ✓
  3. Pushed to branch: oracle/disable-discount-banner
  4. Merged to main → deployed live

Token Usage: ~450 tokens Time: 30 seconds Result: Precise, working, deployed

Troubleshooting

Issue: "Authentication failed"

Cause: Token expired or invalid

Fix:

claude setup-token  # Re-authenticate
# Update token in environment and OpenClaw config

Issue: "command not found: claude"

Cause: NPM global bin not in PATH

Fix:

export PATH="$PATH:$(npm bin -g)"
echo 'export PATH="$PATH:$(npm bin -g)"' >> /root/.bashrc

Issue: "Could not read CLAUDE.md"

Cause: Project missing CLAUDE.md file

Fix:

cp /root/.openclaw/workspace/skills/claude-code/templates/CLAUDE.md.template /path/to/project/CLAUDE.md
# Edit with project details

Issue: PTY required error during setup

Cause: claude setup-token needs TTY

Fix (with OpenClaw exec):

exec({
  command: "claude setup-token",
  pty: true  // Enable pseudo-terminal
})

Issue: "No such file or directory" errors

Cause: Running Claude Code from wrong directory

Fix: Always cd into project root first

cd /path/to/project
CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "your task"

Issue: Changes not applied

Cause: Claude Code proposes changes, but requires approval in interactive mode

Fix: Use --print flag for non-interactive mode (outputs to stdout)

claude --print "your task"  # No approval needed, just shows output

For interactive mode (approval required):

claude  # Interactive, will wait for y/n approval

Advanced Usage

Batch Operations

Process multiple tasks sequentially:

cd /path/to/project
CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Task 1: Fix auth bug"
CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Task 2: Add new endpoint"
CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Task 3: Update tests"

Model Selection

Force specific model:

claude --model opus-4.6 --print "Complex architecture refactor"
claude --model sonnet-4.6 --print "Quick bug fix"

Integration with Git Workflow

# Create feature branch
git checkout -b feature/claude-code-implementation

# Run Claude Code
CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN claude --print "Implement feature X"

# Review changes
git diff

# Commit
git add .
git commit -m "feat: implement X using claude-code"

# Push
git push origin feature/claude-code-implementation

Best Practices

  1. Always create CLAUDE.md — It's the project brain, saves token overhead
  2. Use feature branches — Never commit directly to main
  3. Run builds before committing — Catch errors early
  4. Be specific in prompts — Include file paths, expected behavior
  5. Review proposed changes — Claude Code is good, but verify
  6. Store token securely — Use environment variables, not hardcoded
  7. Sync before working — git pull to avoid conflicts
  8. Use plan-first for complex tasks — Get approval before implementation

References

Skill Metadata

  • Version: 1.0.2
  • Author: Matrix Zion (ProSkillsMD)
  • Homepage: https://missiondeck.ai
  • Created: 2026-03-13
  • Updated: 2026-03-14
  • License: BSD 3-Clause
  • Dependencies: Node.js, npm, Claude Max subscription
  • OpenClaw Compatibility: 2026.2+

Next Steps:

  1. Install Claude Code: npm install -g @anthropic-ai/claude-code
  2. Authenticate: claude setup-token
  3. Configure OpenClaw: Add CLI backend to config.patch
  4. Create project CLAUDE.md: Copy template and customize
  5. Start coding: CLAUDE_CODE_OAUTH_TOKEN=$token claude --print "your task"

More by Asif2BD

clawhub install jarvis-mission-control    # Free agent command center with Claude Code session tracking
clawhub install openclaw-token-optimizer  # Reduce token costs by 50-80%
clawhub search Asif2BD                    # All skills

MissionDeck.ai · Free tier · No credit card required

平台分布

OpenClaw

83.22%
按下载量换算3,926

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills