packages/thinking-framework-skills/skills/convert-to-topic/SKILL.md
Convert an existing non-topic directory into a standard Obsidian knowledge tree topic node by generating README.md and FAQ.md.
npx skillsauth add edisonlzy/ai-codemons convert-to-topicInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
See Framework Structure for the canonical Obsidian knowledge tree structure definition.
See Configuration Check Flow before executing this skill.
Convert an existing non-topic directory into a standard topic node by analysing its current contents, generating README.md and FAQ.md from what already exists, and applying Obsidian-flavoured formatting. Preserves all existing files; only adds or updates structure files.
--recursive flag to convert subdirectories as wellFor the target directory:
README.md already exists, read it fully to extract any existing definition or boundary information.FAQ.md already exists, note it and skip creation for that file.README.md (first 30 lines) to understand its scope.*.md files in the directory (first 50 lines each) to infer topic context.Build a Directory Snapshot in memory:
target/
├── README.md? (exists / missing)
├── FAQ.md? (exists / missing)
├── 1.知识文档A.md (existing knowledge doc with index)
├── 2.知识文档B.md (existing knowledge doc with index)
├── subtopicA/ (has README? y/n)
└── subtopicB/ (has README? y/n)
注意:知识文档应带序号前缀(如 1., 2.),无序号的文件在转换时应提醒用户补充序号。
Using the directory name and collected content, infer:
| Field | Source |
|---|---|
| Topic name | Directory name (humanized, e.g. frontend-dev → Frontend Dev) |
| One-sentence definition | User-provided override, or extracted from existing README/notes, or generated from directory name |
| Includes | Subdirectory names + existing note themes |
| Excludes | Siblings in the parent directory that share domain but are clearly separate |
If definition cannot be confidently inferred, ask the user:
❓ Could not infer a clear definition for "[directory_name]".
Please provide a one-sentence definition, or press Enter to skip:
📋 Directory analysis for: [target_path]
README.md → [EXISTS / MISSING]
FAQ.md → [EXISTS / MISSING]
Planned actions:
✏️ Create README.md (or "⏭️ Skip README.md — already exists")
✏️ Create FAQ.md (or "⏭️ Skip FAQ.md — already exists")
Proceed? [Y/n]
If the user declines, stop.
⚠️ 约束:如果需要新创建文件,只需要参考模版生成文件的内容结构即可,不要乱加任何未提及的内容。
Use resources/README-template.md as the base. Fill in all inferred metadata (topic name, definition, includes/excludes, sub-topic index). Leave sections as placeholders only when no information is available.
⚠️ 约束:如果需要新创建文件,只需要参考模版生成文件的内容结构即可,不要乱加任何未提及的内容。
Use resources/FAQ-template.md as the base. Fill in {{topic}} with the topic name and {{tags}} with relevant tags inferred from the directory context.
This step is REQUIRED for both files. Follow the complete workflow defined in Optimize Topic Files.
After files are created/confirmed, update the parent directory's README.md:
[parent]/README.md.## Sub-topic Index section.## Sub-topic Index
- [[topicName/README|Topic Name]]
## Sub-topic Index does not exist in the parent, append it.README.md, skip this step and warn the user:⚠️ Parent directory has no README.md — sub-topic index not updated.
Run "convert topic [parent_path]" to initialize the parent first.
--recursive)If the --recursive flag was provided, repeat steps 1–7 for each immediate subdirectory that is missing a README.md.
Present a summary before starting:
🔁 Recursive mode: the following subdirectories will also be converted:
- subtopicA/ (missing README.md)
- subtopicB/ (missing README.md)
- subtopicC/ (README.md exists — skipped)
Continue? [Y/n]
Process each directory in order. If any subdirectory fails, log the error and continue with the rest.
✅ Conversion complete!
[target_path]/
├── README.md ← created (or updated)
├── FAQ.md ← created (or updated)
├── 1.知识文档A.md ← existing (untouched)
├── 2.知识文档B.md ← existing (untouched)
├── subtopicA/
│ ├── README.md ← created (recursive)
│ ├── FAQ.md ← created (recursive)
│ └── 1.子topic文档.md ← existing (untouched)
└── subtopicB/
├── README.md ← created (recursive)
└── FAQ.md ← created (recursive)
Parent README updated: [parent_path]/README.md
Note: If existing knowledge documents lack numbered prefixes, warn the user:
⚠️ Warning: Some knowledge documents are missing index prefixes.
Consider renaming them to: 1.xxx.md, 2.xxx.md, etc.
ls -la <path>tree -L 2 <path>head -n 50 <file>development
# Retrieve Topic Node ## Goal Locate the most relevant topic directory in the knowledge tree based on the user's request. Following the progressive disclosure principle, traversal starts from the vault root and descends layer by layer, with user confirmation at each proposed match. ## Runtime Environment 本 Skill 由主 Agent 调用,dispatch 一个 **general-purpose subagent** 来执行实际的检索操作。 - 主 Agent 负责任务分发和结果聚合 - Subagent 执行目录遍历和关键词匹配 - Subagent 仅返回检索结果,不做决策 ## Input - Vault root path (resolved from con
development
Apply Obsidian-flavoured formatting to a topic node's README.md, FAQ.md, and content knowledge-point files using standard templates.
development
Locate the most relevant topic directory in the Obsidian knowledge tree based on a search query.
development
Divide a large topic into smaller, well-defined sub-topic nodes through web research and user collaboration.