mcpField
F
felo-livedoc

felo-livedoc

github.com/felo-inc生产力25084 次安装14 周前更新
代码仓库

关于 felo-livedoc

felo-livedoc 是用于管理 LiveDoc 知识库及其资源、任务的技能,适合组织文档并进行语义检索的用户。它还支持 README 管理、资源定位和任务评论等操作。

主要功能

  1. 01创建和管理 LiveDoc
  2. 02添加、查看及删除资源
  3. 03按查询进行语义检索
  4. 04管理 README 和任务
  5. 05查看任务记录并添加评论

适用场景

  1. 01整理文档和网页资源
  2. 02从资源中检索相关内容
  3. 03跟踪任务并记录评论

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/felo-inc/felo-skills --skill felo-livedoc

安装后在 Claude Code 中输入/felo-livedoc确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

clawhub.json
LICENSE
README.md
scripts/
run_livedoc.mjs

详细介绍

Felo LiveDoc 技能

使用时机

在用户想要执行以下操作时触发此技能:

  • 创建/管理知识库: 创建、列出、更新或删除 LiveDoc
  • 添加资源: 在 LiveDoc 中上传文档、添加 URL 或创建文本文档
  • 语义检索: 使用自然语言查询搜索知识库资源
  • 路由资源: 根据查询查找相关资源 ID,以便定向检索
  • 资源管理: 列出、查看或删除 LiveDoc 中的资源
  • README 管理: 获取、创建、更新、追加或删除 LiveDoc 的 README
  • 任务管理: 创建、更新、删除任务;添加评论;查看变更历史

触发词:

  • English: knowledge base, livedoc, live doc, upload document, add URL, semantic search, retrieve, knowledge retrieval, route resources, readme, task, task management, comment
  • 简体中文:知识库, 文档库, 上传文档, 添加链接, 语义检索, 知识检索, 任务, 任务管理, 评论

明确命令: /felo-livedoc、"livedoc"、"felo livedoc"

请勿用于:

  • 一般网络搜索(使用 felo-search)
  • PPT 生成(使用 felo-slides)
  • SuperAgent 对话(使用 felo-superAgent)

设置

1. 获取 API 密钥
  1. 访问 felo.ai 并登录(或注册)
  2. 点击右上角的头像 → Settings
  3. 转到 "API Keys" 标签页
  4. 点击 "Create New Key" 以生成新的 API Key
  5. 复制并妥善保存 API Key
2. 配置 API 密钥

设置 FELO_API_KEY 环境变量:

Linux/macOS:

export FELO_API_KEY="your-api-key-here"

Windows (PowerShell):

$env:FELO_API_KEY="your-api-key-here"

如何执行

触发此技能时,使用 Bash 工具执行 livedoc 脚本:

LiveDoc 管理

创建 LiveDoc:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs create --name "KB Name" --description "Description"

列出 LiveDoc:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs list
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs list --keyword "search term"

更新 LiveDoc:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update SHORT_ID --name "New Name" --description "New Desc"

删除 LiveDoc:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs delete SHORT_ID
资源管理

添加文本文档:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs add-doc SHORT_ID --title "Doc Title" --content "Document content here"

添加 URL(最多 10 个,以逗号分隔):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs add-urls SHORT_ID --urls "https://example.com,https://example.org"

每个 URL 也可以使用 --url-titles 选项,以 url:title 键值对形式传入,或提供 JSON 数组。API 同时接受纯字符串和 {"url": "...", "title": "..."} 对象——使用 --json 模式时,脚本会原样传递这些内容。若要添加带自定义标题的 URL,请使用 JSON 标志并手动构造请求正文,或使用页面自动生成的标题。

上传文件:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs upload SHORT_ID --file ./document.pdf
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs upload SHORT_ID --file ./document.pdf --convert

列出资源:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs resources SHORT_ID

获取单个资源:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs resource SHORT_ID RESOURCE_ID

删除资源:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs remove-resource SHORT_ID RESOURCE_ID

更新资源(标题/摘要/缩略图):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-resource SHORT_ID RESOURCE_ID --title "New Title"
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-resource SHORT_ID RESOURCE_ID --snippet "New summary" --thumbnail "https://example.com/thumb.png"

更新资源内容(仅限 ai_doc 类型——同时会根据前 2000 个字节自动更新摘要):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-resource-content SHORT_ID RESOURCE_ID --content "New content here"
语义检索

根据查询路由相关资源:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs route SHORT_ID --query "your search query"
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs route SHORT_ID --query "your search query" --max-resources 5

搜索所有资源(自动路由):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs retrieve SHORT_ID --query "your search query"

在指定资源中搜索:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs retrieve SHORT_ID --query "your search query" --resource-ids "id1,id2,id3"
资源文件与内容

下载资源源文件(获取预签名 URL):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs download SHORT_ID RESOURCE_ID
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs download SHORT_ID RESOURCE_ID --expires-in 7200

获取资源提取出的文本内容:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs content SHORT_ID RESOURCE_ID

PPT 页面深度检索:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs ppt-retrieve SHORT_ID --resource-id RESOURCE_ID --page-number 3 --query "pricing information"
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs ppt-retrieve SHORT_ID --resource-id RESOURCE_ID --page-number 3 --query "pricing information" --max-chunk 5
README 管理

获取 README:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs get-readme SHORT_ID

创建或替换 README:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-readme SHORT_ID --content "# My KB\n\nThis is the README."

追加到 README:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs append-readme SHORT_ID --content "\n\n## New Section\n\nAdditional content."

删除 README:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs delete-readme SHORT_ID
任务管理

列出任务(可选筛选条件):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs tasks SHORT_ID
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs tasks SHORT_ID --status 0
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs tasks SHORT_ID --labels "docs,priority-high"

创建任务:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs create-task SHORT_ID --title "Write docs" --status 0 --sort 0
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs create-task SHORT_ID --title "Write docs" --status 0 --sort 0 --description "API docs" --labels "docs"
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs create-task SHORT_ID --title "Write docs" --operated-by "claude-code"

任务状态值:0=TODO、1=IN_PROGRESS、2=DONE

更新任务(部分更新):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-task SHORT_ID TASK_ID --status 1
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-task SHORT_ID TASK_ID --title "New title" --labels "docs,done"
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs update-task SHORT_ID TASK_ID --status 2 --operated-by "claude-code"

删除任务:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs delete-task SHORT_ID TASK_ID

列出任务记录(评论和变更历史):

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs task-records SHORT_ID TASK_ID
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs task-records SHORT_ID TASK_ID --record-type comment

为任务添加评论:

node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs add-task-comment SHORT_ID TASK_ID --content "This is a comment."
node ~/.agents/skills/felo-livedoc/scripts/run_livedoc.mjs add-task-comment SHORT_ID TASK_ID --content "This is a comment." --operated-by "claude-code"
选项

所有命令均支持:

  • --json 或 -j — 输出原始 JSON 响应
  • --timeout <ms> 或 -t <ms> — 请求超时时间,单位为毫秒(默认值:60000)
解析并格式化响应

API 返回的 JSON 结构如下:

{
  "status": "ok",
  "message": "success",
  "data": { ... }
}

LiveDoc 对象:

  • short_id — 唯一标识符(所有操作都使用此标识符)
  • name — LiveDoc 名称
  • description — LiveDoc 描述
  • is_shared — 如果此 LiveDoc 是他人分享给你的(而非你拥有),则为 true
  • created_at / modified_at — 时间戳

资源对象:

  • id — 资源标识符
  • title — 资源标题
  • resource_type — 类型(web、ai_doc、file 等)
  • status — 处理状态
  • snippet — 内容预览

检索结果:

  • id — 资源 ID
  • title — 资源标题
  • content — 匹配的内容
  • score — 相关性分数(0-1)

错误处理

常见错误代码
  • INVALID_API_KEY — API Key 无效或已撤销
  • LIVEDOC_NOT_FOUND — LiveDoc 不存在
  • LIVEDOC_RESOURCE_NOT_FOUND — 资源不存在
  • LIVEDOC_CREATE_FAILED — 创建 LiveDoc 失败
  • LIVEDOC_RESOURCE_UPLOAD_FAILED — 文件上传失败
  • LIVEDOC_RESOURCE_ADD_URLS_FAILED — 添加 URL 失败
  • LIVEDOC_RESOURCE_RETRIEVE_FAILED — 语义检索失败
  • LIVEDOC_README_GET_FAILED — 获取 README 失败
  • LIVEDOC_README_UPDATE_FAILED — 创建或更新 README 失败
  • LIVEDOC_README_DELETE_FAILED — 删除 README 失败
  • LIVEDOC_TASK_LIST_FAILED — 列出任务失败
  • LIVEDOC_TASK_CREATE_FAILED — 创建任务失败
  • LIVEDOC_TASK_UPDATE_FAILED — 更新任务失败
  • LIVEDOC_TASK_DELETE_FAILED — 删除任务失败
  • LIVEDOC_TASK_NOT_FOUND — 任务不存在
  • LIVEDOC_TASK_RECORD_LIST_FAILED — 列出任务记录失败
  • LIVEDOC_TASK_COMMENT_CREATE_FAILED — 添加评论失败
缺少 API Key

如果未设置 FELO_API_KEY,请显示以下消息:

ERROR: FELO_API_KEY not set. Get your API key from https://felo.ai (Settings → API Keys).
Set it with: export FELO_API_KEY="your-key"

重要说明

  • 始终使用创建或列表操作返回的 short_id 来引用 LiveDoc
  • 每次请求最多可添加 10 个 URL 资源
  • 上传文件时使用 --convert,将文件转换为可搜索的文档
  • 语义检索会按相关性分数排序返回结果
  • 立即使用 Bash 工具执行操作,不要只描述你将如何操作

评论

支持 Markdown