Bookmark Organize
by @xiaoshidefeng
Organize Chrome bookmarks through OpenClaw with preview, explicit confirmation, apply, undo, and a local Chrome executor bridge. Use for conservative Chrome...
clawhub install bookmark-organize📖 About This Skill
name: bookmark-organize description: Organize Chrome bookmarks through OpenClaw with preview, explicit confirmation, apply, undo, and a local Chrome executor bridge. Use for conservative Chrome bookmark cleanup and folder organization. version: 0.1.0 license: MIT homepage: https://github.com/xiaoshidefeng/bookmark-organize-skill category: productivity emoji: 🔖 usage: /skill bookmark-organize [natural-language bookmark organization request] user-invocable: true requires: - macOS - Node.js 18 or newer - Google Chrome - Manual one-time loading of the bundled unpacked Chrome executor extension metadata: openclaw: emoji: 🔖 os: - darwin
ClawHub Package Notes
This ClawHub build is self-contained. The installed skill folder includes:
bridges/ for the local bridge server and preflight scriptsapps/chrome-executor-extension/ for the bundled unpacked Chrome executor extensionpackage.json with the local bridge dependencyWhen this skill says , use the installed ClawHub skill folder containing this SKILL.md file.
Do not symlink or modify OpenClaw configuration during setup. ClawHub/OpenClaw owns skill installation. The only manual browser step is loading the bundled Chrome executor extension once from the installed skill folder.
Bookmark Organize
这是一个“计划优先、显式确认、桥接执行”的技能,不是普通聊天提示。
Host Workflow
The host should treat this skill as an operational workflow, not just extra prose.
Invocation:
/skill bookmark-organize [自然语言整理需求]/bookmark_organize ...; skill command names are sanitized, so /bookmark-organize ... may not exist.User-facing modes:
setup or doctor: run the setup/doctor flow, open Chrome extension settings if needed, and report the next single user actionorganize or any natural-language cleanup request: run doctor/preflight first, then preview a planapply: run bridge:ensure-live, validate the latest plan, then apply only after explicit confirmationundo: run bridge:ensure-live, call POST /undo, and report the bridge resultShortest safe path:
1. run the local preflight wrapper from this skill folder
2. fetch live bookmark context from POST /context
3. generate a conservative preview
4. wait for explicit confirmation
5. run bridge:ensure-live again before any apply or undo
6. call POST /validate
7. call POST /apply or POST /undo
8. report only bridge-verified results
Portable preflight command:
node /scripts/run-repo-script.mjs bridge:preflight
Portable first-run setup command:
node /scripts/run-repo-script.mjs setup
When installed from ClawHub, is the installed skill folder containing this SKILL.md file.
For local end-to-end verification, prefer:
node /scripts/run-repo-script.mjs test:e2e
Purpose
Help the user organize Chrome bookmarks through natural language.
The host AI should:
1. talk to the user in natural language 2. ask the Chrome executor extension for bookmark context 3. produce a structured action plan 4. preview the plan before any mutation 5. ask for explicit confirmation 6. apply the plan through the Chrome bridge 7. offer undo after a successful apply
Important Rules
Mandatory Preflight
Before planning, validation, apply, or undo, the host AI should run a local preflight.
Preferred command:
node /scripts/run-repo-script.mjs bridge:preflight
The preflight is responsible for:
1. starting the local bridge server if it is not running 2. refreshing the unpacked Chrome extension when needed 3. verifying that live bookmark context can be fetched
If preflight fails, stop and explain that execution has not happened yet.
Preflight is not optional even if a previous turn said the bridge looked healthy.
Before POST /validate, POST /apply, or POST /undo, prefer the stronger live gate:
node /scripts/run-repo-script.mjs bridge:ensure-live
If this command succeeds, continue the current operation. If it fails, stop and tell the user no mutation happened.
If this is the user's first run, or if preflight says needsManualInstall: true, run:
node /scripts/run-repo-script.mjs setup
Then tell the user to load the unpacked Chrome extension folder printed by the setup command and reply 好了.
Do not show the first-run install instructions merely because executorConnected is false.
Use /health and preflight output to choose the recovery message:
/health has executor.extensionVersion or executor.lastSeenAt, the extension is already installed or has checked in before. Treat this as a sleeping/disconnected MV3 worker. Run bridge:ensure-live or bridge:preflight; if recovery still fails, ask the user to reload the existing Bookmark Organize Executor card on chrome://extensions, not to click 加载已解压的扩展程序 again./health does not have executor.extensionVersion and does not have executor.lastSeenAt, or preflight says needsManualInstall: true, treat it as first-run install and use the manual install prompt below.Use this user-facing wording only when the extension is not installed:
我需要你完成唯一一步浏览器授权操作:
1. 在已打开的 chrome://extensions 页面开启「开发者模式」
2. 点击「加载已解压的扩展程序」
3. 选择 setup 输出的 Chrome executor extension 文件夹加载完成后回复「好了」,我会自动继续检查连接并读取书签。
Use this user-facing wording when the extension was seen before but is currently disconnected:
Chrome executor 扩展已经安装过,但当前后台连接休眠/断开了。我会先自动唤醒并重连。
如果自动恢复仍失败,请在 chrome://extensions 里找到 Bookmark Organize Executor,点击该扩展卡片右下角的重新加载按钮,然后回复「好了」。
我还没有实际修改你的书签。
Mandatory Execution Guardrails
Before claiming any of the following:
you must first verify with the local bridge.
Required bridge checks:
1. Run node
2. Check http://127.0.0.1:8787/health
3. Ensure executorConnected is true
4. Fetch live context from POST /context
5. Use bridge endpoints to validate actions, apply actions, or undo actions
6. Report only the results returned by the bridge
If the bridge is unavailable, say that execution has not happened yet.
Local Bridge
Preferred local bridge:
http://127.0.0.1:8787GET /healthPOST /contextPOST /validatePOST /applyPOST /undoThe Chrome executor extension folder is:
/apps/chrome-executor-extension The local bridge server can be started from:
with:
npm run bridge:server
Preferred recovery command:
npm run bridge:preflight
Supported Actions
create_foldermove_bookmarkrename_bookmarkrename_folderPlanning Guidance
When generating a plan:
create_folder, move_bookmark, and rename_bookmark in one single action list and one single POST /apply; do not split the test into multiple apply calls because only the latest apply has an undo tokentargetPath with the newly-created folder path instead of waiting for a folder idWhen the user asks to organize bookmarks:
1. run preflight
2. if preflight fails, guide setup and stop
3. fetch live bookmark context
4. generate a conservative structured plan
5. preview the plan
6. wait for explicit confirmation
7. run bridge:ensure-live again before apply
8. apply only after confirmation
9. summarize actual bridge results
Confirmation Flow
After previewing a plan, allow the user to respond with short commands such as:
Setup Guidance
If the Chrome executor extension is unavailable, first check whether it was seen before:
/health includes executor.extensionVersion or executor.lastSeenAt, do not run first-run setup unless the user explicitly asks. Run bridge:ensure-live; if it still fails, ask the user to reload the existing extension card./health has neither executor.extensionVersion nor executor.lastSeenAt, guide the user with first-run setup:1. run node
2. tell the user to open the extension page if it did not open automatically
3. tell the user to enable Developer Mode
4. tell the user to choose Load unpacked
5. tell the user to select the extension folder printed by setup
6. ask the user to reply 好了
7. after the user replies, run node
Then ask the user to reply with 已安装 or installed.
Verification Commands
Use these commands when you need to verify the environment instead of guessing:
node /scripts/run-repo-script.mjs bridge:preflight
node /scripts/run-repo-script.mjs bridge:ensure-live
node /scripts/run-repo-script.mjs bridge:smoke
node /scripts/run-repo-script.mjs test:local
node /scripts/run-repo-script.mjs test:e2e
Output Contract
The host AI should generate a structured plan with:
summarywarningsactionsEach action must include an actionId.
Response Style
我准备这样整理 before apply我已经通过本地桥接执行完成 only after verified bridge success我还没有实际修改你的书签