claude-code-local

Call Claude Code as a non-interactive coding agent on the same machine as OpenClaw. Use when: (1) You need to delegate coding, refactoring, or bug-fixing tasks to Claude Code, (2) You want non-interactive code exploration and analysis, (3) You need to run batch code reviews, (4) You're setting up automated CI/CD code checks, (5) You want to use Claude Code as a specialized subordinate for project work while keeping the orchestrator agent focused on coordination.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "claude-code-local" with this command: npx skills add xxuzzwz/claude-code-local

Claude Code Local

调用本机 Claude Code 作为非交互 coding agent。Orchestrator 负责指挥和验收,Claude Code 负责写代码。

Quick Reference

场景命令模板
短任务cd <project> && claude --bare -p "<任务>" --max-turns 10
长任务cd <project> && claude --bare -p "<任务>" --output-format stream-json --verbose --include-partial-messages --max-turns 30
全权限cd <project> && claude --bare -p "<任务>" --dangerously-skip-permissions --output-format stream-json --verbose --include-partial-messages --max-turns 30
只读分析cd <project> && claude --bare -p "<任务>" --permission-mode plan --allowedTools "Read,Glob,Grep,LSP" --max-turns 10
JSON 输出cd <project> && claude --bare -p "<任务>" --output-format json --max-turns 10

Key Flags

FlagPurpose
--bareMinimal mode, skip hooks/LSP/plugins, faster startup
-p / --printNon-interactive, output to stdout (do not use PTY)
--max-turns NLimit turns: 10 short, 30 long
--output-format stream-jsonStreaming output, prevents timeout
--output-format jsonSingle JSON with result field
--verboseDetailed logging (with stream-json)
--include-partial-messagesIncremental output (with stream-json)

Permission Modes

Default to the lowest level that accomplishes the task.

LevelModeFlagsUse Case
1 Readplan--permission-mode plan --allowedTools "Read,Glob,Grep,LSP"Code exploration, doc review
2 Analyzedefault--allowedTools "Read,Bash,Glob,Grep,LSP"Run diagnostic commands
3 EditacceptEdits--permission-mode acceptEdits --allowedTools "Read,Edit,Write,Bash,Glob,Grep,LSP"Modify source files
4 Fullbypass--dangerously-skip-permissionsTrusted projects, batch ops

Timing Expectations

ComplexityDurationmax-turns
Simple (回答问题)2-5 min5-10
Medium (探索+单文件)5-15 min10-20
Complex (多文件+测试)15-30 min20-40

Never kill Claude Code when exec times out. Check ps aux | grep claude first.

Post-Task Checklist

  • Summary of changes
  • Modified files list
  • Commands executed
  • git status --short
  • git diff --stat
  • Test results
  • Next steps

References

  • references/streaming.md — Stream-JSON event types and filtering
  • references/troubleshooting.md — Common failures and fixes

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Dependency Breaking Technique Executor

Select and execute the right dependency-breaking technique from Michael Feathers' catalog of 24 named techniques (Part III of Working Effectively with Legacy...

Registry SourceRecently Updated
Coding

Clipcat - AI Viral Video Maker for TikTok Shop

Clipcat - TikTok e-commerce video creation skill. Video search, product insights, viral replication, product-to-video generation, breakdown analysis, and vid...

Registry SourceRecently Updated
Coding

azure-infra-engineer

> Azure cloud infrastructure expert specializing in network design, identity integration, PowerShell automation with Az modules, and infrastructure-as-code p...

Registry SourceRecently Updated
Coding

Legacy Code Symptom Router

Diagnose any legacy-code situation in plain language and route to the right technique. Use as the FIRST skill when a developer has a vague or specific compla...

Registry SourceRecently Updated