Write Obsidian-compatible .md notes and .canvas files. Use when creating notes, knowledge bases, daily logs, project docs, or canvas diagrams for Obsidian vaults. Triggers on "obsidian", "canvas", "vault", "笔记".
编写能在 Obsidian 中正确渲染的 .md 和 .canvas 文件。输出到通过 Git 同步的 vault 目录。
默认:~/obsidian-vault/(可根据请求配置)。
标准 Markdown(标题、加粗、列表、代码块)视为已知。仅以下 Obsidian 扩展:
必须是文件中的最开头内容:
yaml
markdown
[[笔记名称]] # 链接到笔记
[[笔记名称|显示文本]] # 自定义显示
[[笔记名称#标题]] # 链接到标题
[[笔记名称^块ID]] # 链接到块
在任何段落/列表项末尾添加 ^块ID:
markdown
这是一个重要的段落。^关键见解
然后链接:[[笔记名称#^关键见解]]
块 ID:仅限小写字母数字和短横线。
markdown
![[笔记名称]] # 嵌入整个笔记
![[笔记名称#标题]] # 嵌入章节
![[image.png]] # 嵌入图片
![[image.png|300]] # 调整宽度为300px
![[image.png|300x200]] # 精确尺寸
![[audio.mp3]] # 嵌入音频播放器
![[video.mp4]] # 嵌入视频播放器
![[document.pdf]] # 嵌入PDF
![[document.pdf#page=3]] # 嵌入特定页面
支持的格式 — 参见 references/file-formats.md。
markdown
[!note] 可选标题
包含 Markdown 和 [[wikilinks]] 的内容。
[!tip]- 可折叠(默认折叠)
隐藏的内容。
[!warning]+ 可折叠(默认展开)
显示的内容。
13 种类型:note、abstract/summary/tldr、info、todo、tip/hint/important、success/check/done、question/help/faq、warning/caution/attention、failure/fail/missing、danger/error、bug、example、quote/cite。
markdown
==高亮文本== # 高亮
%%隐藏注释%% # 不渲染
markdown
#标签 # 简单标签
#父级/子级 # 嵌套标签
标签位于正文或 frontmatter 中。不允许有空格。
markdown
mermaid
graph TD
A[开始] --> B{决策}
B -->|是| C[行动]
B -->|否| D[结束]
完整规范:references/canvas-spec.md
json
{
nodes: [
{
id: node1,
type: text,
x: 0, y: 0,
width: 400, height: 200,
text: # 标题\n\nMarkdown 内容,
color: 4
},
{
id: node2,
type: file,
x: 500, y: 0,
width: 400, height: 400,
file: path/to/note.md,
subpath: #heading
},
{
id: node3,
type: link,
x: 0, y: 300,
width: 400, height: 300,
url: https://example.com
},
{
id: group1,
type: group,
x: -50, y: -50,
width: 1000, height: 500,
label: 组名称,
color: 5
}
],
edges: [
{
id: edge1,
fromNode: node1,
fromSide: right,
toNode: node2,
toSide: left,
color: 1,
label: 关联于
}
]
}
节点类型:text、file、link、group。
颜色:1 红色、2 橙色、3 黄色、4 绿色、5 青色、6 紫色,或十六进制 #FF0000。
边端点:fromEnd/toEnd → none 或 arrow(toEnd 默认为 arrow)。
方向:top、right、bottom、left。
kebab-case.md # 笔记文件
YYYY-MM-DD-title.md # 每日/日期笔记
kebab-case.canvas # canvas 文件
文件名中无空格、无特殊字符、无中日韩文字(为了 Git 跨平台安全)。
vault/
├── 00-inbox/ # 新/未分类笔记
├── 01-projects/ # 活跃项目
├── 02-areas/ # 持续领域
├── 03-resources/ # 参考资料
├── 04-archive/ # 归档笔记
├── assets/ # 图片、PDF、附件
├── canvas/ # .canvas 文件
├── templates/ # 笔记模板
└── .gitignore
gitignore
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/app.json
.trash/
.DS_Store
.smart-connections/
保留 .obsidian/ 的跟踪(排除易变文件),以便插件/主题同步。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 obsidian-writer-1776176792 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 obsidian-writer-1776176792 技能
skillhub install obsidian-writer-1776176792
文件大小: 5.42 KB | 发布时间: 2026-4-15 13:32