Community编程与开发github.com

kepano/obsidian-markdown

创建和编辑 Obsidian 风味 Markdown,支持维基链接、嵌入、标注、属性及其他 Obsidian 特定语法。适用于在 Obsidian 中操作 .md 文件,或当用户提及维基链接、标注、frontmatter、标签、嵌入或 Obsidian 笔记时使用。

obsidian-markdown 是什么?

该技能专注于在 AI 代理环境中生成和编辑 Obsidian 特有的 Markdown 格式。它为 Obsidian 用户和开发者提供了处理 .md 文件所需的关键语法支持,包括维基链接([[wikilink]])、文件嵌入(![[embed]])、标注(> [!note] 类型块)、文档属性(YAML frontmatter)、标签(#tag)以及注释(%% comment %%)等。技能基于官方 Obsidian 文档,确保生成的 Markdown 在 Obsidian 应用中正确渲染。该技能支持主流 AI 代理平台(如 Claude Code、Cursor、Codex),通过识别用户意图(如提到“维基链接”或“Obsidian 笔记”)自动应用相关格式。它遵循 Obsidian 官方规范,但不会涉及第三方插件或主题的自定义语法,从而保证兼容性和可移植性。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/kepano/obsidian-skills/tree/main/skills/obsidian-markdown

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

obsidian-markdown 是做什么的?

创建和编辑 Obsidian 风味 Markdown,支持维基链接、嵌入、标注、属性及其他 Obsidian 特定语法。适用于在 Obsidian 中操作 .md 文件,或当用户提及维基链接、标注、frontmatter、标签、嵌入或 Obsidian 笔记时使用。

关键语法特性

以下是在 Obsidian 中使用的标准 Markdown 语法扩展:

维基链接(Wikilinks)

  • 内部链接:[[笔记名称]]
  • 带显示文本的链接:[[笔记名称|显示文本]]
  • 链接到标题:[[笔记名称#标题]]
  • 链接到块:[[笔记名称#^块ID]]

嵌入(Embeds)

  • 嵌入笔记:![[笔记名称]]
  • 嵌入图片:![[图片.png]]
  • 嵌入音频或视频:![[音频.mp3]]、![[视频.mp4]]
  • 嵌入特定部分:![[笔记名称#标题]]

标注(Callouts)

> [!note] 标题
> 内容

常见类型包括:note、abstract、info、tip、success、question、warning、failure、danger、bug、example、quote

标注还支持:

  • 可折叠标注:> [!faq]- 可折叠标题
  • 嵌套标注
  • 自定义图标(需要主题/插件)

属性(Properties / Frontmatter)

---
title: 笔记标题
date: 2024-01-01
tags:
  - 标签1
  - 标签2
aliases:
  - 别名1
cssclass: 自定义类
---

注释(Comments)

%% 这是用户不可见的注释 %%

标签(Tags)

  • 行内标签:#标签名
  • 嵌套标签:#项目/子项目
  • 属性中的标签(见上方属性示例)

使用指南

  1. 检测需求:当用户提及“维基链接”、“标注”、“Obsidian”、“双链”或“嵌入”时,使用本技能。
  2. 应用格式:根据上下文选择适当的 Obsidian 特定语法。
  3. 验证输出:确保生成的 Markdown 在 Obsidian 中能正确渲染。
  4. 避免第三方语法:不要使用需要特定插件或主题才能生效的语法。

最佳实践

  • 对笔记之间链接使用维基链接,而非标准 Markdown 链接。
  • 使用嵌入来整合相关内容,而非复制粘贴。
  • 使用标注来结构化笔记中的提示、警告或引用。
  • 使用属性(YAML frontmatter)存储元数据,而非在正文中创建自定义格式。

相关资源

Individual skills in this repo

This repo contains 5 individual skills — each has its own dedicated page.

kepano/defuddle

Extract clean markdown content from web pages using Defuddle CLI, removing clutter and navigation to save tokens. Use instead of WebFetch when the user provides a URL to read or analyze, for online documentation, articles, blog posts, or any standard web page. Do NOT use for URLs ending in .md — those are already markdown, use WebFetch directly.

kepano/json-canvas

Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.

kepano/knap

Render Markdown from templates and structured data using Knap CLI. Use when the user asks to apply a Knap template, turn JSON or CSV data into notes, batch-generate Markdown files, or format Defuddle output into a note.

kepano/obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-cli

Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.

相关技能