claude-code-cli
Skill1 starsChanged 5 months agoMITView on GitHub
Delegate work from Codex to the local Claude Code CLI with low-waste, current command patterns. Use when Codex needs to call `claude`, choose Claude Code model or effort settings, use `ultrathink` or `ultracode`, run print-mode JSON calls, resume or continue Claude sessions across turns, manage background Claude agents or workflows, cap spend with `--max-budget-usd`, restrict Claude tools, or compare Claude output against Codex work.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- yu-iskw/coding-agent-skillstheir own version, first seen Oct 13, 2026
- samwalter2949348803-stack/Openclaw-catch-Claude-Codetheir own version, first seen Apr 5, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- samwalter2949348803-stack/Openclaw-catch-Claude-Code★ 47same name
- yu-iskw/coding-agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 4 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If the machine relies on saved Claude subscription auth, avoid --bare unless ANTHROPIC_API_KEY or an apiKeyHelper is configured.
- Distinctive: line 21
Prefer print mode for agent-to-agent calls:
- Very specific: line 27
Use --tools "" for no built-in tools.
- Very specific: line 36
Keep a session alive by preserving session_id and the working directory:
- Very specific: line 43
Run resume commands from the same project directory where the print-mode session started.
- Distinctive: line 47
Use the smallest mode that can answer the question:
- Very specific: line 54
Interactive or long task: use --bg, claude agents --json, claude logs <id>, claude attach <id>, and claude stop <id> when a background …
- Distinctive: line 65
When a cap is hit, treat the result as failed even if tokens were spent.
- Distinctive: line 69
Use the bundled wrapper when it helps avoid quoting mistakes:
- Very specific: line 75
Read references/cli-options.md before using less common features: --bare, --safe-mode, --continue, --fork-session, --bg, --json-schema, …
- Very specific: line 101
Prefer official docs and claude --help over community snippets when flags disagree.
- Very specific: line 102
Read the actual modelUsage field because aliases such as haiku, sonnet, opus, fable, best, and [1m] can resolve differently by provider, …
- Very specific: line 103
Do not pass secrets in prompts.
- Very specific: line 104
Do not use --dangerously-skip-permissions from Codex unless the user explicitly asked for it and the workspace risk is understood.
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Code CLI
Updated as of June 25, 2026. Verified against Claude Code CLI 2.1.191 and the official Claude Code docs available that day.
Workflow
Confirm the local CLI and auth path before spending tokens:
claude --version claude auth status --textIf the machine relies on saved Claude subscription auth, avoid
--bareunlessANTHROPIC_API_KEYor anapiKeyHelperis configured.--safe-modekeeps auth while disabling customizations for troubleshooting.Prefer print mode for agent-to-agent calls:
claude -p --output-format json --model haiku --effort low --max-turns 1 --max-budget-usd 0.05 --tools "" --disallowedTools "mcp__*" --strict-mcp-config "Reply with exactly: ok"Use
--tools ""for no built-in tools. MCP tools are separate; add--disallowedTools "mcp__*"or--strict-mcp-configwhen the call should not reach MCP servers.Parse the JSON result instead of scraping text. Inspect:
resultfor the response textsession_idfor follow-up callssubtype,is_error,errors, and exit code for failure handlingtotal_cost_usdandmodelUsagefor cost/model auditing
Keep a session alive by preserving
session_idand the working directory:claude -p --output-format json --model sonnet --effort high --max-turns 5 --max-budget-usd 0.30 "Start the analysis." claude -p --resume <session_id> --output-format json --max-turns 5 --max-budget-usd 0.30 "Continue from the prior answer."Run resume commands from the same project directory where the print-mode session started. Do not pass
--no-session-persistenceif a future turn may need the session.
Mode Selection
Use the smallest mode that can answer the question:
- Cheap consult:
--model haiku --effort low --max-turns 1 --tools ""for short classification, wording, or sanity checks. - Coding opinion:
--model sonnet --effort medium|high --max-turns 3-8when Claude should inspect or reason about code. - Hard reasoning:
--model opus --effort xhigh|maxonly when the task justifies higher spend. - One-turn deeper reasoning: include
ultrathinkin the prompt. It adds an in-context instruction and does not change the API effort level. - Workflow orchestration: include
ultracodein the prompt for one task, or set--settings '{"ultracode":true}'for a print-mode session that should let Claude plan dynamic workflows.ultracodeis not accepted by--effort; it runs withxhigheffort plus workflow orchestration. - Interactive or long task: use
--bg,claude agents --json,claude logs <id>,claude attach <id>, andclaude stop <id>when a background Claude session is more appropriate than blocking Codex.
Budget Defaults
--max-budget-usd is a guardrail, not a cost planner. Too-low caps can fail after Claude Code startup/cache overhead, even for tiny prompts. Start with these ceilings and lower only after measuring this machine:
haikulow, no tools, one turn:0.05sonnetmedium/high, small code consult:0.15-0.30opusxhigh/max, hard consult:0.50+ultracode, background agents, or workflows: set an explicit task budget that the user would consider acceptable
When a cap is hit, treat the result as failed even if tokens were spent. Retry only after adjusting scope, model, effort, or budget.
Recipes
Use the bundled wrapper when it helps avoid quoting mistakes:
python claude-code-cli/scripts/claude_call.py --prompt "Reply with exactly: ok" --budget 0.05 --result-onlyRead references/cli-options.md before using less common features: --bare, --safe-mode, --continue, --fork-session, --bg, --json-schema, stream-json, ultracode, /deep-research, ultrareview, or MCP/tool allowlists.
Resumable Low-Cost Thread
$first = claude -p --output-format json --model haiku --effort low --max-turns 1 --max-budget-usd 0.05 --tools "" --disallowedTools "mcp__*" --strict-mcp-config "Remember the token alpha and reply with ready."
$sid = ($first | ConvertFrom-Json).session_id
claude -p --resume $sid --output-format json --model haiku --effort low --max-turns 1 --max-budget-usd 0.05 --tools "" --disallowedTools "mcp__*" --strict-mcp-config "What token did I ask you to remember?"Hard One-Turn Review
claude -p --output-format json --model opus --effort xhigh --max-turns 3 --max-budget-usd 0.50 --append-system-prompt "Be concise. Return risks first." "ultrathink: Review this design decision: ..."Print-Mode Ultracode
claude -p --output-format json --model opus --max-turns 10 --max-budget-usd 2.00 --settings '{"ultracode":true}' "ultracode: audit this repository for auth bypasses and return the top findings."Print mode and the Agent SDK do not show interactive workflow approval prompts; permission behavior follows configured rules. Add an allowlist only for commands the task truly needs.
Accuracy Rules
- Prefer official docs and
claude --helpover community snippets when flags disagree. - Read the actual
modelUsagefield because aliases such ashaiku,sonnet,opus,fable,best, and[1m]can resolve differently by provider, plan, version, and settings. - Do not pass secrets in prompts. Claude CLI auth may use saved account state even when
ANTHROPIC_API_KEYis absent. - Do not use
--dangerously-skip-permissionsfrom Codex unless the user explicitly asked for it and the workspace risk is understood. - For pure advice calls, disable tools. For code-edit delegation, constrain tools and working directories deliberately.
- Re-check docs if the current date is after June 25, 2026 and the task depends on newly released Claude Code flags or model behavior.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

