mcpField
O
obsidian-markdown

obsidian-markdown

github.com/oldwinter生産性1044 回インストール1 週間前に更新
リポジトリ

obsidian-markdown について

Obsidian の記法でノートを作成・編集するエージェント向けの Markdown スキルです。標準的な Markdown に加え、ウィキリンク、コールアウト、埋め込み、プロパティなどの拡張記法を扱います。

主な機能

  1. 01CommonMark と GitHub Flavored Markdown
  2. 02ウィキリンクとブロックリンク
  3. 03埋め込みとコールアウト
  4. 04プロパティとタグ
  5. 05数式と Mermaid 図

活用シーン

  1. 01有効な構文で Obsidian ノートを作成
  2. 02ノート間にリンクや埋め込みを追加
  3. 03コールアウト、プロパティ、図を整形

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/oldwinter/skills --skill obsidian-markdown

インストール後、Claude Code で/obsidian-markdownを入力して読み込まれたか確認します。

詳細

Obsidian Flavored Markdown スキル

このスキルを使うと、スキル互換エージェントが、Obsidian 固有のすべての構文拡張を含む、有効な Obsidian Flavored Markdown を作成・編集できます。

概要

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
テキストの書式設定
スタイル構文例出力
太字**text** または __text__**Bold**Bold
斜体*text* または _text_*Italic*Italic
太字+斜体***text******Both***Both
取り消し線~~text~~~~Striked~~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]]     Search for headings containing "heading"
[[^^block]]       Search for blocks containing "block"

Markdown 形式のリンク

[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 として URL エンコードする必要があります。

埋め込み

ノートの埋め込み
![[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)
外部画像
![Alt text](https://example.com/image.png)
![Alt text|300](https://example.com/image.png)
音声の埋め込み
![[audio.mp3]]
![[audio.ogg]]
PDF の埋め込み
![[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-青色、鉛筆アイコン
abstractsummary, tldr青緑色、クリップボードアイコン
info-青色、情報アイコン
todo-青色、チェックボックスアイコン
tiphint, importantシアン、炎アイコン
successcheck, done緑色、チェックマークアイコン
questionhelp, faq黄色、疑問符
warningcaution, attentionオレンジ色、警告アイコン
failurefail, missing赤色、X アイコン
dangererror赤色、稲妻アイコン
bug-赤色、虫アイコン
example-紫色、リストアイコン
quotecite灰色、引用符アイコン
カスタムコールアウト(CSS)
.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}!")
```
コードブロックの入れ子

外側のブロックでは、バッククォートまたはチルダを多く使用します。

````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$              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)

```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.
%%

水平線

---
***
___
- - -
* * *

プロパティ(フロントマター)

プロパティには、ノートの先頭に YAML フロントマターを使用します。

---
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
%%

参考資料

コメント