Introduction¶
As documentation, code, and PDFs pile up in a project, it becomes difficult to understand the relationships between concepts relying on full-text search alone. Manually drawing mind maps or ingesting data into a graph database either incurs high maintenance costs or requires setting up a separate toolchain. The following introduces the community Skill on SkillHub, “Universal Knowledge Graph Builder”: it follows a fixed workflow within an Agent to check the environment, scan documents, call an LLM to extract a graph, and generate a local HTML page that can be opened by double-clicking.
What is this¶
The Universal Knowledge Graph Builder (coordinate @user_19a6d235/knowledge-graph-builder, current version 1.0.6, source community, category knowledge-management) is maintained by publisher user_19a6d235. It is an agent workflow based on a standard SKILL.md, not a standalone desktop application: once enabled, the Agent executes Bash commands and reads/writes files according to the documentation, stringing “document directory → knowledge graph → static page” into reproducible steps.
The official description summarizes it into four steps: Check environment → Analyze documents → Build knowledge graph → Generate interactive HTML page. It supports analyzing Markdown, code, PDFs, images, etc., in any directory. The LLM side uses an OpenAI-compatible API; the configuration can be written to a local file and reused in subsequent builds. The SkillHub tag indicates requires_api_key=true, so you need to provide your own API Key and endpoint before use.
Core Functions¶
Environment and Dependencies¶
- Validate Python 3.10+ and provide installation instructions for the platform if necessary.
- Detect proxies in system or environment variables; if a proxy exists, subsequent executions of graphify commands can use
NO_PROXY="*"to avoid conflicts between httpx and the system proxy (common error scenarios are explained in the Skill documentation). - Create or reuse a virtual environment at
~/.knowledge-graph-builder/venvand install fixed-version dependencies: graphifyy 0.7.13 and openai 2.36.0. - Write the LLM’s Base URL, API Key, and model name into
~/.knowledge-graph-builder/env.sh(permissions600), and verify the configuration with a single connectivity request.
Document Analysis and User Confirmation¶
Perform file type statistics on the target directory (e.g., md, code, pdf, images, txt, etc.), estimate the token scale and recommend a token budget, and whether to enable clustering (it defaults to recommending --no-cluster when nodes are fewer than 20). Before actually calling the build API, the Skill requires displaying an analysis report and rough cost estimate, and waiting for explicit user confirmation; the user can also choose to only generate an empty page or cancel.
Graph Construction¶
Call the extract subcommand of graphify via an inline Python script, performing a monkey-patch on the base_url for the OpenAI backend to adapt to compatible services like DeepSeek and OpenAI. The output is written to graphify-out/graph.json under the document directory, containing nodes, edges, and token statistics; there is also a configuration summary confirmation checkpoint before the build.
Interactive HTML¶
Read template.html from within the Skill package, replace the title placeholder {{TITLE}} and the graph JSON placeholder {{GRAPH_JSON}}, and write out <Knowledge Base Name>-Knowledge Graph.html. The page inlines D3.js v7, and the graph data is inlined in a single file, allowing it to be browsed locally by double-clicking; fonts depend on Google Fonts and will fall back to the system monospace font if offline.
Incremental Updates¶
When the user expresses intent to “update/refresh the knowledge base” etc., the Skill detects graphify-out and .knowledge-graph-history/last_build.json, compares added/deleted files, lets the user choose between incremental updates and full reconstruction, and reuses the existing env.sh configuration.
Trigger Methods¶
Besides natural language, the official trigger words include: Knowledge graph, build knowledge base, knowledge base page, graphify, generate knowledge base, document graphing, knowledge management, knowledge base tool. Example phrases include “Turn my documents into a knowledge base” or “Generate a knowledge graph”.
Installation and Activation¶
The installation method provided on the SkillHub page is: let the Agent read the SkillHub installation instructions and install the coordinate @user_19a6d235/knowledge-graph-builder.
If the skillhub CLI is already available on the machine, the --dir flag must be used during installation to point to the current Agent’s skills directory; otherwise, it defaults to installing to ./skills/ which might not be recognized. Common path examples from the official documentation:
| Agent / Client | skills directory (example) |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
Command-line installation example (replace <skills directory> with the actual path in your environment):
skillhub install knowledge-graph-builder --namespace user_19a6d235 --dir <skills directory>
For first-time CLI usage, check or install skillhub itself via skillhub.cn/install/skillhub.md. The Skill declares allowed tools as Bash, Read, Write, Edit, which must be enabled in the supporting Agent.
Typical Usage¶
After the installation steps above, simply state your intent in the conversation, and the Agent will follow the Skill starting from Step 0 to collect information.
1. Prepare Input
- Provide the absolute path of the document directory (optional: display name for the knowledge base).
- If the LLM is not configured, provide an OpenAI-compatible Base URL (must end with
/v1), API Key, and Model ID (e.g., DeepSeek or OpenAI series). If~/.knowledge-graph-builder/env.shalready exists, repeated prompting can be skipped.
2. Confirm Analysis Report
After the Agent displays the file distribution, estimated tokens, recommended budget, and clustering strategy within the directory, reply with “Continue” to proceed to the build; you can say “Adjust parameters” or “Cancel”.
3. Build and Open Page
After confirming the build configuration, execute graphify extraction in the parent directory of the documents; upon success, graphify-out/graph.json and *-Knowledge Graph.html in the same directory or workspace will be obtained. For local use, you can double-click the HTML directly; for intranet sharing, use:
cd <directory containing the page> && python3 -m http.server <port>
4. After Document Changes
State “Update knowledge base” etc. to go through the incremental process: compare file changes, choose incremental or full reconstruction, and the HTML will be overwritten and updated.
A typical LLM configuration is written in the following structure (values are filled in by the user):
# ~/.knowledge-graph-builder/env.sh
LLM_BASE_URL="https://api.deepseek.com/v1"
LLM_API_KEY="sk-..."
LLM_MODEL="deepseek-v4-flash"
Target Audience and Considerations¶
Who it is for: Teams or individuals who want to organize technical documentation, product descriptions, academic paper PDFs, or code comments within a local machine or repository into a browsable concept relationship map, and are willing to use their own LLM API for extraction; requires single-file HTML distribution and offline graph viewing (without deploying graph databases like Neo4j).
Limitations and Notes:
- A valid OpenAI-compatible API must be configured; the build process incurs costs billed by token, the Skill makes a rough calculation at checkpoints, but actual billing is subject to the service provider’s invoice.
- Depends on local Python 3.10+ and pip installation of graphifyy; network-restricted environments require handling proxies independently (see Skill FAQ).
- For large directories or rate limiting (HTTP 429), it may be necessary to reduce concurrency (e.g.,
--max-concurrency 2) or adjust the token budget; if the number of nodes ingraph.jsonis 0, troubleshoot Key, URL, model name, and document format according to the Skill. - SkillHub Metadata: Rating 100000, Downloads 2023 (based on SkillHub page scrape); if inconsistent with numbers in individual reposts, refer to the store page.
Conclusion¶
The Universal Knowledge Graph Builder writes “environment checking, document scanning, graphify extraction, and D3 page packaging” into a set of Agent-executable workflows, suitable for quickly obtaining an interactive knowledge graph HTML from messy folders and performing incremental updates as documents iterate. Official Skill page and installation coordinates:
- SkillHub: https://www.skillhub.cn/skills/user_19a6d235/knowledge-graph-builder
- API Resource Page: https://api.skillhub.cn/user_19a6d235/knowledge-graph-builder