mcpField
A
adding-resource

adding-resource

github.com/volcengine数据与数据库41.1k52 次安装今天更新
代码仓库

关于 adding-resource

此技能将本地文件、目录、URL 和远程代码仓库导入 OpenViking 上下文数据库。它支持添加处理说明及等待语义处理,适用于构建可持续检索的参考资料集。

主要功能

  1. 01导入文件、目录、URL 和代码仓库
  2. 02通过原因和指令引导处理
  3. 03等待处理完成并设置超时
  4. 04返回导入资源的 URI

适用场景

  1. 01导入项目文档以便后续检索
  2. 02将网页文章加入参考资料集
  3. 03保存 Agent 会话间有用的内容

安装

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

$npx skills add https://github.com/volcengine/openviking --skill adding-resource

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

详细介绍

OpenViking (OV) add-resource

ov add-resource 命令将外部资源导入 OpenViking 的上下文数据库——支持本地文件、目录、URL 和远程仓库。资源会自动经过语义分析处理,并组织在 viking://resources/ 命名空间下。

何时使用

  • 导入项目文档、代码仓库或参考资料
  • 添加网页、文章或在线资源以供日后检索
  • 从外部来源构建知识库
  • 当 Agent 遇到应跨会话持久保存的有价值内容时

输入选项

基本用法

导入本地文件或 URL:

# Import from URL
ov add-resource https://raw.githubusercontent.com/volcengine/OpenViking/main/README.md

# Import local file
ov add-resource ./docs/api-spec.md

# Import local directory
ov add-resource ./project-source
上下文与指令

添加元数据以指导处理:

# Provide reason for import
ov add-resource ./api-docs.md --reason "REST API documentation for v2 endpoints"

# Add processing instructions
ov add-resource ./large-repo --instruction "Focus on authentication and authorization patterns"

# Combine reason and instruction
ov add-resource https://example.com/guide --reason "User guide" --instruction "Extract best practices and examples"
异步处理控制

等待语义处理完成:

# Wait until processing finishes
ov add-resource ./docs --wait

# Wait with timeout (in seconds)
ov add-resource https://example.com/docs --wait --timeout 60

# Fire and forget (default)
ov add-resource ./docs

输出

返回导入资源的根 URI:

root_uri  viking://resources/...

前提条件

  • 已配置 CLI:~/.openviking/ovcli.conf
  • 导入 URL 需要网络访问
  • 对本地文件/目录具有读取权限

评论

支持 Markdown