claude-code-remote

Call Claude Code as a non-interactive coding agent on a remote machine via OpenClaw Node. Use when: (1) Your coding agent is on a separate machine from the Gateway, (2) You need to delegate coding tasks to a Claude Code instance connected via Node, (3) You want to use a worktree or fast local filesystem for remote projects, (4) Environment variables need login shell loading via bash -lc, (5) You're coordinating multi-agent workflows across machines.

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-remote" with this command: npx skills add xxuzzwz/claude-code-noninteractive-in-node

Claude Code Remote (OpenClaw Node)

通过 OpenClaw Node 在远程机器上以非交互模式调用 Claude Code。

Gateway ──exec host=node──→ Node ──bash -lc──→ claude --bare ──→ AI API

Quick Reference

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

Key Differences from Local

AspectLocalRemote (Node)
Command wrapperDirectbash -lc '...' required
Project pathNativeUse WSL/Linux paths for speed
Env loadingShell-dependentMust be before .bashrc interactive guard
Exec toolStandardhost=node node=<id>

Permission Modes

Same four levels as claude-code-local. See references/permissions.md.

LevelRemote-Specific Note
1 ReadSafe—no filesystem writes
2 Analyzebash -lc may need Node approval
3 EditWrites may trigger Node security policy
4 FullSome Nodes block certain write operations

Node Security Workarounds

  • Multi-line heredocs → Write script to /tmp/ first
  • Inline Python → Same, use script file
  • Write operations → Backup before modifying: cp f f.bak.$(date +%F)

OpenClaw Exec Configuration

{
  "command": "bash -lc 'cd <project> && claude --bare -p \"<task>\" --max-turns 10'",
  "host": "node",
  "node": "<your-node-id>",
  "background": true,
  "timeout": 600
}

Worktree Setup

For projects on slow cross-filesystem mounts (e.g., WSL /mnt/c/):

git worktree add -b work-branch /home/user/project-worktree main

Shares git data, keeps working files on fast native filesystem.

Environment Setup

Ensure API credentials load in non-interactive shells:

# In ~/.bashrc, BEFORE the interactive guard:
export ANTHROPIC_API_KEY=sk-...

# Interactive guard (keep as-is):
case $- in
    *i*) ;;
      *) return;;
esac

Timing & Post-Task

Same as claude-code-local. See its SKILL.md for timing table and checklist.

References

  • references/permissions.md — Detailed permission mode behavior
  • references/troubleshooting.md — Remote-specific failure modes

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