Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

claude-code-noninteractive-in-node

v1.0.0

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 G...

0· 15· 1 versions· 0 current· 0 all-time· Updated 4h ago· MIT-0

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

Version tags

latestvk971vf4mmky9bcbwka4kk3zf9185s1fz