byted-security-clawsentry

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ClawSentry

ClawSentry

Agent Rules

Agent 规则

IMPORTANT: You MUST follow these steps EXACTLY when using this skill:
  1. FIRST: Verify Node.js is installed on the system (version 14 or higher).
  2. SECOND: Execute the script
    node {baseDir}/scripts/bundle.js
    .
  3. THIRD: Verify the script executed successfully by checking:
    • Check the script exit code: 0 means success, non-0 means failure
    • Look for success output: "Login URL generated successfully:" in the script output
    • Look for the line that starts with
      [LOGIN_URL]:
      in the script output
    • Check if
      {baseDir}/.state/login_state.json
      file exists and contains a valid
      loginUrl
      field
    • If the file doesn't exist, wait a few seconds and try again
    • If you can't find the files, try looking in
      .openclaw/skills/ClawSentry/scripts/
      directory
  4. FOURTH: After confirming the script succeeded, get the login URL using ONE of these methods (in this priority order):
    • Extract from the script output by looking for the line that starts with
      [LOGIN_URL]:
    • Read from
      {baseDir}/.state/login_state.json
      file (look for the
      loginUrl
      field)
  5. FIFTH: Send the login URL to the user along with this message: "After completing login, please send me a message saying you have successfully logged in (e.g., '我已经注册成功了', '我已经登录成功了', '我已经注册好了', '登录好了', '登录上了')."
  6. SIXTH: After sending the login URL to the user, you MUST perform the following monitoring for 10 minutes (600 seconds): a. EVERY MINUTE, check if the process
    bundle.js --login-token
    is running using the command:
    ps aux | grep "bundle.js --login-token"
    b. If the process IS running: continue monitoring until the 10 minutes expire c. If the process IS NOT running: i. Read
    {baseDir}/.state/login_state.json
    file and check the
    enable
    field ii. If
    enable
    is
    true
    : END the conversation immediately iii. If
    enable
    is
    false
    : - Read
    loginToken
    and
    deviceFingerprint
    from
    {baseDir}/.state/login_state.json
    - Restart the process with:
    node {baseDir}/scripts/bundle.js --login-token [loginToken] --device-fingerprint [deviceFingerprint]
    d. Stop monitoring after 10 minutes have elapsed
DO NOT skip any steps. DO NOT modify the order of steps. ALWAYS verify the script succeeded before proceeding.
重要提示:使用本技能时必须严格遵循以下步骤,不得偏离:
  1. 第一步:验证系统上已安装Node.js(版本14或更高)。
  2. 第二步:执行脚本
    node {baseDir}/scripts/bundle.js
  3. 第三步:通过以下检查项确认脚本执行成功:
    • 检查脚本退出码:0代表成功,非0代表失败
    • 查找成功输出:脚本输出中存在"Login URL generated successfully:"
    • 查找脚本输出中以
      [LOGIN_URL]:
      开头的行
    • 检查
      {baseDir}/.state/login_state.json
      文件是否存在,且包含有效的
      loginUrl
      字段
    • 如果文件不存在,等待数秒后重试
    • 如果找不到对应文件,可以尝试在
      .openclaw/skills/ClawSentry/scripts/
      目录下查找
  4. 第四步:确认脚本执行成功后,通过以下任一方式获取登录URL(优先级按顺序排列):
    • 从脚本输出中提取以
      [LOGIN_URL]:
      开头的行的内容
    • 读取
      {baseDir}/.state/login_state.json
      文件中的
      loginUrl
      字段
  5. 第五步:将登录URL发送给用户,同时附带以下提示:"登录完成后,请发送消息告知我你已成功登录(例如:'我已经注册成功了'、'我已经登录成功了'、'我已经注册好了'、'登录好了'、'登录上了')。"
  6. 第六步:向用户发送登录URL后,你必须执行10分钟(600秒)的监控: a. 每分钟执行命令
    ps aux | grep "bundle.js --login-token"
    检查
    bundle.js --login-token
    进程是否正在运行 b. 如果进程正在运行:持续监控直到10分钟结束 c. 如果进程未运行: i. 读取
    {baseDir}/.state/login_state.json
    文件,检查
    enable
    字段 ii. 如果
    enable
    true
    :立即结束会话 iii. 如果
    enable
    false
    :- 从
    {baseDir}/.state/login_state.json
    中读取
    loginToken
    deviceFingerprint
    - 执行以下命令重启进程:
    node {baseDir}/scripts/bundle.js --login-token [loginToken] --device-fingerprint [deviceFingerprint]
    d. 10分钟后停止监控
请勿跳过任何步骤,请勿修改步骤顺序。在继续操作前务必验证脚本执行成功。

Use Cases

使用场景

  • Use this skill when you need to install and prepare the
    ai-assistant-security-openclaw
    plugins for the OpenClaw environment on the current machine.
  • Trigger this skill when the user mentions requirements such as "install clawSentry / ai-assistant-security-openclaw plugin / install byted-security-clawsentry / 使用byted-security-clawsentry技能安装安全插件".
  • 当你需要为当前机器的OpenClaw环境安装并配置
    ai-assistant-security-openclaw
    插件时,使用本技能。
  • 当用户提到类似"安装clawSentry / ai-assistant-security-openclaw插件 / 安装byted-security-clawsentry / 使用byted-security-clawsentry技能安装安全插件"等需求时,触发本技能。

Steps

操作步骤

1. Verify Node.js is installed:

1. 验证Node.js已安装:

Ensure Node.js (version 14 or higher) is installed on the system. You can check with:
bash
node --version
确保系统已安装Node.js(版本14或更高),可以通过以下命令检查:
bash
node --version

2. Execute the combined script to install plugin and generate login link:

2. 执行整合脚本安装插件并生成登录链接:

bash
node {baseDir}/scripts/bundle.js
After the script completes:
  • The script will display the login URL directly. You can also extract it from the output by looking for the line that starts with
    [LOGIN_URL]:
  • You can also read the login URL from
    {baseDir}/.state/login_state.json
    file (look for the
    loginUrl
    field). If the file doesn't exist, try reading it again after a few seconds. If you can't find the files, try looking in
    .openclaw/skills/ClawSentry/scripts/
    directory.
  • Send the login URL to the user along with this message: "After completing login, please send me a message saying you have successfully logged in (e.g., '我已经注册成功了', '我已经登录成功了', '我已经注册好了', '登录好了', '登录上了')."
bash
node {baseDir}/scripts/bundle.js
脚本执行完成后:
  • 脚本会直接展示登录URL,你也可以从输出中提取以
    [LOGIN_URL]:
    开头的行的内容获取
  • 你也可以从
    {baseDir}/.state/login_state.json
    文件中读取
    loginUrl
    字段获取登录URL。如果文件不存在,等待数秒后重试读取。如果找不到对应文件,可以尝试在
    .openclaw/skills/ClawSentry/scripts/
    目录下查找。
  • 将登录URL发送给用户,同时附带以下提示:"登录完成后,请发送消息告知我你已成功登录(例如:'我已经注册成功了'、'我已经登录成功了'、'我已经注册好了'、'登录好了'、'登录上了')。"