obsidian-markdown by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill obsidian-markdown此技能使 Claude Code 能够创建和编辑有效的 Obsidian Flavored Markdown,包括所有 Obsidian 特定的语法扩展。
Obsidian 使用了多种 Markdown 风格的组合:
This is a paragraph.
This is another paragraph (blank line between creates separate paragraphs).
For a line break within a paragraph, add two spaces at the end
or use Shift+Enter.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
| 样式 | 语法 | 示例 |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 输出 |
|---|
| 粗体 | **text** 或 __text__ | **Bold** | Bold |
| 斜体 | *text* 或 _text_ | *Italic* | Italic |
| 粗体 + 斜体 | ***text*** | ***Both*** | Both |
| 删除线 | ~~text~~ | ~~Striked~~ | |
| 高亮 | ==text== | ==Highlighted== | ==Highlighted== |
| 行内代码 | code | code | code |
使用反斜杠来转义特殊字符:
\*This won't be italic\*
\#This won't be a heading
1\. This won't be a list item
需要转义的常见字符:\*, \_, \#, \``, |, ~`
[[Note Name]]
[[Note Name.md]]
[[Note Name|Display Text]]
[[Note Name#Heading]]
[[Note Name#Heading|Custom Text]]
[[#Heading in same note]]
[[##Search all headings in vault]]
[[Note Name#^block-id]]
[[Note Name#^block-id|Custom Text]]
通过在段落末尾添加 ^block-id 来定义一个块 ID:
This is a paragraph that can be linked to. ^my-block-id
对于列表和引用,在单独一行添加块 ID:
> This is a quote
> With multiple lines
^quote-id
[[##heading]] 搜索包含 "heading" 的标题
[[^^block]] 搜索包含 "block" 的块
[Display Text](Note%20Name.md)
[Display Text](Note%20Name.md#Heading)
[Display Text](https://example.com)
[Note](obsidian://open?vault=VaultName&file=Note.md)
注意:在 Markdown 链接中,空格必须编码为 %20。
![[Note Name]]
![[Note Name#Heading]]
![[Note Name#^block-id]]
![[image.png]]
![[image.png|640x480]] 宽度 x 高度
![[image.png|300]] 仅宽度(保持宽高比)


![[audio.mp3]]
![[audio.ogg]]
![[document.pdf]]
![[document.pdf#page=3]]
![[document.pdf#height=400]]
![[Note#^list-id]]
其中列表已用块 ID 定义:
- Item 1
- Item 2
- Item 3
^list-id
```query
tag:#project status:done
## 标注
### 基础标注
[!note] This is a note callout.
[!info] Custom Title This callout has a custom title.
[!tip] Title Only
### 可折叠标注
[!faq]- Collapsed by default This content is hidden until expanded.
[!faq]+ Expanded by default This content is visible but can be collapsed.
### 嵌套标注
[!question] Outer callout
[!note] Inner callout Nested content
### 支持的标注类型
类型 | 别名 | 描述
---|---|---
`note` | - | 蓝色,铅笔图标
`abstract` | `summary`, `tldr` | 青色,剪贴板图标
`info` | - | 蓝色,信息图标
`todo` | - | 蓝色,复选框图标
`tip` | `hint`, `important` | 青色,火焰图标
`success` | `check`, `done` | 绿色,对勾图标
`question` | `help`, `faq` | 黄色,问号图标
`warning` | `caution`, `attention` | 橙色,警告图标
`failure` | `fail`, `missing` | 红色,X 图标
`danger` | `error` | 红色,闪电图标
`bug` | - | 红色,虫子图标
`example` | - | 紫色,列表图标
`quote` | `cite` | 灰色,引用图标
### 自定义标注(CSS)
.callout[data-callout="custom-type"] { --callout-color: 255, 0, 0; --callout-icon: lucide-alert-circle; }
## 列表
### 无序列表
### 有序列表
### 任务列表
## 引用
This is a blockquote. It can span multiple lines.
And include multiple paragraphs.
Nested quotes work too.
## 代码
### 行内代码
Use backticks for inline code.
Use double backticks for code with a ` backtick inside.
### 代码块
Plain code block
// Syntax highlighted code block
function hello() {
console.log("Hello, world!");
}
# Python example
def greet(name):
print(f"Hello, {name}!")
### 嵌套代码块
对外层块使用更多的反引号或波浪号:
````markdown
Here's how to create a code block:
```js
console.log("Hello")
## 表格
```
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
```
### 对齐
```
| Left | Center | Right |
|:---------|:--------:|---------:|
| Left | Center | Right |
```
### 在表格中使用竖线
用反斜杠转义竖线:
```
| Column 1 | Column 2 |
|----------|----------|
| [[Link\|Display]] | ![[Image\|100]] |
```
## 数学公式(LaTeX)
### 行内数学公式
```
This is inline math: $e^{i\pi} + 1 = 0$
```
### 块级数学公式
```
$$
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix} = ad - bc
$$
```
### 常见数学语法
```
$x^2$ 上标
$x_i$ 下标
$\frac{a}{b}$ 分数
$\sqrt{x}$ 平方根
$\sum_{i=1}^{n}$ 求和
$\int_a^b$ 积分
$\alpha, \beta$ 希腊字母
```
## 图表(Mermaid)
```
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Do this]
B -->|No| D[Do that]
C --> E[End]
D --> E
```
```
### 序列图
```
```mermaid
sequenceDiagram
Alice->>Bob: Hello Bob
Bob-->>Alice: Hi Alice
```
```
### 在图表中链接
```
```mermaid
graph TD
A[Biology]
B[Chemistry]
A --> B
class A,B internal-link;
```
```
## 脚注
```
This sentence has a footnote[^1].
[^1]: This is the footnote content.
You can also use named footnotes[^note].
[^note]: Named footnotes still appear as numbers.
Inline footnotes are also supported.^[This is an inline footnote.]
```
## 注释
```
This is visible %%but this is hidden%% text.
%%
This entire block is hidden.
It won't appear in reading view.
%%
```
## 水平分割线
```
---
***
___
- - -
* * *
```
## 属性(Frontmatter)
属性在笔记开头使用 YAML frontmatter:
```
---
title: My Note Title
date: 2024-01-15
tags:
- project
- important
aliases:
- My Note
- Alternative Name
cssclasses:
- custom-class
status: in-progress
rating: 4.5
completed: false
due: 2024-02-01T14:30:00
---
```
### 属性类型
类型 | 示例
---|---
文本 | `title: My Title`
数字 | `rating: 4.5`
复选框 | `completed: true`
日期 | `date: 2024-01-15`
日期和时间 | `due: 2024-01-15T14:30:00`
列表 | `tags: [one, two]` 或 YAML 列表
链接 | `related: "[[Other Note]]"`
### 默认属性
* `tags` - 笔记标签
* `aliases` - 笔记的替代名称
* `cssclasses` - 应用于笔记的 CSS 类
## 标签
```
#tag
#nested/tag
#tag-with-dashes
#tag_with_underscores
In frontmatter:
---
tags:
- tag1
- nested/tag2
---
```
标签可以包含:
* 字母(任何语言)
* 数字(不能作为第一个字符)
* 下划线 `_`
* 连字符 `-`
* 正斜杠 `/`(用于嵌套)
## HTML 内容
Obsidian 支持在 Markdown 中使用 HTML:
```
<div class="custom-container">
<span style="color: red;">Colored text</span>
</div>
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd>
```
## 完整示例
```
---
title: Project Alpha
date: 2024-01-15
tags:
- project
- active
status: in-progress
priority: high
---
# Project Alpha
## Overview
This project aims to [[improve workflow]] using modern techniques.
> [!important] Key Deadline
> The first milestone is due on ==January 30th==.
## Tasks
- [x] Initial planning
- [x] Resource allocation
- [ ] Development phase
- [ ] Backend implementation
- [ ] Frontend design
- [ ] Testing
- [ ] Deployment
## Technical Notes
The main algorithm uses the formula $O(n \log n)$ for sorting.
```python
def process_data(items):
return sorted(items, key=lambda x: x.priority)
```
## Architecture
```mermaid
graph LR
A[Input] --> B[Process]
B --> C[Output]
B --> D[Cache]
```
## Related Documents
- ![[Meeting Notes 2024-01-10#Decisions]]
- [[Budget Allocation|Budget]]
- [[Team Members]]
## References
For more details, see the official documentation[^1].
[^1]: https://example.com/docs
%%
Internal notes:
- Review with team on Friday
- Consider alternative approaches
%%
```
## 参考
* [基础格式语法](https://help.obsidian.md/syntax)
* [高级格式语法](https://help.obsidian.md/advanced-syntax)
* [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown)
* [内部链接](https://help.obsidian.md/links)
* [嵌入文件](https://help.obsidian.md/embeds)
* [标注](https://help.obsidian.md/callouts)
* [属性](https://help.obsidian.md/properties)
每周安装次数
263
仓库
[davila7/claude-…emplates](https://github.com/davila7/claude-code-templates "davila7/claude-code-templates")
GitHub 星标数
22.6K
首次出现时间
Jan 21, 2026
安全审计
[Gen Agent Trust HubPass](/davila7/claude-code-templates/obsidian-markdown/security/agent-trust-hub)[SocketPass](/davila7/claude-code-templates/obsidian-markdown/security/socket)[SnykPass](/davila7/claude-code-templates/obsidian-markdown/security/snyk)
安装于
opencode218
claude-code183
gemini-cli175
antigravity158
codex154
cursor149
This skill enables Claude Code to create and edit valid Obsidian Flavored Markdown, including all Obsidian-specific syntax extensions.
Obsidian uses a combination of Markdown flavors:
This is a paragraph.
This is another paragraph (blank line between creates separate paragraphs).
For a line break within a paragraph, add two spaces at the end
or use Shift+Enter.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
| Style | Syntax | Example | Output |
|---|---|---|---|
| Bold | **text** or __text__ | **Bold** | Bold |
| Italic | *text* or _text_ | *Italic* | Italic |
| Bold + Italic | ***text*** | ***Both*** |
Use backslash to escape special characters:
\*This won't be italic\*
\#This won't be a heading
1\. This won't be a list item
Common characters to escape: \*, \_, \#, \``, |, ~`
[[Note Name]]
[[Note Name.md]]
[[Note Name|Display Text]]
[[Note Name#Heading]]
[[Note Name#Heading|Custom Text]]
[[#Heading in same note]]
[[##Search all headings in vault]]
[[Note Name#^block-id]]
[[Note Name#^block-id|Custom Text]]
Define a block ID by adding ^block-id at the end of a paragraph:
This is a paragraph that can be linked to. ^my-block-id
For lists and quotes, add the block ID on a separate line:
> This is a quote
> With multiple lines
^quote-id
[[##heading]] Search for headings containing "heading"
[[^^block]] Search for blocks containing "block"
[Display Text](Note%20Name.md)
[Display Text](Note%20Name.md#Heading)
[Display Text](https://example.com)
[Note](obsidian://open?vault=VaultName&file=Note.md)
Note: Spaces must be URL-encoded as %20 in Markdown links.
![[Note Name]]
![[Note Name#Heading]]
![[Note Name#^block-id]]
![[image.png]]
![[image.png|640x480]] Width x Height
![[image.png|300]] Width only (maintains aspect ratio)


![[audio.mp3]]
![[audio.ogg]]
![[document.pdf]]
![[document.pdf#page=3]]
![[document.pdf#height=400]]
![[Note#^list-id]]
Where the list has been defined with a block ID:
- Item 1
- Item 2
- Item 3
^list-id
```query
tag:#project status:done
```
> [!note]
> This is a note callout.
> [!info] Custom Title
> This callout has a custom title.
> [!tip] Title Only
> [!faq]- Collapsed by default
> This content is hidden until expanded.
> [!faq]+ Expanded by default
> This content is visible but can be collapsed.
> [!question] Outer callout
> > [!note] Inner callout
> > Nested content
| Type | Aliases | Description |
|---|---|---|
note | - | Blue, pencil icon |
abstract | summary, tldr | Teal, clipboard icon |
info | - | Blue, info icon |
todo | - | Blue, checkbox icon |
.callout[data-callout="custom-type"] {
--callout-color: 255, 0, 0;
--callout-icon: lucide-alert-circle;
}
- Item 1
- Item 2
- Nested item
- Another nested
- Item 3
* Also works with asterisks
+ Or plus signs
1. First item
2. Second item
1. Nested numbered
2. Another nested
3. Third item
1) Alternative syntax
2) With parentheses
- [ ] Incomplete task
- [x] Completed task
- [ ] Task with sub-tasks
- [ ] Subtask 1
- [x] Subtask 2
> This is a blockquote.
> It can span multiple lines.
>
> And include multiple paragraphs.
>
> > Nested quotes work too.
Use `backticks` for inline code.
Use double backticks for ``code with a ` backtick inside``.
```
Plain code block
```
```javascript
// Syntax highlighted code block
function hello() {
console.log("Hello, world!");
}
```
```python
# Python example
def greet(name):
print(f"Hello, {name}!")
```
Use more backticks or tildes for the outer block:
````markdown
Here's how to create a code block:
```js
console.log("Hello")
```
````
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
| Left | Center | Right |
|:---------|:--------:|---------:|
| Left | Center | Right |
Escape pipes with backslash:
| Column 1 | Column 2 |
|----------|----------|
| [[Link\|Display]] | ![[Image\|100]] |
This is inline math: $e^{i\pi} + 1 = 0$
$$
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix} = ad - bc
$$
$x^2$ Superscript
$x_i$ Subscript
$\frac{a}{b}$ Fraction
$\sqrt{x}$ Square root
$\sum_{i=1}^{n}$ Summation
$\int_a^b$ Integral
$\alpha, \beta$ Greek letters
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Do this]
B -->|No| D[Do that]
C --> E[End]
D --> E
```
```mermaid
sequenceDiagram
Alice->>Bob: Hello Bob
Bob-->>Alice: Hi Alice
```
```mermaid
graph TD
A[Biology]
B[Chemistry]
A --> B
class A,B internal-link;
```
This sentence has a footnote[^1].
[^1]: This is the footnote content.
You can also use named footnotes[^note].
[^note]: Named footnotes still appear as numbers.
Inline footnotes are also supported.^[This is an inline footnote.]
This is visible %%but this is hidden%% text.
%%
This entire block is hidden.
It won't appear in reading view.
%%
---
***
___
- - -
* * *
Properties use YAML frontmatter at the start of a note:
---
title: My Note Title
date: 2024-01-15
tags:
- project
- important
aliases:
- My Note
- Alternative Name
cssclasses:
- custom-class
status: in-progress
rating: 4.5
completed: false
due: 2024-02-01T14:30:00
---
| Type | Example |
|---|---|
| Text | title: My Title |
| Number | rating: 4.5 |
| Checkbox | completed: true |
| Date | date: 2024-01-15 |
| Date & Time | due: 2024-01-15T14:30:00 |
| List | tags: [one, two] or YAML list |
tags - Note tagsaliases - Alternative names for the notecssclasses - CSS classes applied to the note#tag
#nested/tag
#tag-with-dashes
#tag_with_underscores
In frontmatter:
---
tags:
- tag1
- nested/tag2
---
Tags can contain:
_-/ (for nesting)Obsidian supports HTML within Markdown:
<div class="custom-container">
<span style="color: red;">Colored text</span>
</div>
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd>
---
title: Project Alpha
date: 2024-01-15
tags:
- project
- active
status: in-progress
priority: high
---
# Project Alpha
## Overview
This project aims to [[improve workflow]] using modern techniques.
> [!important] Key Deadline
> The first milestone is due on ==January 30th==.
## Tasks
- [x] Initial planning
- [x] Resource allocation
- [ ] Development phase
- [ ] Backend implementation
- [ ] Frontend design
- [ ] Testing
- [ ] Deployment
## Technical Notes
The main algorithm uses the formula $O(n \log n)$ for sorting.
```python
def process_data(items):
return sorted(items, key=lambda x: x.priority)
```
## Architecture
```mermaid
graph LR
A[Input] --> B[Process]
B --> C[Output]
B --> D[Cache]
```
## Related Documents
- ![[Meeting Notes 2024-01-10#Decisions]]
- [[Budget Allocation|Budget]]
- [[Team Members]]
## References
For more details, see the official documentation[^1].
[^1]: https://example.com/docs
%%
Internal notes:
- Review with team on Friday
- Consider alternative approaches
%%
Weekly Installs
263
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode218
claude-code183
gemini-cli175
antigravity158
codex154
cursor149
Python PDF处理教程:合并拆分、提取文本表格、创建PDF文件
55,400 周安装
| Strikethrough | ~~text~~ | ~~Striked~~ |
| Highlight | ==text== | ==Highlighted== | ==Highlighted== |
| Inline code | code | code | code |
tiphint, important |
| Cyan, flame icon |
success | check, done | Green, checkmark icon |
question | help, faq | Yellow, question mark |
warning | caution, attention | Orange, warning icon |
failure | fail, missing | Red, X icon |
danger | error | Red, zap icon |
bug | - | Red, bug icon |
example | - | Purple, list icon |
quote | cite | Gray, quote icon |
| Links |
related: "[[Other Note]]" |