一键导入
wiki-semantic-link
Automatically builds semantic links between concept markdown files by calculating vector similarity using a local Ollama embedding model.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automatically builds semantic links between concept markdown files by calculating vector similarity using a local Ollama embedding model.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Compile raw sources into detailed, Obsidian-compatible, interlinked Markdown pages under wiki/ references/ and concepts/.
Deduplicates concepts, splits overly broad concepts, and synthesizes multi-source concept definitions by dynamically searching and analyzing all papers that reference them.
Ingest new academic papers or PDFs into the raw/ folder of your active topic wiki using the local OCR model configured in config.yaml.
Ingest new academic papers, notes, or web articles into the raw/ folder of your active topic wiki.
Initialize a new topic workspace folder with standard raw/, wiki/, inbox/, and output/ directories.
Statically check and repair double-bracket linkages and frontmatter within your compiled wiki directory.
| name | wiki_semantic_link |
| description | Automatically builds semantic links between concept markdown files by calculating vector similarity using a local Ollama embedding model. |
| commands | {"link_concepts":"Run the semantic linker over all concepts in the wiki to build semantic relationships."} |
Resolving script paths (read first): Commands below invoke scripts as
<BIN>/X.py(and a few as<SKILLS>/...). Resolve these to absolute paths once before running anything:
<SKILL_DIR>= the directory thisSKILL.mdlives in.<SKILLS>= theskills/folder containing this skill =<SKILL_DIR>/..<BIN>= thebin/folder beside it =<SKILL_DIR>/../../binDo not hardcode a fixed prefix like
.agents/binor../bin: shell relative paths resolve against the current working directory (usually the topic root), not this skill's location. Once resolved,<BIN>is typically.agents/binwhen invoked from the hub root, or.claude/binfrom inside a topic directory.
This skill scans all markdown files within the wiki/concepts/ directory, extracts their text, and generates embeddings using a local Ollama model (configured in config.yaml, default: qwen3-embedding:0.6b). It then calculates pairwise cosine similarity between all concepts and automatically injects bi-directional Obsidian-style links ([[Concept Name]]) for pairs that exceed a given similarity threshold.
This skill is executed via the Python script located within the skill directory.
Crucial Parameter Selection: Depending on the objective, you MUST use the correct parameters:
python <SKILLS>/wiki_semantic_link/semantic_linker.py <TOPIC_DIR>
Model, threshold, and Ollama URL are read from config.yaml. Override via CLI flags if needed (e.g. --threshold 0.80 --model <model>).wiki_concept_sync pipeline to merge duplicates:
python <SKILLS>/wiki_semantic_link/semantic_linker.py <TOPIC_DIR> --dedup-only --auto-mergePrerequisites: Ensure the embedding model is available locally via
ollama pull <model>(checkconfig.yamlfor the configured model name). Requiresnumpyandscikit-learnPython packages.
wiki/concepts/ directory within the given <TOPIC_DIR>..md files to wiki/concepts/.backup/ before proceeding, ensuring no data loss in case of a bad threshold.config.yaml) to generate vector representations.scikit-learn to compute a Cosine Similarity matrix for all generated vectors.< 0.85).(A, B) (where score >= threshold), checks if A.md already contains [[B]].## 语义关联 (Semantic Links).Note: This skill no longer handles merge suggestions. Deduplication is strictly handled by the wiki_concept_sync skill.