Search

PythonReactSEOPDF
OpenClaw

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.

atelypham0 source installs☆ 0 Repository starsv0.1.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install atelypham/claude-code-cli

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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:

# ✅ 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.

# 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.

# 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...

Source information

Source
github
Repository
openclaw/skills
Path
skills/atelypham/claude-code-cli
Version
0.1.0
Commit
afe498717411e15f21d2e6de76bafaaa21b5f79c
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

claude-code-cli

An OpenClaw skill for delegating coding tasks to the Claude Code CLI.

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
openclaw skills install claude-code-cli
Local
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 (claude binary)
  • OpenClaw with exec tool that supports pty:true

License

MIT

Extracted content

SKILL.md
# 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
# 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 skills

OpenClaw

bambu-studio-ai

heyixuan2

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 pi...

OpenClaw

humanpages

human-pages-ai

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

OpenClaw

geo-optimization

capt-marbles

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 discove...

OpenClaw

openclaw-skills

zseven-w

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