npx skills add https://github.com/steipete/clawdis --skill healthcheck评估并加固运行 OpenClaw 的主机,然后将其调整至用户定义的风险承受度,同时不中断访问。将 OpenClaw 安全工具作为首要信号,但将操作系统加固视为一套独立、明确的步骤。
开始前,检查当前模型。如果低于最先进水平(例如,Opus 4.5、GPT 5.2+),建议切换。不要阻止执行。
在询问之前,尝试从环境中推断 1-5 项。如果需要确认,优先使用简单、非技术性的问题。
确定(按顺序):
首先询问一次是否允许运行只读检查。如果获得许可,默认运行它们,并且只针对无法推断或验证的项目提问。不要询问运行时或命令输出中已可见的信息。将权限询问保持为单个句子,并将后续所需信息列为无序列表(非编号),除非您正在呈现可选择的选项。
如果必须提问,请使用非技术性提示:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
只有在了解系统上下文后才询问风险承受度。
如果用户授予只读权限,默认运行适合操作系统的检查。如果未授予,则提供(编号的)检查选项。示例:
uname -a、sw_vers、cat /etc/os-release。ss -ltnup(如果 -u 不支持,则使用 ss -ltnp)。lsof -nP -iTCP -sTCP:LISTEN。ufw status、firewall-cmd --state、nft list ruleset(选择已安装的)。/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate 和 pfctl -s info。tmutil status(如果使用 Time Machine)。作为默认只读检查的一部分,运行 openclaw security audit --deep。仅在用户要求时提供替代方案:
openclaw security audit(更快,非探测性)openclaw security audit --json(结构化输出)提供应用 OpenClaw 安全默认设置的选项(编号):
openclaw security audit --fix明确说明 --fix 仅收紧 OpenClaw 默认设置和文件权限。它不会更改主机防火墙、SSH 或操作系统更新策略。
如果启用了浏览器控制,建议在所有重要账户上启用双因素认证,优先使用硬件密钥,短信认证不足够。
作为默认只读检查的一部分,运行 openclaw update status。
报告当前渠道以及是否有可用更新。
请用户选择或确认风险承受度以及任何必需开放的服务/端口(以下编号选项)。不要将其硬塞入固定配置文件;如果用户愿意,捕获需求而非选择配置文件。提供建议的配置文件作为可选默认值(编号)。请注意,大多数用户选择家庭/工作站平衡型:
提供一个包含以下内容的计划:
在进行任何更改之前始终展示计划。
提供以下选项之一(编号以便用户可以用单个数字回复):
对于每个步骤:
重新检查:
交付最终状态报告并注明任何延期项目。
以下操作需要明确批准:
如果不确定,请询问。
在 OpenClaw 安装或首次加固完成后,至少运行一次基线审计和版本检查:
openclaw security auditopenclaw security audit --deepopenclaw update status建议进行持续监控。使用 OpenClaw cron 工具/CLI 来安排定期审计(网关调度器)。未经明确批准,不要创建计划任务。将输出存储在用户批准的位置,避免在日志中包含秘密信息。在安排无头 cron 运行时,输出中应包含一条说明,指示用户调用 healthcheck 以便修复问题。
在任何审计或加固运行后,明确提供安排计划的选项并要求直接回应。使用简短的提示,例如(编号):
openclaw cron add 安排定期审计(例如,每日/每周)?”如果用户同意,询问:
openclaw update status使用稳定的 cron 作业名称,以便更新是确定性的。优先使用确切的名称:
healthcheck:security-audithealthcheck:update-status创建之前,运行 openclaw cron list 并精确匹配 name。如果找到,则 openclaw cron edit <id> ...。如果未找到,则 openclaw cron add --name <name> ...。
同时提供定期版本检查选项,以便用户决定何时更新(编号):
openclaw update status(适用于源码检出和渠道检查)npm view openclaw version(发布的 npm 版本)仅使用受支持的命令和标志:
openclaw security audit [--deep] [--fix] [--json]openclaw status / openclaw status --deepopenclaw health --jsonopenclaw update statusopenclaw cron add|list|runs|run不要发明 CLI 标志或暗示 OpenClaw 强制执行主机防火墙/SSH 策略。
记录:
对秘密信息进行编辑。切勿记录令牌或完整的凭据内容。
仅当用户明确选择加入且会话是私有/本地工作空间(根据 docs/reference/templates/AGENTS.md)时,才写入内存文件。否则,提供一个经过编辑、可供粘贴的摘要,供用户决定保存到其他地方。
遵循 OpenClaw 压缩使用的持久内存提示格式:
memory/YYYY-MM-DD.md。每次审计/加固运行后,如果用户选择加入,将一个简短的、带日期的摘要追加到 memory/YYYY-MM-DD.md(检查了什么、关键发现、采取的措施、任何计划的 cron 作业、关键决策以及所有执行的命令)。仅追加:切勿覆盖现有条目。编辑敏感主机详细信息(用户名、主机名、IP、序列号、服务名称、令牌)。如果有持久的偏好或决策(风险承受度、允许的端口、更新策略),也更新 MEMORY.md(长期内存是可选的,仅在私有会话中使用)。
如果会话无法写入工作空间,请求权限或提供确切的条目供用户粘贴到内存文件中。
每周安装数
526
仓库
GitHub 星标数
334.4K
首次出现
2026年2月3日
安全审计
安装于
opencode494
codex491
gemini-cli491
openclaw487
github-copilot486
cursor486
Assess and harden the host running OpenClaw, then align it to a user-defined risk tolerance without breaking access. Use OpenClaw security tooling as a first-class signal, but treat OS hardening as a separate, explicit set of steps.
Before starting, check the current model. If it is below state-of-the-art (e.g., Opus 4.5, GPT 5.2+), recommend switching. Do not block execution.
Try to infer 1–5 from the environment before asking. Prefer simple, non-technical questions if you need confirmation.
Determine (in order):
First ask once for permission to run read-only checks. If granted, run them by default and only ask questions for items you cannot infer or verify. Do not ask for information already visible in runtime or command output. Keep the permission ask as a single sentence, and list follow-up info needed as an unordered list (not numbered) unless you are presenting selectable choices.
If you must ask, use non-technical prompts:
Only ask for the risk profile after system context is known.
If the user grants read-only permission, run the OS-appropriate checks by default. If not, offer them (numbered). Examples:
uname -a, sw_vers, cat /etc/os-release.ss -ltnup (or ss -ltnp if -u unsupported).lsof -nP -iTCP -sTCP:LISTEN.ufw status, firewall-cmd --state, nft list ruleset (pick what is installed).As part of the default read-only checks, run openclaw security audit --deep. Only offer alternatives if the user requests them:
openclaw security audit (faster, non-probing)openclaw security audit --json (structured output)Offer to apply OpenClaw safe defaults (numbered):
openclaw security audit --fixBe explicit that --fix only tightens OpenClaw defaults and file permissions. It does not change host firewall, SSH, or OS update policies.
If browser control is enabled, recommend that 2FA be enabled on all important accounts, with hardware keys preferred and SMS not sufficient.
As part of the default read-only checks, run openclaw update status.
Report the current channel and whether an update is available.
Ask the user to pick or confirm a risk posture and any required open services/ports (numbered choices below). Do not pigeonhole into fixed profiles; if the user prefers, capture requirements instead of choosing a profile. Offer suggested profiles as optional defaults (numbered). Note that most users pick Home/Workstation Balanced:
Provide a plan that includes:
Always show the plan before any changes.
Offer one of these choices (numbered so users can reply with a single digit):
For each step:
Re-check:
Deliver a final posture report and note any deferred items.
Require explicit approval for:
If unsure, ask.
After OpenClaw install or first hardening pass, run at least one baseline audit and version check:
openclaw security auditopenclaw security audit --deepopenclaw update statusOngoing monitoring is recommended. Use the OpenClaw cron tool/CLI to schedule periodic audits (Gateway scheduler). Do not create scheduled tasks without explicit approval. Store outputs in a user-approved location and avoid secrets in logs. When scheduling headless cron runs, include a note in the output that instructs the user to call healthcheck so issues can be fixed.
After any audit or hardening pass, explicitly offer scheduling and require a direct response. Use a short prompt like (numbered):
openclaw cron add?”If the user says yes, ask for:
openclaw update statusUse a stable cron job name so updates are deterministic. Prefer exact names:
healthcheck:security-audithealthcheck:update-statusBefore creating, openclaw cron list and match on exact name. If found, openclaw cron edit <id> .... If not found, openclaw cron add --name <name> ....
Also offer a periodic version check so the user can decide when to update (numbered):
openclaw update status (preferred for source checkouts and channels)npm view openclaw version (published npm version)Use only supported commands and flags:
openclaw security audit [--deep] [--fix] [--json]openclaw status / openclaw status --deepopenclaw health --jsonopenclaw update statusopenclaw cron add|list|runs|runDo not invent CLI flags or imply OpenClaw enforces host firewall/SSH policies.
Record:
Redact secrets. Never log tokens or full credential contents.
Only write to memory files when the user explicitly opts in and the session is a private/local workspace (per docs/reference/templates/AGENTS.md). Otherwise provide a redacted, paste-ready summary the user can decide to save elsewhere.
Follow the durable-memory prompt format used by OpenClaw compaction:
memory/YYYY-MM-DD.md.After each audit/hardening run, if opted-in, append a short, dated summary to memory/YYYY-MM-DD.md (what was checked, key findings, actions taken, any scheduled cron jobs, key decisions, and all commands executed). Append-only: never overwrite existing entries. Redact sensitive host details (usernames, hostnames, IPs, serials, service names, tokens). If there are durable preferences or decisions (risk posture, allowed ports, update policy), also update MEMORY.md (long-term memory is optional and only used in private sessions).
If the session cannot write to the workspace, ask for permission or provide exact entries the user can paste into the memory files.
Weekly Installs
526
Repository
GitHub Stars
334.4K
First Seen
Feb 3, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode494
codex491
gemini-cli491
openclaw487
github-copilot486
cursor486
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate and pfctl -s info.tmutil status (if Time Machine is used).