Organizing Edge Bookmarks
Treat the live browser bookmark model as the source of truth. The raw Bookmarks file is a fallback artifact, not the preferred write path.
When to Use
✅ USE this skill when:
- - The user wants Microsoft Edge bookmarks/favorites reorganized
- The result must survive reload or restart
- Previous bookmark edits were reverted, appended, or emptied after restart/sync
- The user wants priority folders such as
AI, Investing, Social, Tools, Resources, or INLINECODE6
❌ DON'T use this skill when:
- - The task is generic browser automation unrelated to bookmarks
- The user wants a plugin/extension instead of direct bookmark organization
- The target browser is not Microsoft Edge
Core Principle
If a live-profile path exists, use it.
Avoid raw Bookmarks JSON edits by default because Edge can rebuild the visible tree from its live model and sync state.
This skill is for local, same-machine execution only. If the agent is not running on the same Mac as the target Edge profile, stop and switch to a manual checklist instead of inventing a remote control path.
Runtime Preconditions
- - Validated target: local macOS host with Microsoft Edge installed
- Use this skill only when an approved local control path has already been proven in the current session
- Acceptable proven control paths include:
- a live browser bookmark API already verified against the visible tree
- a local browser automation tool already present and authorized
- a browser-native scripting path already demonstrated to work in this session
- - If the control path is not already proven, do not infer one from this skill
- If the task would require undefined remote access, stop and switch to manual operator instructions
Required Workflow
- 1. Identify the exact target
- Confirm the exact Edge profile by name/path.
- Confirm whether the scope is the bookmarks bar, other bookmarks, or both.
- Confirm whether nested folders are in scope.
- If profile or root scope is ambiguous, ask before moving anything.
- 2. Turn the request into explicit buckets
- Convert vague priorities into named folders such as
AI,
Investing,
Social,
Tools,
Resources,
Archive.
- Default assumption:
AI,
Investing, and
Social are top-level priority folders unless the user says otherwise.
- Use deterministic tie-breaks for multi-category bookmarks: primary purpose first, current user priority second, otherwise move to
Archive or
Review.
- 3. Create a rollback point before mutation
- Capture a baseline snapshot/export of the live bookmark tree.
- Record total bookmark count and target root counts.
- Record a dry-run move plan or mutation ledger before the first write.
- If a safe baseline cannot be captured, stop.
- 4. Require explicit consent for intrusive actions
- Before quitting Edge, relaunching a profile, attaching to a live page, or running in-browser bookmark mutations, confirm the user explicitly approved those intrusive steps.
- If the user did not approve browser restart or live profile control, downgrade to manual instructions.
- 5. Do not start with raw file edits
- Do not use
Bookmarks JSON as the primary path.
- Do not mix file edits and UI/model edits in one pass.
- If a prior file edit already rolled back, treat that as proof the path is unsafe.
- 6. Prefer the live browser model
- Operate inside the real Edge profile if possible.
- Enforce a single-writer rule: fully close other Edge instances/background writers before a controlled relaunch of the same profile.
- If needed, capture current tabs, relaunch the same real profile in a controllable mode, and attach to it.
- Prefer browser-native bookmark APIs such as
chrome.bookmarks.
- Select and move bookmarks by stable node IDs plus parent/root context, not by titles alone.
- If the browser-native API is unavailable or does not match the visible bookmark state, stop treating it as authoritative.
- 7. Use UI automation only as fallback
-
edge://favorites/ may expose weak accessibility structure.
- If the UI is not semantically controllable, stop instead of guessing with destructive clicks.
- If UI automation is used, reconcile the result against the live bookmark tree afterward.
- 8. Verify persistence
- Inspect sync state before mutation; if sync state is unclear or the tree is still changing, wait or stop.
- Re-read the live bookmark tree immediately after applying moves.
- Compare the intended structure against the actual structure, not just counts.
- Reload the favorites page and verify again.
- Restart Edge normally, reopen the same profile, and verify again.
- If sync is enabled, allow one sync reconciliation cycle and verify once more.
Safety Rules
- - Never delete on the first pass unless the user explicitly asks.
- Never assume browser restart or profile takeover permission just because the user asked for bookmark organization; intrusive control needs explicit approval.
- Prefer
Archive or Review for uncertain items. - Preserve counts unless deduplication is explicitly requested.
- Do not deduplicate, merge, or remove duplicates on the first pass.
- Do not rename bookmarks or folders on the first pass unless explicitly requested.
- Do not assume Apple Events JavaScript support is working just because a menu item exists.
- Do not assume a valid
Bookmarks checksum means persistence is safe. - Stop immediately on profile mismatch, unreadable bookmark tree, structural diff mismatch after apply, count mismatch after apply, or sync reversion.
Credentials and Dependencies
- - This skill does not require external API tokens or cloud credentials.
- It assumes access only to the user-approved local Edge profile and already-approved local automation tooling.
- If your intended path depends on a binary, extension, debugger port, or automation runtime that is not already present and verified, stop and document that dependency explicitly before proceeding.
Common Mistakes
Editing Bookmarks directly first
Why it fails:
- - Edge may rebuild the visible tree from live model state or sync metadata.
Better:
- - Use the live browser bookmark model first.
Trusting edge://favorites/ accessibility blindly
Why it fails:
- - The page may not expose stable drag-and-drop controls.
Better:
- - Probe control surfaces first and downgrade to manual instructions if the page is opaque.
Treating sync as an afterthought
Why it fails:
- - Correct in-session state can still be overwritten by restart or sync reconciliation.
Better:
- - Inspect sync before mutation and verify again after restart and sync settlement.
Moving by visible title only
Why it fails:
- - Duplicate titles and repeated folder names can send items to the wrong place while counts still look correct.
Better:
- - Move by bookmark node ID with root/path context and verify with an exact structural diff.
Assuming an undefined automation toolchain
Why it fails:
- - High-impact browser actions become unsafe when the skill implies capabilities that have not been proven on the current machine.
Better:
- - Prove the local automation path first. If you cannot prove it in the current session, stop and fall back to manual operator instructions.
Quick Reference
- - Persistent bookmark reorganization → inspect profile/sync state, then prefer live bookmark model
- Prior file edit rolled back → do not retry raw file editing as the primary path
- Category cleanup → define deterministic top-level buckets first
- Uncertain bookmark → archive/review, do not delete
- Existing folders already exist → reuse or merge deliberately, do not create blind parallel folders
Reference
整理Edge书签
将实时浏览器书签模型视为数据源。原始的Bookmarks文件是备用产物,而非首选写入路径。
使用时机
✅ 在以下情况使用此技能:
- - 用户希望重新整理Microsoft Edge书签/收藏夹
- 结果必须在重新加载或重启后仍然保留
- 之前的书签编辑在重启/同步后被还原、追加或清空
- 用户希望有优先级文件夹,如AI、投资、社交、工具、资源或归档
❌ 在以下情况不要使用此技能:
- - 任务是与书签无关的通用浏览器自动化
- 用户希望使用插件/扩展而非直接整理书签
- 目标浏览器不是Microsoft Edge
核心原则
如果存在实时配置文件路径,则使用它。
默认避免直接编辑Bookmarks JSON,因为Edge可以从其实时模型和同步状态重建可见树。
此技能仅适用于本地、同一台机器执行。如果代理未在与目标Edge配置文件相同的Mac上运行,请停止并切换到手动检查清单,而不是自行创建远程控制路径。
运行时前置条件
- - 已验证目标:安装了Microsoft Edge的本地macOS主机
- 仅当在当前会话中已验证了经批准的本地控制路径时,才使用此技能
- 可接受的已验证控制路径包括:
- 已针对可见树验证过的实时浏览器书签API
- 已存在并授权的本地浏览器自动化工具
- 已在当前会话中证明有效的浏览器原生脚本路径
- - 如果控制路径尚未验证,请勿从此技能推断
- 如果任务需要未定义的远程访问,请停止并切换到手动操作说明
必需工作流程
- 1. 确定确切目标
- 通过名称/路径确认确切的Edge配置文件。
- 确认范围是书签栏、其他书签还是两者都包括。
- 确认嵌套文件夹是否在范围内。
- 如果配置文件或根范围不明确,在移动任何内容前先询问。
- 2. 将请求转化为明确的分类
- 将模糊的优先级转化为命名文件夹,如AI、投资、社交、工具、资源、归档。
- 默认假设:除非用户另有说明,AI、投资和社交是顶级优先级文件夹。
- 对多类别书签使用确定性优先级规则:首先按主要用途,其次按当前用户优先级,否则移至归档或待审。
- 3. 在修改前创建回滚点
- 捕获实时书签树的基线快照/导出。
- 记录总书签数和目标根目录计数。
- 在首次写入前记录预演移动计划或修改台账。
- 如果无法捕获安全的基线,请停止。
- 4. 侵入性操作需要明确同意
- 在退出Edge、重新启动配置文件、附加到实时页面或在浏览器内执行书签修改前,确认用户已明确批准这些侵入性步骤。
- 如果用户未批准浏览器重启或实时配置文件控制,降级为手动说明。
- 5. 不要从原始文件编辑开始
- 不要将Bookmarks JSON作为主要路径。
- 不要在一次操作中混合文件编辑和UI/模型编辑。
- 如果之前的文件编辑已被回滚,将其视为该路径不安全的证据。
- 6. 优先使用实时浏览器模型
- 尽可能在真实的Edge配置文件内操作。
- 强制执行单一写入者规则:在受控重新启动同一配置文件前,完全关闭其他Edge实例/后台写入者。
- 如有需要,捕获当前标签页,以可控模式重新启动同一真实配置文件,并附加到它。
- 优先使用浏览器原生书签API,如chrome.bookmarks。
- 通过稳定的节点ID加上父/根上下文来选择并移动书签,而不仅仅依靠标题。
- 如果浏览器原生API不可用或与可见书签状态不匹配,停止将其视为权威。
- 7. 仅将UI自动化作为备用方案
- edge://favorites/可能暴露较弱的可访问性结构。
- 如果UI在语义上不可控,请停止,而不是通过破坏性点击进行猜测。
- 如果使用了UI自动化,之后需将结果与实时书签树进行核对。
- 8. 验证持久性
- 在修改前检查同步状态;如果同步状态不明确或树仍在变化,请等待或停止。
- 应用移动后立即重新读取实时书签树。
- 将预期结构与实际结构进行比较,而不仅仅是计数。
- 重新加载收藏夹页面并再次验证。
- 正常重启Edge,重新打开同一配置文件,并再次验证。
- 如果启用了同步,允许一个同步协调周期,并再次验证。
安全规则
- - 除非用户明确要求,否则首次操作绝不删除。
- 不要仅仅因为用户要求整理书签就假设获得了浏览器重启或配置文件接管权限;侵入性控制需要明确批准。
- 对不确定的项目优先使用归档或待审。
- 除非明确要求去重,否则保留计数。
- 首次操作不要进行去重、合并或删除重复项。
- 除非明确要求,否则首次操作不要重命名书签或文件夹。
- 不要仅仅因为菜单项存在就假设Apple Events JavaScript支持正常工作。
- 不要假设有效的Bookmarks校验和意味着持久性是安全的。
- 在配置文件不匹配、书签树不可读、应用后结构差异不匹配、应用后计数不匹配或同步回滚时立即停止。
凭据和依赖项
- - 此技能不需要外部API令牌或云凭据。
- 它假设仅访问用户批准的本地Edge配置文件和已批准的本地自动化工具。
- 如果您打算使用的路径依赖于尚未存在且未经验证的二进制文件、扩展、调试器端口或自动化运行时,请停止并在继续前明确记录该依赖项。
常见错误
首先直接编辑Bookmarks
失败原因:
- - Edge可能从实时模型状态或同步元数据重建可见树。
更好做法:
盲目信任edge://favorites/的可访问性
失败原因:
更好做法:
- - 首先探测控制界面,如果页面不透明则降级为手动说明。
将同步视为事后考虑
失败原因:
更好做法:
- - 在修改前检查同步,并在重启和同步稳定后再次验证。
仅通过可见标题移动
失败原因:
- - 重复标题和重复的文件夹名称可能将项目发送到错误位置,而计数看起来仍然正确。
更好做法:
- - 通过书签节点ID加上根/路径上下文进行移动,并通过精确的结构差异进行验证。
假设未定义的自动化工具链
失败原因:
- - 当技能暗示了在当前机器上尚未验证的功能时,高影响的浏览器操作变得不安全。
更好做法:
- - 首先验证本地自动化路径。如果无法在当前会话中验证,请停止并回退到手动操作说明。
快速参考
- - 持久性书签重新整理 → 检查配置文件/同步状态,然后优先使用实时书签模型
- 之前的文件编辑已回滚 → 不要重试原始文件编辑作为主要路径
- 类别清理 → 首先定义确定性的顶级分类
- 不确定的书签 → 归档/待审,不要删除
- 现有文件夹已存在 → 有意重用或合并,不要盲目创建平行文件夹
参考
- - references/edge-bookmarks-workflow.md