TopRank Skills

Home / Claw Skills / Git / GitHub / claude-code-cli
Official OpenClaw rules 36%

claude-code-cli

Delegate coding tasks to Claude Code CLI via background process. Use when: building features, reviewing PRs, refactoring codebases, or iterative coding that needs file exploration. Supports interactive PTY mode for confirmations/permissions and headless pipe mode for automation. NOT for: simple one-liner fixes (just edit), reading code (use read tool), or any work in ~/.openclaw/ workspace.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 claude-code-cli 技能。 若已安装,则直接安装 claude-code-cli 技能。

Overview

Skill Key
atelypham/claude-code-cli
Author
AtelyPham
Source Repo
openclaw/skills
Version
0.1.0
Source Path
skills/atelypham/claude-code-cli
Latest Commit SHA
afe498717411e15f21d2e6de76bafaaa21b5f79c

Extracted Content

SKILL.md excerpt

# Claude Code Skill

Delegate coding tasks to the **Claude Code CLI** via background process with PTY or headless pipe mode.

## PTY Mode Required (Interactive)

Claude Code is an **interactive terminal application** that needs a pseudo-terminal (PTY). Without PTY, output breaks or the agent hangs.

**Always use `pty:true`** for interactive mode:

```bash
# ✅ Correct - with PTY
exec pty:true command:"claude 'Your prompt'"

# ❌ Wrong - no PTY, agent may break
exec command:"claude 'Your prompt'"
```

---

## Two Modes

### 1. Interactive PTY Mode

For tasks where Claude Code may ask confirmations, need input, or show permission prompts.

```bash
# Foreground (waits for completion)
exec pty:true workdir:~/project command:"claude 'Add dark mode toggle'"

# Background (returns sessionId)
exec pty:true workdir:~/project background:true command:"claude 'Build REST API for todos'"
```

### 2. Headless Pipe Mode

For automation, scripting, CI-like usage. Uses `-p` flag for non-interactive.

```bash
# Simple one-shot
exec command:"claude -p 'Explain what src/main.ts does' --output-format json"

# With structured output validation
exec command:"claude -p 'List all exported functions in src/' --output-format json --json-schema '{\"type\":\"object\",\"properties\":{\"functions\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}'"

# Budget-capped automation
exec command:"claude -p 'Refactor auth module' --max-budget-usd 5.00 --output-format json"

# Real-time streaming output (JSON chunks as they arrive)
exec command:"claude -p 'Build a helper function' --output-format stream-json"
```

---

## Exec & Process Tool Reference

### Exec Tool Parameters

| Parameter    | Type    | Description                                                                 |
| ------------ | ------- | --------------------------------------------------------------------------- |
| `command`    | string  | The shell command to run                                                    |
| `pty`...

README excerpt

# claude-code-cli

An [OpenClaw](https://github.com/openclaw/openclaw) skill for delegating coding tasks to the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code).

## Features

- **Interactive PTY mode** — full terminal with confirmations, permissions, input
- **Headless pipe mode** — `-p` flag for automation, CI, structured JSON output
- **Session continuity** — `--continue` / `--resume SESSION_ID` across conversations
- **Parallel workflows** — git worktrees + multiple Claude Code processes
- **PR reviews** — safe temp-dir patterns, never in live workspace
- **Budget-capped automation** — `--max-budget-usd` for unattended runs
- **Granular tool restrictions** — `--allowedTools "Bash(git:*,npm:*),Read,Edit"`
- **Auto-notify** — `openclaw system event` wake trigger on completion
- **HANDOFF.md pattern** — context continuity across long sessions
- **Fan-out / Writer-Reviewer** — advanced parallel session patterns

## Install

### From ClawHub

```bash
openclaw skills install claude-code-cli
```

### Local

```bash
git clone https://github.com/AtelyPham/openclaw-claude-code-skill.git ~/clawd/claude-code-cli
openclaw skills install --local ~/clawd/claude-code-cli
```

## Requirements

- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude` binary)
- OpenClaw with exec tool that supports `pty:true`

## License

MIT

Related Claw Skills

heyixuan2

bambu-studio-ai

★ 41

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

human-pages-ai

humanpages

★ 3

Search and hire real humans for tasks — photography, delivery, research, and more

zseven-w

openclaw-skills

★ 1

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

capt-marbles

geo-optimization

★ 1

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.

cchacons

openjobs

★ 0

The job marketplace where bots hire bots. Post FREE or paid $WAGE jobs, with on-chain escrow, faucet rewards, referrals, judge staking, task inbox, smart matching, checkpoints, oversight, webhooks, onboarding, and human owner dashboard.

cchacons

openjobs

★ 0

The job marketplace where bots hire bots. Post FREE or paid $WAGE jobs, with on-chain escrow, faucet rewards, referrals, judge staking, task inbox, smart matching, checkpoints, oversight, webhooks, onboarding, and human owner dashboard.