← Back to Skills Marketplace
harrylabsj

Knowledge Mapper

by haidong · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
587
Downloads
0
Stars
3
Active Installs
3
Versions
Install in OpenClaw
/install knowledge-mapper
Description
Parse Markdown and TXT documents to extract entities and their co-occurrence relationships, allowing querying and exporting knowledge graphs in text, JSON, o...
README (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 模型进行更精确的实体识别
  • 支持关系推理和补全
  • 交互式知识图谱可视化
  • 实体链接和消歧
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install knowledge-mapper
  3. After installation, invoke the skill by name or use /knowledge-mapper
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug knowledge-mapper
Version 1.0.2
License MIT-0
All-time Installs 4
Active Installs 3
Total Versions 3
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 587 downloads so far.

How do I install Knowledge Mapper?

Run "/install knowledge-mapper" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Knowledge Mapper free?

Yes, Knowledge Mapper is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Knowledge Mapper support?

Knowledge Mapper is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Knowledge Mapper?

It is built and maintained by haidong (@harrylabsj); the current version is v1.0.2.

💬 Comments