note-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

note-creator (Orchestrator Skill)

note-creator(协调器Skill)

Purpose

用途

Given a short user prompt (and optional raw context), this skill MUST:
  1. Classify intent and decide a minimal artifact plan (default: md only)
  2. Select a destination folder and stable naming
  3. Invoke underlying format skills with runtime context
  4. WRITE all generated artifacts to disk following a strict contract
This skill is an ORCHESTRATOR. Generating content without writing files is considered a FAILURE.

给定简短的用户提示(以及可选的原始上下文),本技能必须:
  1. 对意图进行分类,确定最简artifact_plan(默认仅生成md文件)
  2. 选择目标文件夹和稳定的命名
  3. 传入运行时上下文调用底层格式处理技能
  4. 严格按照约定将所有生成的产物写入磁盘
本技能属于协调器,仅生成内容但不写入文件视为执行失败。

Dependencies

依赖

This skill MUST delegate format correctness to:
  • obsidian-markdown/SKILL.md
  • json-canvas/SKILL.md
  • obsidian-bases/SKILL.md

本技能必须将格式正确性校验委托给以下技能:
  • obsidian-markdown/SKILL.md
  • json-canvas/SKILL.md
  • obsidian-bases/SKILL.md

Inputs

输入

  • user_prompt: a short sentence or paragraph describing what to record
  • optional_context_files (optional): raw markdown or text provided by the user

  • user_prompt:描述需要记录内容的短句或段落
  • optional_context_files(可选):用户提供的原始markdown或文本内容

Output Contract

输出约定

CRITICAL: Output paths are relative to CURRENT WORKING DIRECTORY (CWD)
  • The CWD when the skill is invoked is the base (e.g.,
    F:/Project/Obsidian/
    )
  • All outputs MUST be written to:
    <cwd>/outputs/<folder>/<title>/
  • DO NOT write to the skill's own directory
  • When computing paths, always use the current working directory as the base
All outputs MUST be written to:
outputs/<folder>/<title>/
  • note.md (required)
  • diagram.canvas (optional)
  • table.base (optional)
  • meta.json (required)
Rules:
  • <folder> MUST come from rules/folders.md
  • <title> MUST follow rules/naming.rules.md
  • Writing files is mandatory

重要提示:输出路径是相对于当前工作目录(CWD)的相对路径
  • 调用本技能时的CWD为根路径(例如
    F:/Project/Obsidian/
  • 所有输出必须写入到:
    <cwd>/outputs/<folder>/<title>/
  • 禁止写入到技能自身的目录
  • 计算路径时,始终以当前工作目录为根路径
所有输出必须写入到如下路径:
outputs/<folder>/<title>/
  • note.md(必填)
  • diagram.canvas(可选)
  • table.base(可选)
  • meta.json(必填)
规则:
  • <folder> 必须来自 rules/folders.md 中定义的取值
  • <title> 必须遵循 rules/naming.rules.md 中的命名规则
  • 文件写入是强制要求

Algorithm (Strict Execution Checklist)

执行算法(严格执行检查清单)

1) Read Inputs

1) 读取输入

  • Read user_prompt
  • Read any optional_context_files
  • 读取user_prompt
  • 读取所有可选的optional_context_files

2) Classify Intent

2) 意图分类

Produce a STRICT classification JSON according to rules/classify.intent.md. The JSON MUST include:
  • title
  • folder
  • diagram_type
  • artifact_plan (must include "md")
  • tags (3–8)
  • properties (category, created, modified, source)
If the request is a COMPARISON and "base" is included, the JSON MUST ALSO include:
  • base_mode = "comparison"
  • comparison_items: an array of items to compare (slug + display_name + optional fields)
严格按照 rules/classify.intent.md 要求生成分类JSON,JSON必须包含以下字段:
  • title
  • folder
  • diagram_type
  • artifact_plan(必须包含"md")
  • tags(3–8个)
  • properties(category, created, modified, source)
如果请求是对比类需求且包含"base",JSON还必须额外包含:
  • base_mode = "comparison"
  • comparison_items:待对比项的数组(包含slug + display_name + 可选字段)

3) Compute Output Paths

3) 计算输出路径

  • CRITICAL: Get the current working directory (CWD) first
  • CWD is the directory where the user invoked the skill (e.g.,
    F:/Project/Obsidian/
    )
  • Compute all paths as relative to CWD:
    • root_dir = <cwd>/outputs/<folder>/<title>/
    • note_path = <cwd>/outputs/<folder>/<title>/note.md
    • canvas_path = <cwd>/outputs/<folder>/<title>/diagram.canvas
    • base_path = <cwd>/outputs/<folder>/<title>/table.base
    • meta_path = <cwd>/outputs/<folder>/<title>/meta.json
    • compare_dir = <cwd>/outputs/<folder>/<title>/compare/ (comparison only)
  • When writing files, use these full paths or ensure you're in the CWD
  • 重要提示:首先获取当前工作目录(CWD)
  • CWD是用户调用技能的目录(例如
    F:/Project/Obsidian/
  • 所有路径都相对于CWD计算:
    • root_dir = <cwd>/outputs/<folder>/<title>/
    • note_path = <cwd>/outputs/<folder>/<title>/note.md
    • canvas_path = <cwd>/outputs/<folder>/<title>/diagram.canvas
    • base_path = <cwd>/outputs/<folder>/<title>/table.base
    • meta_path = <cwd>/outputs/<folder>/<title>/meta.json
    • compare_dir = <cwd>/outputs/<folder>/<title>/compare/ (仅对比类需求需要)
  • 写入文件时使用上述完整路径,或确保执行时处于CWD目录下

4) Generate and WRITE note.md (MANDATORY)

4) 生成并写入note.md(必填)

  • Invoke obsidian-markdown skill using templates/note.md.prompt
  • The invocation MUST include runtime context:
    • title
    • folder
    • tags
    • properties
    • root_dir (<cwd>/outputs/<folder>/<title>/)
  • The generated markdown MUST be written to disk at: <cwd>/outputs/<folder>/<title>/note.md
  • 使用templates/note.md.prompt调用obsidian-markdown技能
  • 调用时必须传入以下运行时上下文:
    • title
    • folder
    • tags
    • properties
    • root_dir (<cwd>/outputs/<folder>/<title>/)
  • 生成的markdown必须写入到以下磁盘路径: <cwd>/outputs/<folder>/<title>/note.md

5) Generate and WRITE diagram.canvas (CONDITIONAL)

5) 生成并写入diagram.canvas(条件执行)

  • If "canvas" is present in artifact_plan:
    • Select ONE canvas layout template based on diagram_type and content intent:
      • If diagram_type == "sequence":
        • If the note intent is documentation, explanation, sharing, usage instructions, or public-facing content: -> use templates/canvas.sequence.compact.md
        • Otherwise (internal notes, debugging, design reasoning): -> use templates/canvas.sequence.detailed.md
      • If diagram_type == "flowchart": -> use templates/canvas.flowchart.md
      • If diagram_type == "artifact": -> use templates/canvas.artifact.md
      • If diagram_type == "architecture": -> use templates/canvas.architecture.md
      • If diagram_type == "none": -> DO NOT generate diagram.canvas (remove "canvas" from artifact_plan)
    • Invoke json-canvas skill using templates/canvas.prompt
    • The invocation MUST include runtime context:
      • title
      • folder
      • diagram_type
      • artifact_plan
      • root_dir (<cwd>/outputs/<folder>/<title>/)
      • canvas_template (the FULL CONTENT of the selected templates/canvas.*.md)
    • The generated canvas MUST be written to disk at: <cwd>/outputs/<folder>/<title>/diagram.canvas
  • 如果artifact_plan中包含"canvas":
    • 根据diagram_type和内容意图选择一个canvas布局模板:
      • 如果diagram_type == "sequence":
        • 如果笔记意图是文档说明、讲解、分享、使用指引或对外公开内容: -> 使用 templates/canvas.sequence.compact.md
        • 其他场景(内部笔记、调试、设计思路梳理): -> 使用 templates/canvas.sequence.detailed.md
      • 如果diagram_type == "flowchart": -> 使用 templates/canvas.flowchart.md
      • 如果diagram_type == "artifact": -> 使用 templates/canvas.artifact.md
      • 如果diagram_type == "architecture": -> 使用 templates/canvas.architecture.md
      • 如果diagram_type == "none": -> 不生成diagram.canvas (从artifact_plan中移除"canvas")
    • 使用templates/canvas.prompt调用json-canvas技能
    • 调用时必须传入以下运行时上下文:
      • title
      • folder
      • diagram_type
      • artifact_plan
      • root_dir (<cwd>/outputs/<folder>/<title>/)
      • canvas_template (选中的templates/canvas.*.md文件的完整内容)
    • 生成的canvas必须写入到以下磁盘路径: <cwd>/outputs/<folder>/<title>/diagram.canvas

6) Generate and WRITE table.base (CONDITIONAL)

6) 生成并写入table.base(条件执行)

  • If "base" is present in artifact_plan:

    6.1 Comparison Base Mode (PREFERRED for comparisons)

    • If base_mode == "comparison" AND comparison_items is present and non-empty:
    • IMPORTANT:
    • If base_mode == "comparison" BUT comparison_items is missing or empty, this is a classification error.
    • In this case, DO NOT fall back to generic base generation.
    • The execution MUST either:
      • FAIL explicitly; OR
      • Remove "base" from artifact_plan and continue with md-only output.
      1. CREATE compare_dir: <cwd>/outputs/<folder>/<title>/compare/
      2. For EACH item in comparison_items:
        • Generate ONE markdown file: <cwd>/outputs/<folder>/<title>/compare/<slug>.md
        • Use templates/compare.item.md as a strict template.
        • Fill frontmatter fields so Base can render columns:
          • item_type: "skill"
          • name
          • 输入
          • 输出
          • 定位
          • 产物
          • 边界
          • tags (include "对比")
          • source/created/modified (from properties)
        • IMPORTANT:
          • These compare/*.md files are the "rows" of the Base.
          • Do NOT put compare rows into note.md only; they MUST exist as files.
      3. Invoke obsidian-bases skill using templates/base.comparison.prompt The invocation MUST include runtime context:
        • title
        • folder
        • root_dir (<cwd>/outputs/<folder>/<title>/)
        • compare_dir (<cwd>/outputs/<folder>/<title>/compare/)
        • properties (category/created/modified/source)
      4. The generated base MUST be written to disk at: <cwd>/outputs/<folder>/<title>/table.base

    6.2 Generic Base Mode (fallback)

    • Else IF base_mode is NOT "comparison":
      • Invoke obsidian-bases skill using templates/base.prompt
      • The invocation MUST include runtime context:
        • title
        • folder
        • artifact_plan
        • root_dir (<cwd>/outputs/<folder>/<title>/)
      • The generated base MUST be written to disk at: <cwd>/outputs/<folder>/<title>/table.base
  • 如果artifact_plan中包含"base":

    6.1 对比类Base模式(对比需求优先使用)

    • 如果base_mode == "comparison" 且comparison_items存在且非空:
    • 重要提示:
    • 如果base_mode == "comparison" 但comparison_items缺失或为空,属于分类错误
    • 该场景下不要回退到通用Base生成逻辑,执行流程必须二选一:
      • 明确抛出失败;或
      • 从artifact_plan中移除"base",继续仅输出md文件
      1. 创建compare_dir: <cwd>/outputs/<folder>/<title>/compare/
      2. 遍历comparison_items中的每一项:
        • 生成一个markdown文件: <cwd>/outputs/<folder>/<title>/compare/<slug>.md
        • 严格遵循templates/compare.item.md模板
        • 填充frontmatter字段以便Base渲染列:
          • item_type: "skill"
          • name
          • 输入
          • 输出
          • 定位
          • 产物
          • 边界
          • tags (包含"对比")
          • source/created/modified (来自properties)
        • 重要提示:
          • 这些compare/*.md文件是Base的"行数据"
          • 不要仅把对比行放在note.md中,必须作为独立文件存在
      3. 使用templates/base.comparison.prompt调用obsidian-bases技能 调用时必须传入以下运行时上下文:
        • title
        • folder
        • root_dir (<cwd>/outputs/<folder>/<title>/)
        • compare_dir (<cwd>/outputs/<folder>/<title>/compare/)
        • properties (category/created/modified/source)
      4. 生成的base必须写入到以下磁盘路径: <cwd>/outputs/<folder>/<title>/table.base

    6.2 通用Base模式(回退逻辑)

    • 其他如果base_mode不是"comparison"的场景:
      • 使用templates/base.prompt调用obsidian-bases技能
      • 调用时必须传入以下运行时上下文:
        • title
        • folder
        • artifact_plan
        • root_dir (<cwd>/outputs/<folder>/<title>/)
      • 生成的base必须写入到以下磁盘路径: <cwd>/outputs/<folder>/<title>/table.base

7) Generate and WRITE meta.json (MANDATORY)

7) 生成并写入meta.json(必填)

  • Generate meta.json according to rules/output.contract.md
  • Include comparison metadata when applicable:
    • base_mode
    • compare_dir
    • comparison_items
  • Write meta.json to: <cwd>/outputs/<folder>/<title>/meta.json
  • 按照rules/output.contract.md要求生成meta.json
  • 适用场景下包含对比相关元数据:
    • base_mode
    • compare_dir
    • comparison_items
  • 将meta.json写入到: <cwd>/outputs/<folder>/<title>/meta.json

8) Execution Summary

8) 执行总结

  • Output a short summary listing generated files and their final paths

  • 输出简短总结,列出所有生成的文件及其最终路径

File Writing Rules (CRITICAL)

文件写入规则(重要)

  • Every generated artifact MUST be written to disk.
  • Outputting content only in the conversation is NOT allowed.
  • Missing file writes invalidate the execution.
  • Always write files relative to the current working directory, not the skill directory

  • 每个生成的产物都必须写入磁盘
  • 仅在对话中输出内容是不允许的
  • 缺失文件写入会判定执行无效
  • 始终相对于当前工作目录写入文件,不要相对于技能目录

Hard Constraints

强制约束

General

通用约束

  • artifact_plan MUST include "md"
  • folder MUST be from rules/folders.md
  • tags count MUST be 3–8 and include at least one domain tag
  • artifact_plan必须包含"md"
  • folder必须来自rules/folders.md的定义
  • tags数量必须为3–8个,且至少包含一个领域标签

note.md

note.md约束

Must include:
  • YAML frontmatter (tags, category, created, modified)
  • Summary section
  • ≥3 structured sections
  • Examples (code blocks when applicable)
  • ≥5 Caveats / Notes
必须包含:
  • YAML frontmatter(tags, category, created, modified)
  • 总结部分
  • 不少于3个结构化章节
  • 示例(适用场景下包含代码块)
  • 不少于5条注意事项/说明

diagram.canvas (if generated)

diagram.canvas约束(如果生成)

  • Text nodes MUST use "type":"text" and the "text" field
  • MUST NOT use "label" for text nodes
  • ≥6 nodes, ≥5 edges
  • Must include: user request, intent classification, and persistence to root_dir
  • 文本节点必须使用"type":"text"和"text"字段
  • 禁止对文本节点使用"label"字段
  • 不少于6个节点,不少于5条连线
  • 必须包含:用户请求、意图分类、持久化到root_dir的相关信息

table.base (if generated)

table.base约束(如果生成)

  • For comparison mode:
    • MUST scope sources to compare_dir ONLY
    • MUST include only markdown files
    • MUST prefer frontmatter columns from compare/*.md
  • For generic mode:
    • MUST scope sources to root_dir only
    • MUST exclude non-markdown files

  • 对比模式下:
    • 必须仅将compare_dir作为数据源范围
    • 必须仅包含markdown文件
    • 必须优先使用compare/*.md中的frontmatter字段作为列
  • 通用模式下:
    • 必须仅将root_dir作为数据源范围
    • 必须排除非markdown文件

Examples

示例

See examples/ directory:
  • e2e-docker.md
  • e2e-arch.md
  • e2e-table.md
参考examples/目录下的文件:
  • e2e-docker.md
  • e2e-arch.md
  • e2e-table.md