byted-security-clawsentry
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClawSentry
ClawSentry
Agent Rules
Agent 规则
IMPORTANT: You MUST follow these steps EXACTLY when using this skill:
-
FIRST: Verify Node.js is installed on the system (version 14 or higher).
-
SECOND: Execute the script.
node {baseDir}/scripts/bundle.js -
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 in the script output
[LOGIN_URL]: - Check if file exists and contains a valid
{baseDir}/.state/login_state.jsonfieldloginUrl - If the file doesn't exist, wait a few seconds and try again
- If you can't find the files, try looking in directory
.openclaw/skills/ClawSentry/scripts/
-
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 file (look for the
{baseDir}/.state/login_state.jsonfield)loginUrl
- Extract from the script output by looking for the line that starts with
-
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., '我已经注册成功了', '我已经登录成功了', '我已经注册好了', '登录好了', '登录上了')."
-
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 processis running using the command:
bundle.js --login-tokenb. If the process IS running: continue monitoring until the 10 minutes expire c. If the process IS NOT running: i. Readps aux | grep "bundle.js --login-token"file and check the{baseDir}/.state/login_state.jsonfield ii. Ifenableisenable: END the conversation immediately iii. Iftrueisenable: - ReadfalseandloginTokenfromdeviceFingerprint- Restart the process with:{baseDir}/.state/login_state.jsond. Stop monitoring after 10 minutes have elapsednode {baseDir}/scripts/bundle.js --login-token [loginToken] --device-fingerprint [deviceFingerprint]
DO NOT skip any steps. DO NOT modify the order of steps. ALWAYS verify the script succeeded before proceeding.
重要提示:使用本技能时必须严格遵循以下步骤,不得偏离:
-
第一步:验证系统上已安装Node.js(版本14或更高)。
-
第二步:执行脚本。
node {baseDir}/scripts/bundle.js -
第三步:通过以下检查项确认脚本执行成功:
- 检查脚本退出码:0代表成功,非0代表失败
- 查找成功输出:脚本输出中存在"Login URL generated successfully:"
- 查找脚本输出中以开头的行
[LOGIN_URL]: - 检查文件是否存在,且包含有效的
{baseDir}/.state/login_state.json字段loginUrl - 如果文件不存在,等待数秒后重试
- 如果找不到对应文件,可以尝试在目录下查找
.openclaw/skills/ClawSentry/scripts/
-
第四步:确认脚本执行成功后,通过以下任一方式获取登录URL(优先级按顺序排列):
- 从脚本输出中提取以开头的行的内容
[LOGIN_URL]: - 读取文件中的
{baseDir}/.state/login_state.json字段loginUrl
- 从脚本输出中提取以
-
第五步:将登录URL发送给用户,同时附带以下提示:"登录完成后,请发送消息告知我你已成功登录(例如:'我已经注册成功了'、'我已经登录成功了'、'我已经注册好了'、'登录好了'、'登录上了')。"
-
第六步:向用户发送登录URL后,你必须执行10分钟(600秒)的监控: a. 每分钟执行命令检查
ps aux | grep "bundle.js --login-token"进程是否正在运行 b. 如果进程正在运行:持续监控直到10分钟结束 c. 如果进程未运行: i. 读取bundle.js --login-token文件,检查{baseDir}/.state/login_state.json字段 ii. 如果enable为enable:立即结束会话 iii. 如果true为enable:- 从false中读取{baseDir}/.state/login_state.json和loginToken- 执行以下命令重启进程:deviceFingerprintd. 10分钟后停止监控node {baseDir}/scripts/bundle.js --login-token [loginToken] --device-fingerprint [deviceFingerprint]
请勿跳过任何步骤,请勿修改步骤顺序。在继续操作前务必验证脚本执行成功。
Use Cases
使用场景
- Use this skill when you need to install and prepare the plugins for the OpenClaw environment on the current machine.
ai-assistant-security-openclaw - 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 --version2. Execute the combined script to install plugin and generate login link:
2. 执行整合脚本安装插件并生成登录链接:
bash
node {baseDir}/scripts/bundle.jsAfter 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 file (look for the
{baseDir}/.state/login_state.jsonfield). If the file doesn't exist, try reading it again after a few seconds. If you can't find the files, try looking inloginUrldirectory..openclaw/skills/ClawSentry/scripts/ - 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字段获取登录URL。如果文件不存在,等待数秒后重试读取。如果找不到对应文件,可以尝试在loginUrl目录下查找。.openclaw/skills/ClawSentry/scripts/ - 将登录URL发送给用户,同时附带以下提示:"登录完成后,请发送消息告知我你已成功登录(例如:'我已经注册成功了'、'我已经登录成功了'、'我已经注册好了'、'登录好了'、'登录上了')。"