claude-code-wrapper

Loads Claude credentials from ~/.claude/config.json and exports them for claude commands.

1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/xdrshjr/JR-OpenClaw-Skills --skill claude-code-wrapper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-wrapper
Source: https://github.com/xdrshjr/JR-OpenClaw-Skills/tree/main/claude-code-wrapper
Command: npx skills add https://github.com/xdrshjr/JR-OpenClaw-Skills --skill claude-code-wrapper

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This wrapper automatically loads Claude credentials from the user's ~/.claude/config.json and exports the required environment variables so Claude Code can run without manual setup.

Core Features & Use Cases

  • Auto-loads ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, and API_TIMEOUT_MS from ~/.claude/config.json and exports them for claude commands.
  • Simplifies running Claude Code in OpenClaw sessions across local and CI environments without manual credential configuration.
  • Includes basic error handling for missing config or absent claude installation.

Quick Start

Run the wrapper script to execute Claude Code with credentials auto-loaded from the config file.

Frequently Asked Questions about claude-code-wrapper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-load Claude credentials for CLI commands without manual setup?

You can auto-load Claude credentials by using a wrapper script that reads ~/.claude/config.json and exports ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, and API_TIMEOUT_MS directly into the environment for seamless CLI execution.

Why does my Claude Code CLI fail to authenticate in OpenClaw automation sessions?

Claude Code CLI authentication fails when environment variables like ANTHROPIC_AUTH_TOKEN are missing, which this wrapper resolves by automatically reading and exporting credentials from ~/.claude/config.json before executing commands.

Can I run Claude Code in CI environments without manually exporting environment variables?

Yes, you can run Claude Code in CI environments without manual configuration by invoking a wrapper that automatically sources required credentials and exports ANTHROPIC_BASE_URL and API_TIMEOUT_MS from the local config file.

What happens if the ~/.claude/config.json file is missing when running Claude commands?

If the config file is missing, the wrapper applies basic error handling to prevent silent failures, alerting you that the required credentials cannot be loaded for Claude Code execution.

What's the best way to execute claude commands via exec tools in automated workflows?

The best way to execute claude commands via exec tools is using a CLI wrapper that ensures seamless login by automatically loading authentication tokens and timeout settings from the user config file beforehand.