360 Secure SkillHub
360 安全技能中心

OpenClaw CLI

指导选择并安全执行 openclaw 命令:先按默认、--dev 或 --profile 确定运行域,再经 references/command-map.md 路由命令族;破坏性操作需用户确认,并在执行后用 status、health、doctor 等显式验证结果。

ramensushi2026
ramensushi2026
热度 77.01
最近更新 2026-05-11 17:26:34
分类:开发依赖:代码执行应用场景:DevOps / 调试排错 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-cli
Metadata
name
openclaw-cli
description
Operate and troubleshoot the OpenClaw CLI across setup, gateway/node lifecycle, channel login, messaging, agent turns, models, plugins, and system health. Use when asked to choose, run, debug, or explain `openclaw` commands, global flags (`--dev`, `--profile`), or command families such as `gateway`, `agent`, `channels`, `message`, `doctor`, `status`, and `update`.

OpenClaw CLI

Run OpenClaw commands safely and efficiently. Choose the right command family, execute with the correct profile context, and verify postconditions.

Execution Workflow

  1. Clarify the target state. Ask what should change and what must remain untouched.

  2. Select runtime scope first. Use default profile unless isolation is requested. Use:

  • openclaw --dev ... for isolated dev state under ~/.openclaw-dev.
  • openclaw --profile <name> ... for named isolated state under ~/.openclaw-<name>.
  1. Choose the command family. Use references/command-map.md to route the request quickly.

  2. Expand command details before running risky operations. Run openclaw <command> --help for starred families and confirm flags.

  3. Prefer machine-readable output when automation is needed. Use --json where available, then parse/verify.

  4. Verify outcomes explicitly. Check with openclaw status, openclaw health, openclaw nodes status --json, or command-specific follow-up.

Safety Rules

  • Require explicit user confirmation before reset, uninstall, destructive --force flows, or credential-clearing operations.
  • Prefer non-destructive diagnostics first: status, health, doctor, logs.
  • Keep profile usage consistent across a workflow. Do not mix default and --dev/--profile commands accidentally.
  • For gateway issues, diagnose before restart unless restart is explicitly requested.

Triage Sequence

For generic "OpenClaw not working" issues:

  1. Run openclaw status.
  2. Run openclaw health.
  3. Run openclaw doctor.
  4. Check openclaw gateway ..., openclaw node ..., or openclaw nodes ... based on where failure appears.
  5. Escalate to targeted commands in references/command-map.md.

Resources

  • references/command-map.md: Command families, routing guidance, and practical recipes.