Search the OD Library (the global asset registry) and apply matching assets into the current project mid-task. Use when the user asks to reuse an image they cap
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-library-curator-23017fa2f3d2 ,按照其中的说明把「library-curator」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Reuse assets that already live in the user's OD Library — images captured with the OD Clipper, manual uploads, agent-generated media, and design-system material — without asking the user to re-upload them.
Both endpoints authenticate with the run's tool token (OD_TOOL_TOKEN, injected
by the daemon) and operate on the project the run belongs to.
POST /api/tools/library/search
{ "query": "blue hero background", "kind": "image", "limit": 20 }
Returns { "results": [{ "asset": { "id": "...", "kind": "image", "sourceTitle": "...", "width": 1600, "height": 900, "sources": [...] }, "score": 0 }], "semantic": false }.
semantic: false means keyword/metadata matching (no embedding model
configured). Filter and rank the results yourself from the asset metadata.
POST /api/tools/library/apply
{ "assetId": "<id from search>", "dir": "assets" }
Copies the asset into the project (default subdir library/, or the dir you
pass) and returns { "relPath": "assets/<hash>.png" }. Reference that
relPath from the HTML/CSS you write (e.g. <img src="assets/ab12cd34ef.png">).
If search returns nothing, fall back to media generation rather than guessing a
path — never invent a relPath that apply did not return.