Skip to content

richtobey/openclaw-claude-codex-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenClaw + Claude Code + Codex Tools

Companion repo for the article Adding Claude Code and Codex as Tools in OpenClaw.

Add Claude Code CLI/SDK and OpenAI Codex CLI/SDK as tools to your OpenClaw instance. Choose the path that matches your setup.

What's Here

skills/
├── claude-code/SKILL.md        # Skill — teaches the agent to use Claude Code
└── codex/SKILL.md              # Skill — teaches the agent to use Codex
docker/
├── Dockerfile.snippet          # Dockerfile additions (CLIs + SDKs)
├── docker-compose.snippet.yml  # Volume mount additions
└── .env.example                # Environment variable configuration
native/
├── install.sh                  # One-command install for macOS
└── README.md                   # Native quick-start reference
article/                        # The full article

Quick Start — Native Mac

If you run OpenClaw directly on macOS (no Docker):

  1. Run the install script (or npm install -g both tools manually):
    ./native/install.sh
  2. Authenticate:
    claude          # Anthropic OAuth
    codex login     # OpenAI/ChatGPT OAuth
  3. Copy skills into your OpenClaw skills directory:
    cp -R skills/claude-code ~/.openclaw/skills/
    cp -R skills/codex ~/.openclaw/skills/
  4. Verify: ask the agent to do a code task — it should invoke Claude Code by default

See native/README.md for details.

Quick Start — Docker

If you run OpenClaw in Docker:

  1. Copy the Dockerfile lines into your OpenClaw Dockerfile (before USER node)
  2. Add the volume mounts to your docker-compose.yml
  3. Add CODEX_CONFIG_DIR and CLAUDE_CONFIG_DIR to your .env (see docker/.env.example)
  4. Authenticate on your host: claude and codex login
  5. Copy skills/claude-code/ and skills/codex/ into your OpenClaw skills/ directory
  6. Rebuild: docker compose build && docker compose up -d
  7. Verify: ask the agent to do a code task — it should invoke Claude Code by default

How Auth Works

Both tools use OAuth. On a native Mac, the CLIs handle everything — tokens live in ~/.claude and ~/.codex.

In Docker, mount your host's config directories into the container read-only:

  • Claude Code~/.claude mounted as :ro. Authenticate on host with claude.
  • Codex~/.codex mounted as :ro. Authenticate on host with codex login.

Both are mounted on the openclaw-cli and openclaw-node services. The Codex CLI (@openai/codex) and SDK (@openai/codex-sdk) are separate packages; Claude Code bundles both in @anthropic-ai/claude-code.

Read the full article for details on the skill system and model stack.

About

OpenClaw tools for Claude and Codex

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors