Read or configure the vault filing methodology and suggest destinations for planned knowledge creation under Generic, LYT, PARA, or Zettelkasten. Use for wiki m
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-wiki-mode-9f4529470ba3 ,按照其中的说明把「wiki-mode」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This skill returns filing suggestions. It does not write knowledge pages or
move existing notes. If .vault-meta/mode.json is absent, use generic. If
the file exists but is invalid, fail closed and repair it through a reviewed
configuration operation before suggesting routes; never silently substitute
Generic for corrupt user configuration.
Resolve the installed product root from this skill's own location, not from the vault or current working directory:
PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
CORE="$PRODUCT_ROOT/scripts/claude-obsidian.py"
MODE_HELPER="$PRODUCT_ROOT/scripts/wiki-mode.py"
test -f "$CORE" && test -f "$MODE_HELPER"
Every ../wiki/references/ link in this file resolves the same way, relative
to this skill's own directory under $PRODUCT_ROOT, never relative to the
selected vault's wiki/ directory.
Always select the vault explicitly:
python3 "$MODE_HELPER" --vault "$VAULT" get
python3 "$MODE_HELPER" --vault "$VAULT" config
python3 "$MODE_HELPER" --vault "$VAULT" route concept "Concept name"
python3 "$MODE_HELPER" --vault "$VAULT" route source "Source title"
The helper validates the selected vault, confines paths, sanitizes names, and prints a suggestion only. A calling skill may override the suggestion when the user supplies a more specific project, area, MOC, or parent note, but it must still apply its eventual writes through one operation transaction.
| Mode | Routing intent |
|---|---|
generic | Type-based folders such as sources, entities, concepts, and sessions. |
lyt | Atomic notes under wiki/notes/, connected through MOCs. |
para | Projects, Areas, Resources, or Archives chosen by actionability. |
zettelkasten | Flat atomic notes with time-sortable, collision-resistant identifiers and explicit links. |
Use the templates under templates/ as structural guidance, not authority to
overwrite user conventions.
A mode change is one configuration operation, dry-run first:
Read the current .vault-meta/mode.json, or start from the helper's default
config when it is absent.
Validate the requested mode as exactly generic, lyt, para, or
zettelkasten. Preserve the other mode-specific settings.
Choose and retain a pinned UTC timestamp and operation ID for both commands.
Preview the canonical configuration transaction; the command records the
current target hash and limits the write to .vault-meta/mode.json:
python3 "$CORE" mode set "$MODE" --vault "$VAULT" \
--generated-at "$GENERATED_AT" --operation-id "$OPERATION_ID"
Show the old mode, new mode, exact changed path, and complete preview. Copy
its approved_plan_sha256 only after review.
Apply by regenerating that exact vault-bound plan:
python3 "$CORE" mode set "$MODE" --vault "$VAULT" \
--generated-at "$GENERATED_AT" --operation-id "$OPERATION_ID" \
--approved-plan-sha256 "$APPROVAL_SHA256" --apply
Follow the operation transaction contract.
Do not use scripts/wiki-mode.py's legacy direct-write set action or a setup
script to bypass this workflow.
Changing mode affects routing for future operations only. Never bulk-create folders, move notes, rewrite wikilinks, or migrate existing pages as a side effect. If migration is later requested, plan and review it as a distinct operation with its own hashes and transaction.
Observe the user's current structure, think about how they retrieve and act on notes, verify a few proposed routes before changing configuration, and grow by revisiting the mode only when real filing friction appears.