本提示词指导AI读取《知识库大纲.md》,按五步自动构建Obsidian笔记系统:按二级标题创建文件夹、在H2下创建H3子文件夹、为每个无序列表项创建原子知识点Markdown文件并写入学习资源与通关标准、为每个知识大类创建MOC聚合文件、在根目录创建知识库总览文件,全程遵守幂等性并禁止修改源文件。适用于知识库搭建、笔记系统自动化等场景。
中文版提示词
任务目标:读取当前工作区中的文件《知识库大纲.md》(Markdown格式的结构化知识大纲,包含二级标题H2“##”、三级标题H3“###”和无序列表项“-”)。 第一步:为文件中每一个二级标题(H2)在当前根目录下创建对应的文件夹。 规则:只解析并处理H2,忽略H3与无序列表项;文件夹名与H2文本完全一致(含编号、破折号和文字);创建在当前根目录,不创建嵌套子目录;若文件夹已存在则不报错、不重命名、不删除,直接跳过;严格禁止创建任何Markdown文件、修改《知识库大纲.md》、推测或执行后续步骤、输出解释性文字。 第二步:在每一个H2文件夹下,创建其对应的H3子文件夹。 规则:每个H3归属于最近出现的上一个H2,不跨H2创建;子文件夹名=H3标题文本(不含“### ”,保留全部文字与空格);只能创建在对应H2文件夹内部;已存在则直接跳过;严格禁止创建Markdown文件、修改大纲、处理无序列表项、推测后续步骤、合并/重排/优化目录结构。 第三步:为每一个无序列表项(原子知识点)创建对应的Markdown文件,并将该列表项中的【学习资源】和【通关标准】写入文件内容。 规则:文件创建在对应的“H2文件夹/H3子文件夹/”路径下;文件名格式为“(Knowledge ID)技能名称.md”,与大纲完全一致(遇非法字符做最小必要转义);已存在则跳过并标记“已存在”;严禁合并或拆分列表项、新增或推断资源与通关标准;文件内容严格使用以下模板(字段顺序、标题结构不得修改): --- Knowledge ID: <Knowledge ID> Module: <所属顶级模块名称> Category: <所属知识大类名称> Status: Not Started Last Reviewed: --- # <技能名称> ## 能力定义 - ## 学习资源 - <资源名称> | <类型> | <URL> ## 通关标准 - <可验证的产出或能力描述> ## 自测 / 实践记录 - ## 复盘与迭代 - 说明:“能力定义/自测/复盘”保持为空;“学习资源/通关标准”必须来自大纲;不添加解释性文字;不得创建原子知识点以外的文件、不得修改目录结构或大纲、不得遗漏任何无序列表项。 第四步:在每一个知识大类文件夹(H3对应目录)中,创建一个以“<知识大类名称>MOC.md”命名的Markdown文件,用于链接聚合该目录下所有原子知识点笔记。 规则:每个H3目录只创建一个MOC文件;文件名格式“<知识大类名称>MOC.md”;已存在则跳过并标记“已存在”;MOC内容只能包含该目录下所有原子知识点文件的Obsidian双向链接,用无序列表“-”列出,链接格式“[[文件名]]”(不含.md后缀),只链接当前目录文件,按自然顺序列出,不添加标题/说明/分隔线/空占位。 第五步:在根目录创建“知识库总览.md”,作为整个知识库的最高层导航入口。 规则:文件固定创建在根目录;文件名固定为“知识库总览.md”;已存在则跳过并标记“已存在”;内容只能包含所有“<知识大类名称>MOC.md”文件的Obsidian双向链接,用“-”列出,格式“[[文件名]]”(不含.md后缀);只收集文件名以MOC.md结尾且不在根目录的文件;按文件系统自然顺序列出;不添加标题、说明、分隔线、空行或注释。
英文版提示词
Task goal: read the file "知识库大纲.md" (Knowledge Base Outline) in the current workspace—a structured Markdown outline containing H2 headings "##", H3 headings "###", and unordered list items "-". Step 1: create a folder in the current root directory for every H2 heading. Rules: process only H2, ignoring H3 and list items; folder names must exactly match the H2 text (including numbering, dashes, and words); create in the root without nested subdirectories; if a folder already exists, do not error, rename, or delete—skip it; strictly forbidden: creating Markdown files, modifying 知识库大纲.md, guessing or executing later steps, and outputting explanatory text. Step 2: under each H2 folder, create its corresponding H3 subfolders. Rules: each H3 belongs to the most recent preceding H2; subfolder name = H3 heading text (without "### ", preserving all text and spaces); create only inside the corresponding H2 folder; skip if it already exists; strictly forbidden: creating Markdown files, modifying the outline, processing list items, guessing later steps, and merging/reordering/optimizing the directory structure. Step 3: for each unordered list item (atomic knowledge point), create a Markdown file and write its 【learning resources】 and 【pass criteria】 into the file. Rules: create the file at the corresponding "H2 folder/H3 subfolder/" path; filename format "(Knowledge ID)skill name.md", exactly matching the outline (apply minimal necessary escaping for illegal filename characters); skip and mark "already exists" if present; never merge or split list items or add/infer resources or criteria; the file content must strictly use the following template (field order and heading structure must not change): --- Knowledge ID: <Knowledge ID> Module: <top-level module name> Category: <knowledge category name> Status: Not Started Last Reviewed: --- # <skill name> ## Capability definition - ## Learning resources - <resource name> | <type> | <URL> ## Pass criteria - <verifiable output or capability description> ## Self-test / practice log - ## Review and iteration - Notes: leave "Capability definition / Self-test / Review" empty; "Learning resources / Pass criteria" must come from the outline; add no explanatory text; create no files other than atomic knowledge points; do not modify the directory structure or the outline; do not omit any list item. Step 4: in each knowledge-category folder (H3 directory), create a Markdown file named "<knowledge category name>MOC.md" to aggregate links to all atomic knowledge-point notes in that directory. Rules: create exactly one MOC file per H3 directory; filename "<knowledge category name>MOC.md"; skip and mark "already exists" if present; the MOC content may only contain Obsidian wiki-links to all atomic knowledge-point files in that directory, listed with "-", in the format "[[filename]]" (without the .md suffix), linking only files in the current directory, in natural order, with no titles, notes, separators, or empty placeholders. Step 5: create "知识库总览.md" (Knowledge Base Overview) in the root as the top-level navigation entry. Rules: create the file only in the root; the filename is fixed as "知识库总览.md"; skip and mark "already exists" if present; its content may only contain Obsidian wiki-links to all "<knowledge category name>MOC.md" files, listed with "-", in the format "[[filename]]" (without .md); collect only files ending in "MOC.md" that are not in the root; list in the filesystem's natural traversal order; add no titles, notes, separators, blank lines, or comments. 🛠️ **适用 AI 工具**:Claude、ChatGPT、Cursor、Copilot、DeepSeek、Gemini

◯ 评论 0