← 返回 Skills 市场
587
总下载
0
收藏
3
当前安装
3
版本数
在 OpenClaw 中安装
/install knowledge-mapper
功能描述
Parse Markdown and TXT documents to extract entities and their co-occurrence relationships, allowing querying and exporting knowledge graphs in text, JSON, o...
使用说明 (SKILL.md)
- 📄 文档解析: 支持 Markdown、TXT 格式
- 🔍 实体识别: 基于规则和关键词的实体提取
- 🔗 关系发现: 基于共现的实体关系提取
- 📊 知识可视化: 文本、JSON、GraphViz DOT 格式导出
- 🔎 知识查询: 搜索实体和文档
安装
# 添加到 PATH
ln -s ~/.openclaw/workspace/skills/knowledge-mapper/knowledge-graph ~/.local/bin/knowledge-graph
使用
添加文档
# 添加 Markdown 文档
knowledge-graph add ~/documents/article.md
# 添加文本文件
knowledge-graph add ~/notes/ideas.txt
查看文档列表
knowledge-graph documents
查看实体
# 列出所有实体(默认50个)
knowledge-graph entities
# 列出更多实体
knowledge-graph entities --limit 100
# 按类型过滤
knowledge-graph entities --type TECH
实体类型
PERSON- 人物ORG- 组织/公司TECH- 技术/编程语言CONCEPT- 概念/术语TERM- 高频词/术语UNKNOWN- 未分类
查看关系
# 列出所有关系(默认30个)
knowledge-graph relations
# 列出更多关系
knowledge-graph relations --limit 50
导出知识图谱
# 文本格式(默认)
knowledge-graph export
# JSON 格式
knowledge-graph export --format json
# GraphViz DOT 格式(可用于绘图)
knowledge-graph export --format dot > graph.dot
dot -Tpng graph.dot -o graph.png
搜索知识库
# 搜索关键词
knowledge-graph search "人工智能"
# 搜索实体
knowledge-graph search "Python"
查看统计
knowledge-graph stats
示例工作流程
# 1. 添加文档到知识库
knowledge-graph add ~/docs/project-notes.md
knowledge-graph add ~/docs/research-paper.md
knowledge-graph add ~/docs/tech-stack.md
# 2. 查看提取的实体
knowledge-graph entities --limit 20
# 3. 查看发现的关系
knowledge-graph relations
# 4. 导出为可视化格式
knowledge-graph export --format dot > my-knowledge.dot
# 5. 生成图片(需要安装 GraphViz)
dot -Tpng my-knowledge.dot -o my-knowledge.png
数据存储
数据存储在 ~/.openclaw/data/knowledge-graph/:
knowledge_graph.db- SQLite 数据库
技术栈
- Python 3.8+
- SQLite
- argparse
- 正则表达式(实体提取)
扩展计划
- 支持更多文档格式(PDF、Word)
- 集成 NLP 模型进行更精确的实体识别
- 支持关系推理和补全
- 交互式知识图谱可视化
- 实体链接和消歧
安全使用建议
Do not run the symlink/install step or execute a 'knowledge-graph' binary unless you can inspect it first. The package.json and SKILL.md expect an executable named 'knowledge-graph' but the skill package does not include it—this could mean the skill is incomplete or expects an externally provided binary. Before installing: 1) ask the publisher where the 'knowledge-graph' executable comes from or obtain the source; 2) if you get a binary, inspect its contents (or build from source) and run it in a sandboxed environment; 3) verify the binary's behavior (it should only read the documents you point it at and write to ~/.openclaw/data/knowledge-graph/); 4) prefer skills that include their source or an install spec from a trusted release (GitHub release, package registry). If you can't verify the binary/source, avoid creating the symlink and do not run the tool on sensitive documents.
功能分析
Type: OpenClaw Skill
Name: knowledge-mapper
Version: 1.0.2
The 'knowledge-mapper' skill is a utility designed to extract entities and relationships from local Markdown and text files to build a knowledge graph. The documentation (SKILL.md, SKILL_EN.md) and metadata (package.json) describe standard CLI functionality, including SQLite storage and GraphViz export, with no evidence of data exfiltration, malicious execution, or prompt injection. While the main executable script 'knowledge-graph' is referenced but not provided in the file list, the instructions and metadata are consistent with a legitimate knowledge management tool.
能力评估
Purpose & Capability
The declared purpose is a local CLI that parses Markdown/TXT and writes to a local SQLite DB. That purpose is reasonable, but the SKILL and package.json expect a 'knowledge-graph' executable/binary (and a bin entry in package.json) while no such executable or source code is included in the skill bundle. Requiring a CLI binary that isn't provided is an incoherence: either required code is missing or the skill expects an external binary to be placed into the workspace.
Instruction Scope
Runtime instructions are narrowly scoped to local file operations: symlink the CLI into ~/.local/bin, run commands to add files (e.g., knowledge-graph add ~/documents/article.md), query and export, and store data under ~/.openclaw/data/knowledge-graph/ (SQLite). There are no instructions to contact external endpoints or read unrelated system config. Note: the install step requires creating a symlink to a workspace path—if an attacker can place a malicious binary at that workspace path, this would allow execution of arbitrary code.
Install Mechanism
There is no install spec and no code files other than SKILL.md / SKILL_EN.md / package.json. package.json declares a bin './knowledge-graph' but that file is not present in the manifest. The SKILL.md's installation step (ln -s ~/.openclaw/workspace/skills/knowledge-mapper/knowledge-graph ~/.local/bin/knowledge-graph) will fail unless an executable is placed in that workspace. This mismatch increases risk: either the skill is incomplete or it relies on an out-of-band binary (which should be inspected before use).
Credentials
The skill requests no environment variables, no credentials, and no config paths beyond its own data directory (~/.openclaw/data/knowledge-graph/). That is proportionate to the stated local-document processing purpose.
Persistence & Privilege
always is false and there's no request for permanent elevated privileges. The skill stores data locally under ~/.openclaw/data/knowledge-graph/ and does not declare changes to other skills or global agent configuration. Autonomous invocation is allowed by default (normal) but not combined with other concerning factors.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install knowledge-mapper - 安装完成后,直接呼叫该 Skill 的名称或使用
/knowledge-mapper触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- No user-visible changes in this release.
- Version bump from 1.0.0 to 1.0.2; no modifications detected in SKILL.md or other files.
v1.0.1
- Skill renamed from "knowledge-graph" to "knowledge-mapper"
- Updated file paths and documentation references to reflect the new skill name
- No functional changes to features or usage
v1.0.0
Initial release of knowledge-graph (v1.0.0):
- Supports parsing Markdown and TXT files for knowledge graph construction.
- Rule-based and keyword-based entity extraction with multiple entity types (PERSON, ORG, TECH, etc.).
- Discovers relationships based on entity co-occurrence.
- Provides export options: plaintext, JSON, and GraphViz DOT formats.
- Enables entity and document search, as well as statistics.
- Stores data in a local SQLite database.
元数据
常见问题
Knowledge Mapper 是什么?
Parse Markdown and TXT documents to extract entities and their co-occurrence relationships, allowing querying and exporting knowledge graphs in text, JSON, o... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 587 次。
如何安装 Knowledge Mapper?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install knowledge-mapper」即可一键安装,无需额外配置。
Knowledge Mapper 是免费的吗?
是的,Knowledge Mapper 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Knowledge Mapper 支持哪些平台?
Knowledge Mapper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Knowledge Mapper?
由 haidong(@harrylabsj)开发并维护,当前版本 v1.0.2。
推荐 Skills