← 返回 Skills 市场
177
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install local-context-bridge-cn
功能描述
使用语义关键词搜索本地个人和内部文档(Word/Excel/PDF/Markdown)。当用户询问本地文件、私人数据或内部知识时使用此工具。它会返回高度相关的文本片段和文件路径。注意:始终使用提取的核心实体作为关键词,而不是完整句子。
使用说明 (SKILL.md)
\r
ContextBridge 知识库\r
\r
📚 工作原理\r
\r ContextBridge 为 OpenClaw 提供对你本地文档(Word、Excel、PDF、Markdown)的即时检索能力。\r \r
- 本地索引:扫描文档并将文本切分为文本块。\r
- 向量化:使用本地 AI 嵌入模型将文本转换为语义向量。\r
- 语义搜索:从知识库中匹配最相关的文本块。\r \r ---\r \r
🚀 下载安装\r
\r cbridge 安装与初始化流程\r \r
flowchart TD\r
A([开始]) --> B{已安装 cbridge?\
cbridge --version}\r
\r
B -- 是 --> C[检测更新\
cbridge update]\r
C --> D{需要重新初始化?\
询问用户}\r
D -- 是 --> E[重新初始化配置\
cbridge init]\r
D -- 否 --> G\r
E --> G\r
\r
B -- 否 --> F1[说明需安装 ContextBridge\
用于监控本地目录、向量化文件]\r
F1 --> F2[说明工作目录\
创建 ~/.cbridge 保存工作文件]\r
F2 --> F3[获取用户授权\
自动完成下载与初始化]\r
F3 --> G\r
\r
G[配置完成\
通过 cbridge 与 ContextBridge 交互] --> H[运行内置 Demo\
cbridge search ContextBridge]\r
H --> I([结束])\r
```\r
\r
### 1. 下载\r
\r
> 🔓 **开源可信**:`cbridge-agent` 完全开源,代码托管于 [GitHub](https://github.com/whyischen/context-bridge),可审计验证,本地运行无数据泄露风险。\r
\r
```bash\r
pip install cbridge-agent\r
```\r
\r
### 2. 初始化配置\r
\r
```bash\r
cbridge init\r
```\r
\r
因为软件主要为 AI 工具调用,推荐用户全部使用默认配置\r
\r
### 3. 添加文档\r
\r
```bash\r
cbridge watch add /path/to/your/documents\r
cbridge watch list # 查看已监听文件夹\r
```\r
\r
### 4. 运行测试 demo\r
\r
```bash\r
cbridge search ContextBridge # 搜索内置测试文档\r
```\r
\r
---\r
\r
## 💡 搜索最佳实践\r
\r
1. 尽量做到无感使用,根据用户语义判断使用调用 `cbridge seatch` 检索本地内容\r
2. `cbridge seatch` 会返回与搜索相关的**文档片段**以及**文档路径**,根据文档片段**判断是否需要获取文档全部内容**。\r
\r
### 什么时候使用 ContextBridge\r
\r
1. 分析用户所提到的资料可能是内部资料时\r
2. 用户明确提出查看本地文档时\r
\r
### 关键词提取\r
\r
- 推荐:提取核心实体\r
- `2024 marketing budget` ✅\r
- 不推荐:使用完整句子\r
- `What was the budget for 2024 marketing` ❌\r
\r
### 迭代搜索\r
\r
1. 先用精准关键词\r
2. 若无结果,扩大查询范围\r
3. 尝试同义词或相关术语\r
\r
---\r
\r
## 📖 CLI 命令\r
\r
```bash\r
# 初始化\r
cbridge init # 初始化工作区\r
cbridge lang en # 切换语言\r
\r
# 文档管理\r
cbridge watch add path # 添加文件夹\r
cbridge watch remove path # 移除文件夹\r
cbridge watch list # 列出文件夹\r
cbridge index # 手动重建索引\r
\r
# 服务控制\r
cbridge start # 启动服务\r
cbridge serve # 仅启动 API\r
cbridge stop # 停止服务\r
cbridge status # 查看状态\r
cbridge logs # 查看日志\r
\r
# 搜索\r
cbridge search query # 搜索文档\r
```\r
\r
---\r
\r
## 📚 资源链接\r
\r
- GitHub:[whyischen/context-bridge](https://github.com/whyischen/context-bridge)\r
- 配置文件:`~.cbridgeconfig.yaml`\r
- 工作区:`~.cbridgeworkspace`\r
安全使用建议
This skill appears to do what it says: install a local CLI that indexes and searches your documents. Before you install or run it, do the following: (1) Verify the package name and source: check that the pip package (cbridge-agent) actually corresponds to the claimed GitHub repo and review the repo or release artifacts if possible. (2) Install in an isolated environment (virtualenv/container) if you want to limit risk. (3) Do not add system or highly sensitive folders to the watch list; explicitly add only the directories you want indexed. (4) Prefer installing a pinned version and inspect setup scripts for post-install hooks. (5) If you cannot audit the code, consider running the agent with least privilege or using alternative, audited tools. These steps reduce risk from a third‑party package that will read local files and may run a background service.
功能分析
Type: OpenClaw Skill
Name: local-context-bridge-cn
Version: 1.0.2
The skill bundle provides a legitimate interface for a local document search and indexing tool called 'cbridge-agent'. It includes standard installation instructions via pip and guides the AI agent on how to perform semantic searches and manage local document directories. The behavior described in SKILL.md is consistent with the stated purpose of a local knowledge base bridge, and there are no indicators of data exfiltration, malicious execution, or harmful prompt injection.
能力评估
Purpose & Capability
The name and description (local semantic search over Word/Excel/PDF/Markdown) match the instructions: installing a local agent (cbridge), initializing it, adding watched folders, building an index, and searching. The single declared requirement (pip) is appropriate for installing a Python CLI. The skill references creating a workspace and config under the user's home directory (~/.cbridgeworkspace, ~/.cbridgeconfig.yaml), which is consistent with a local indexer.
Instruction Scope
The SKILL.md tells the agent to install and run a local CLI (cbridge), add directories to be watched, and start a background service — all expected for a local document indexer. It does direct actions that read local files and create config/workspace under the user's home, which is necessary but high‑impact: the agent (via the installed tool) will have access to any folders the user adds. The documentation also includes an automatic-download/initialization step in the flowchart that is vague about user consent and verification.
Install Mechanism
This is an instruction‑only skill (no install spec in metadata) but instructs the user/agent to run pip install cbridge-agent. Installing a PyPI package is a common way to get a CLI, but pip packages execute arbitrary Python code at install/runtime — this is a moderate risk if you don't verify the package/source. The README claims a GitHub repo (https://github.com/whyischen/context-bridge) which could be used to audit the code, but the SKILL.md does not instruct verifying package provenance or pinning versions.
Credentials
No environment variables or external credentials are requested. The only config paths referenced (~/.cbridgeconfig.yaml, ~/.cbridgeworkspace) are specific to the tool and proportionate to its purpose.
Persistence & Privilege
The tool includes commands to start a service (cbridge start/serve) and to watch directories, which implies running a persistent local process that has access to watched files. The skill metadata does not set always:true and does not request system-wide privileges; still, running a background service should be treated as a persistent capability and limited to explicitly chosen folders.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install local-context-bridge-cn - 安装完成后,直接呼叫该 Skill 的名称或使用
/local-context-bridge-cn触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- 增加关于 cbridge-agent 完全开源和本地运行无数据泄露风险的说明
- 修正和补全 GitHub 链接为可点击格式
- 其他内容无变化,仅对部分描述排版与链接可读性进行优化
v1.0.1
- Updated description to clarify usage scenarios (personal/internal docs, always extract key entities, etc.).
- Minor adjustments to installation flowchart for clarity and conciseness.
- Emphasized returning both text fragments and file paths in search results.
- Refined instructions on when and how to use the skill and best practices for keyword extraction.
v1.0.0
- Initial release of local-context-bridge skill.
- Enables keyword search across local Word, Excel, PDF, and Markdown documents.
- Provides step-by-step setup guides for installation, configuration, and document indexing.
- Supports semantic search using local AI embedding models.
- Includes CLI commands for document management and search operations.
元数据
常见问题
Local ContextBridge 中文 是什么?
使用语义关键词搜索本地个人和内部文档(Word/Excel/PDF/Markdown)。当用户询问本地文件、私人数据或内部知识时使用此工具。它会返回高度相关的文本片段和文件路径。注意:始终使用提取的核心实体作为关键词,而不是完整句子。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 177 次。
如何安装 Local ContextBridge 中文?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install local-context-bridge-cn」即可一键安装,无需额外配置。
Local ContextBridge 中文 是免费的吗?
是的,Local ContextBridge 中文 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Local ContextBridge 中文 支持哪些平台?
Local ContextBridge 中文 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Local ContextBridge 中文?
由 whyischen(@whyischen)开发并维护,当前版本 v1.0.2。
推荐 Skills