claude-better-cli

Compatibility-first Claude CLI reimplementation with faster startup, lower memory, and drop-in command compatibility

3,819 stars

Best use case

claude-better-cli is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Compatibility-first Claude CLI reimplementation with faster startup, lower memory, and drop-in command compatibility

Teams using claude-better-cli should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/claude-better-cli/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/adisinghstudent/claude-better-cli/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/claude-better-cli/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How claude-better-cli Compares

Feature / Agentclaude-better-cliStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Compatibility-first Claude CLI reimplementation with faster startup, lower memory, and drop-in command compatibility

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# claude-better

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.

`claude-better` is a compatibility-first reimplementation of the Claude CLI focused on aggressive performance improvements: up to 73% faster startup and up to 80% lower resident memory, while maintaining 100% command-level compatibility with the original Claude CLI.

## What It Does

- **Faster cold starts**: `--help` goes from 182ms → 49ms; `chat` session bootstrap from 311ms → 102ms
- **Lower memory**: sustained interactive sessions drop from ~412MB → ~83MB RSS
- **Drop-in compatible**: 100% pass rate on primary command forms, 100% exit-code match, 98.7% byte-for-byte output parity
- **Zero migration cost**: existing scripts, aliases, and muscle memory continue to work unchanged

## Availability

> ⚠️ Source code is provided for selected high-profile customers only and available upon request. Contact the maintainer at [krzyzanowskim/claude-better](https://github.com/krzyzanowskim/claude-better) for access.

If you have access, install as described in your onboarding materials. The binary is a drop-in replacement — substitute it wherever you invoke `claude`.

## Installation (Once You Have Access)

```bash
# Typical binary drop-in replacement pattern
# Place the claude-better binary in your PATH before the original claude
export PATH="/path/to/claude-better/bin:$PATH"

# Verify it's being picked up
which claude
claude --version
```

```bash
# Or alias it explicitly without touching PATH
alias claude='/path/to/claude-better/bin/claude-better'
```

## Key Commands

`claude-better` mirrors the Claude CLI surface exactly. All commands you know work as-is:

```bash
# Show help (cold start: ~49ms vs 182ms baseline)
claude --help

# Check auth status (warm start: ~58ms vs 146ms baseline)
claude auth status

# Start an interactive chat session (~102ms bootstrap vs 311ms baseline)
claude chat

# One-shot non-interactive command (~131ms vs 428ms baseline)
claude -p "Summarize this file" < input.txt

# All standard flags pass through unchanged
claude --model claude-opus-4-5 chat
claude --output-format json -p "List 3 facts about Rust"
```

## Configuration

`claude-better` reads the same configuration as the original Claude CLI. No new config format is required.

```bash
# Standard Claude CLI env vars are respected
export ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY

# The tool reads ~/.claude/ config directory as normal
# No migration of config files needed
```

## Performance Characteristics

| Scenario | Baseline | claude-better | Improvement |
|---|---|---|---|
| `--help` cold start | 182ms | 49ms | 73% faster |
| `auth status` warm | 146ms | 58ms | 60% faster |
| `chat` bootstrap | 311ms | 102ms | 67% faster |
| One-shot command | 428ms | 131ms | 69% faster |
| RSS after 30min session | 412MB | 83MB | 80% less |
| Streaming jitter p95 | 91ms | 24ms | 74% lower |

## Scripting Patterns

Since compatibility is 100%, all existing scripting patterns work unchanged:

```bash
#!/usr/bin/env bash
# Existing Claude CLI scripts work without modification

# Non-interactive pipeline usage
echo "Explain this error:" | cat - error.log | claude -p /dev/stdin

# Exit code handling (100% compatible)
if claude auth status; then
  echo "Authenticated"
else
  echo "Not authenticated — run: claude auth login"
  exit 1
fi

# JSON output parsing
claude --output-format json -p "What is 2+2?" | jq '.content'
```

```bash
#!/usr/bin/env bash
# Long-lived interactive session — memory pressure is significantly reduced
# Useful on memory-constrained machines (laptops, CI runners)
claude chat
```

## Compatibility Notes

- **CLI surface**: 100% compatible with targeted Claude CLI command forms
- **Exit codes**: 100% match on documented exit-code behavior  
- **Output parity**: 98.7% byte-for-byte; 100% semantic parity after whitespace/timestamp/terminal-width normalization
- **Tested environments**: macOS (Apple Silicon), Linux, containerized CI
- **Tested against**: 1,200 synthetic invocations, 87 flag combinations, 42 interactive flows, 14 failure-mode scenarios

## Troubleshooting

**Binary not found after install**
```bash
# Ensure claude-better/bin is earlier in PATH than original claude
echo $PATH | tr ':' '\n' | grep -n claude
which claude  # should point to claude-better
```

**Unexpected output differences**
```bash
# 1.3% of outputs differ before normalization (timestamps, whitespace, terminal width)
# If a script breaks on exact output matching, add normalization:
claude -p "..." | tr -s ' ' | sed 's/[[:space:]]*$//'
```

**Auth not recognized**
```bash
# claude-better reads the same auth store as the original CLI
# If auth fails, re-authenticate via the standard flow:
claude auth login
```

**Falling back to original CLI**
```bash
# If you hit an edge case, unset the alias/PATH change to revert instantly
unalias claude
# or
export PATH="<original-path-without-claude-better>"
```

## Architecture Notes (For Contributors / Evaluators)

The performance gains come from specific implementation choices documented in the README:

- **Zero-copy streaming pipeline** for token output (reduces streaming jitter)
- **Precomputed command registry** instead of dynamic startup discovery (cuts cold-start time)
- **Aggressively bounded allocation** for session state (drives memory reduction)
- **Lazy subsystem initialization** — only the active command path pays startup cost
- **Compatibility shim layer** that preserves flags/behavior without carrying the full original stack

Related Skills

afrexai-claude-code-production

3891
from openclaw/skills

Complete Claude Code productivity system — project setup, prompting patterns, sub-agent orchestration, context management, debugging, refactoring, TDD, and shipping 10X faster. Zero scripts needed.

ask-claude

3891
from openclaw/skills

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Coding & Development

claude-audit

3891
from openclaw/skills

Full project audit — launches 5 parallel AI agents (security, bugs, dead code, architecture, performance) to scan your codebase read-only, then compiles a unified report with health grade (A+ to F) and offers surgical fixes. Language-agnostic. Zero config.

Claude Skills 开发框架架构指导手册

3891
from openclaw/skills

## 1. 项目概述 (Overview)

claude-code-usage

3891
from openclaw/skills

Check Claude Code OAuth usage limits (session & weekly quotas). Use when user asks about Claude Code usage, remaining limits, rate limits, or how much Claude usage they have left. Includes automated session refresh reminders and reset detection monitoring.

ClaudeHemat

3891
from openclaw/skills

# Introduction

claude-code-cli

3891
from openclaw/skills

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.

better-soul

3891
from openclaw/skills

Write powerful SOUL.md files for AI agents. Use when creating, revising, or improving SOUL.md (the personality document for AI agents). Based on Anthropic's Claude soul document principles and SoulSpec standard.

Claude Code CLI for OpenClaw

3891
from openclaw/skills

Install, authenticate, and use Claude Code CLI as a native coding tool for any OpenClaw agent system.

claude-relay

3891
from openclaw/skills

Relay operator for Claude Code via tmux across multiple projects. Use when the user wants to start/continue a Claude Code terminal session, send prompts, read output, or manage background Claude sessions by project name/path.

claude-usage

3891
from openclaw/skills

Check Claude Code / Claude Max usage limits. Run when user asks about usage, limits, quota, or how much Claude capacity is left.

claude-notifications

3891
from openclaw/skills

Set up native macOS notifications for Claude Code on local and devpod/remote environments. Use when the user asks to 'setup notifications', 'configure devpod notifications', 'get notified when Claude needs attention', 'setup claude alerts', or 'install notification hooks'. Handles local terminal-notifier, SSH reverse tunnel for devpods, launchd listener, tmux passthrough, and Claude Code hook configuration.