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...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 152 · 1 current installs · 1 all-time installs
byhaidong@harrylabsj
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & 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.
What to consider before installing
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.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.2
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
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 模型进行更精确的实体识别
- 支持关系推理和补全
- 交互式知识图谱可视化
- 实体链接和消歧
Files
3 totalSelect a file
Select a file to preview.
Comments
Loading comments…
