SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

Obsidian in Cursor is the Best for Note Management

Nice to meet you. I am ShotoVimmer.
I usually work as a frontend engineer, designer, and PM at a web-related company.
To get right to the point, a tweet I posted recently received a great response.


At the time of posting, I only had about 10 followers, but thanks to many people, including Mr. Motoki, sharing it, it reached over 80,000 impressions.

As a token of my appreciation, I wanted to write an article summarizing that tweet in more detail, which is why I am writing this now.

Request
I wanted many people to share it via repost, so I used a "free with repost" format. I appreciate your understanding.

I have changed it to be free for everyone! Please be sure to read it to the end.



※ If there are any errors or room for improvement in the content below, please send a mention or message to my account at https://x.com/shotovim.


About my Obsidian

Obsidian operation

My personal Obsidian configuration diagram


About note management

I manage my notes using GitHub. Similarly, I use GitHub to sync Obsidian between mobile and desktop. For the integration between Obsidian and GitHub, I use obsidian-git .

I used to use iCloud for management and syncing, but it had the following issues:

  • Sync speed is extremely slow

  • Can only sync between Mac and iPhone

Also, since I use GitHub frequently, I migrated to GitHub management for these reasons.

By using GitHub, I feel that the user experience of taking notes on mobile has improved significantly. This is because I can start using it very quickly by pulling data from Git when using it on mobile (this was not possible with iCloud).

However, I also feel there are issues with GitHub management.

  • Managing image files causes processing issues on mobile (timeouts)

  • Edits on mobile and desktop can sometimes conflict

I have solved the former (details will be explained later), but the latter has not been solved yet. However, even considering these issues, I believe GitHub management is an excellent method.

Regarding image management

For image management, I use AWS S3 to store all image data. To integrate Obsidian with S3, I use s3-image-uploader. By storing images in S3, I resolved the issue of timeouts during mobile synchronization.

Regarding Kindle

I highlight what I learn on Kindle and export those highlights to Obsidian. To integrate Obsidian with Kindle, I use Kindle Highlights. Books contain a lot of knowledge that cannot be obtained from articles, and I find them extremely valuable for accumulating knowledge.

Regarding Anki

Anki is a flashcard app that enables spaced repetition.
I use Anki to memorize things I want to remember long-term. My Anki workflow is also based on Obsidian; I create decks in Obsidian and then sync them with Anki. For syncing Obsidian with Anki, I use Obsidian_to_Anki. Cursor I will introduce how to create Anki decks using Cursor later.

Regarding Cursor

I usually take notes using the Obsidian app. However, when I want to use Cursor or perform advanced Vim operations, I use Cursor. I will introduce how to utilize Cursor in detail later, so I will omit it here.

Obsidian note structure

My note structure is a customized version of the Zettelkasten framework. Regarding Zettelkasten, I recommend Mr. Tsumuraya's video as it is very easy to understand.

Structure diagram

.
├── Zettelkasten/
│   ├── FleetingNote/
│   ├── IndexNote/
│   ├── LiteratureNote/
│   ├── PermanentNote/
│   └── Zettelkastenの運用/
├── Daily/
├── MEMO(Thino)/
└── Template/
  • PermanentNote (Top level)

    • LiteratureNote

    • FleetingNote

  • Daily

  • Memo

  • IndexNote

The roles of each note are as follows.

  • PermanentNote: The top-level note, used for archiving. It is created by summarizing content based on LiteratureNote and FleetingNote.

  • LiteratureNote: A note that summarizes information from reference materials and literature. However, it currently functions as a place to accumulate articles and is not fully operational.

  • FleetingNote: A note for recording temporary thoughts or ideas. I use it to record things I want to summarize in broad categories, but this is also not fully operational.

  • Daily: Used to record more detailed notes (scribbles).

  • Memo: Used to record things that come to mind.

  • IndexNote: A note that functions as a table of contents or index.

PermanentNote is positioned at the top of the note structure and is created by integrating content from LiteratureNote and FleetingNote.

Also, Daily and Memo are basically independent, and I try to link them to LiteratureNote as appropriate.

Reason for the structure

The reason I use tags when managing notes is that I want to manage them efficiently. In programming, there are a wide variety of architectures, and they must be selected based on the right tool for the job. Applying an architecture helps in quickly understanding the responsibilities of many files and leads to the promotion of team development. However, I believe these complex architectures are unnecessary for note management. The reasons are the following two points.

  • The target is an individual, not a team

  • Each note (memo) is independent

For these reasons, I adopted a management method using tags instead of a hierarchical structure. I believe that the best way to find notes is through search, and that navigating hierarchies is inefficient.

Until two years ago, I used a hierarchical structure managed with a Notion database. However, as a result of adding unnecessary hierarchies one after another, I faced the problem of losing track of the notes I wanted to see. Therefore, I decided to use tags and manage them in a basically flat structure, following the Zettelkasten framework.

Note that since many people may not be familiar with Zettelkasten, I have used "memo" = LiteratureNote, FleetingNote, and "note" = PermanentNote in the following text.

Practice

This is where the main topic begins.

1. Create summary notes from memos and articles in Cursor

Here, I will introduce an example of creating summary notes from memos using Cursor. Specifically, I am assuming the following pattern.

  • Summarizing articles clipped on the web

  • Create summary notes from Kindle highlights

  • Summarize daily notes

Below, I will introduce an example of summarizing articles clipped on the web and how to summarize Kindle highlights. Note that there is no major difference in the method for summarizing notes.

Summarizing articles clipped on the web

1. Save the articles you want to summarize using Obsidian Web Clipper
Obsidian Web Clipper You can save any web page to Obsidian by using the Chrome extension called
Use this to prepare multiple articles.

Example of web clipping with Obsidian Web Clipper

2. Consolidate multiple prepared articles into one file using Cursor Composer Agent

There are two ways to specify files: specifying them directly or leaving it to the Agent.

  • Direct specification: Effective when there are few files, and you can reliably specify the files you want to summarize.

  • Leave it to the Agent: Effective when there are many files. However, since it searches the codebase, you need to be careful as files might be missed if the prompt wording is not adjusted.

Examples of each pattern are listed below.

When files are specified directly

When a note is created by specifying files directly to the Cursor Agent

When left to the Agent
Success example
All notes with the 'clippings' tag and the condition 'React' have been retrieved

When a note is created by leaving it to the Cursor Agent (success example)

Failure example
Only one note with the 'clippings' tag and the condition 'React' has been retrieved

When a note is created by leaving it to the Cursor Agent (failure example)

When left to the Agent
Success example
All notes with the 'clippings' tag and the condition 'React' have been retrieved.

Failure example:
Only one note with the 'clippings' tag and the condition 'React' has been retrieved.

As shown above, when leaving it to the Agent, be aware that the output may fail.

3. Update the output file

80% of what I wanted to do is done by this point, but I would like to polish the content a little more. I want specific code, so I will flesh out the content.

Fleshing out the generated note

4. Link files together

This is an optional task, but since I create notes based on the Zettelkasten framework, I need to link the notes I referenced to this current note. By using a prompt like the one below, it becomes possible to link the referenced notes to this current note. (If there are not many changes, you can add them yourself.)

Linking the generated note to other notes

Here is the note completed through this flow.

Completed note 1 summarizing the memos
Completed note 2 summarizing the memos


Creating a summary note from Kindle highlights

In reading, it is a recent common belief that output is effective. By actively writing down what you have read into notes, what you have learned is organized. However, creating a summary note from scratch can be daunting, and you may often not know what to write. Therefore, I use a combination of Kindle highlights and Cursor.

  • Obsidian plugin: Kindle Highlights

  • Cursor: Cursor Composer Agent

Since this is not much different from the previous method, I will only introduce the parts that are different.

1. Highlight in Kindle

Highlight interesting parts or important points within the Kindle app.

2. Import highlight content into Obsidian with Kindle Highlights

Use the Kindle Highlights plugin to import Kindle highlight content into Obsidian.

Kindle Highlights settings

The setup is simple.
First, set the hierarchy for the notes you want to output and configure your Amazon region settings. Next, by completing initial settings such as signing in to Amazon Kindle, you can import highlight content with a single click from the Obsidian sidebar.
The imported results will look like this.

Example of importing Kindle highlights into Obsidian

Generating with Cursor Compose Agent

For how to generate using the Cursor Compose Agent, please refer to the steps mentioned earlier. When I summarize Kindle content, I do so by creating comprehension check questions. I will show you an example of that here.

Example of creating a question note from notes with imported highlights
Preview of a question note

2. Tagging in Cursor

Here, I will introduce how to use Cursor to tag Obsidian notes and memos. In Obsidian, you can set properties for each note. By utilizing properties, you can link notes together or define file types. In particular, I believe that among these properties, tags are extremely useful.

  • Enables efficient searching using "tag:~~"

  • Allows categorization using tags even with a flat note management structure

Based on these points, I feel that tags are superior in terms of searchability and management.

On the other hand, there are some disadvantages to tagging.

  • Tagging itself is time-consuming, and it is difficult to maintain consistency across a large number of notes and memos

  • If the number of tag types increases too much, management becomes complicated, making it difficult to find the desired tag

  • Without setting unified tagging rules or naming conventions, synonymous tags will proliferate, reducing search efficiency

Given these disadvantages, it is important to carefully consider tag design and naming conventions in advance to perform efficient tagging.

Therefore, I manage tags using the following rules. (This operational method is currently being implemented, and my own tags have not yet finished being refactored.)

タグの設計と命名規則

1. 一貫性のある命名
小文字統一:タグ名はすべて小文字で記述します。
例:#meeting、#project-alpha
スペースの禁止:タグ名にスペースは使用せず、単語間の区切りにはハイフン(-)やアンダースコア(_)を使用します。
例:#to-do、#research_notes

2. タグの種類の明確化
タグは内容タグを中心とし、状態タグや時間タグ、場所タグは使用禁止とします。
◯
内容タグ:ノートの主題やトピックを表すタグ。
例:#python、#データ分析
×
状態タグ:ノートの進捗や状態を示すタグ。
例:#未整理、#要修正、#完了
時間タグ:日時や期間に関するタグ。
例:#2023、#Q1、#2023/10/01
場所タグ:場所やロケーションに関するタグ。
例:#東京、#オフィス


3. 単数形と複数形の統一
基本は単数形:タグ名は基本的に単数形を使用します。
例:#note(×#notes)、#task(×#tasks)

4. 特殊文字の使用制限
禁止文字:タグ名にスペース、特殊記号、絵文字は使用しません。
許可文字:ハイフン(-)、アンダースコア(_)、スラッシュ(/)のみ使用可能です。

5. 新規タグ作成前の確認
既存タグの確認:新しいタグを作成する前に、同義または類似のタグがないか確認します。
目的:タグの重複や乱立を防ぎ、一貫性を保つため。

6. 定期的なタグの見直し
タグクリーンアップ:定期的にタグの一覧を見直し、不要なタグや重複しているタグを整理します。
頻度:毎月30日

7. タグ命名のガイドライン
具体的かつ簡潔に:タグ名はノートの内容を的確に表す、具体的で簡潔なものにします。
例:#マーケティング戦略(○)、#戦略(×:曖昧)
略語の使用:一般的に認識されている略語のみ使用します。
例:#AI(人工知能)、#UI(ユーザーインターフェース)

8. 固有名詞の取り扱い
正式名称を使用:人物名や組織名、地名などの固有名詞は正式名称を使用します。
例:#山田太郎、#株式会社テック

9. タグの複数付与
関連タグの併用:必要に応じて複数のタグをノートに付与します。
ただし付与するタグの数は最大で5つまでとします。
目的:多面的な検索を可能にし、ノートの発見性を高めるため。

10. タグ一覧の共有
ドキュメント化:使用しているタグの一覧とその説明をドキュメント化し、アクセス可能な場所に保管します。
indexNote > タグ一覧 から閲覧可能です。

11. 禁止タグ
デフォルトで存在するテンプレートの見出しである、
- TODO
- ROUTINE
	- daily-routineなど
- JOURNAL
に関するタグに含んではいけない。
その他
- STUDY
- EXERCISE
は毎日行うものであるためタグから除外する。

With these rules,

  • If the number of tag types increases too much, management becomes complicated, making it difficult to find the desired tag

  • Without setting unified tagging rules or naming conventions, synonymous tags will proliferate, reducing search efficiency

It becomes possible to address the problem of.

On the other hand, the previously mentioned tagging itself is cumbersome, and to solve the challenge of maintaining consistency across a large number of notes, Cursor Compose Agent is useful.

In the following example, the Cursor Agent searches for notes within a specified period and performs the process of assigning appropriate tags based on the content of each note. At this time, by applying tag management rules, consistent tags can be assigned.

Example 1 of tagging according to tag rules

~omitted~

Example 2 of tagging according to tag rules

In this flow, the Cursor Agent automatically assigns tags according to the tagging rules.
With this,

tagging itself is cumbersome, and it is difficult to maintain consistency across a large number of notes

It becomes possible to deal with such problems, and it becomes possible to operate while making the most of the benefits of tags.

3. Create Anki decks with Cursor

Here, I will introduce an example of creating an Anki deck using Cursor.
Examples

  • Learning weak words from Duolingo with Anki

  • Learning test content with Anki
    I am assuming patterns like these.

Since I am a Duolingo user, I will introduce "Learning weak words from Duolingo with Anki".

1 Get words from Duolingo

Copy words from Duolingo

2 Put the copied words into the Anki format with Cursor Chat
The Anki format I use is as follows. I will have Cursor create a deck based on this format.

START
基本 (裏表反転カード付き)
表面:
{{韓国語}}
裏面
{{日本語}}
Tags: 韓国語
END
Apply the template to the words in Cursor Chat
Example of applying the template to words

3 Synchronize with Anki using Obsidian_to_Anki and link with a unique ID
By executing Obsidian_to_Anki from the sidebar, an ID is assigned.

Example where IDs are assigned to each using Obsidian_to_Anki
Confirm that they have been imported within the Anki app


By creating Anki decks in Obsidian, you can maximize the benefits of AI. I recommend this because it allows you to automate the creation of flashcards, which you previously had to do manually.


Summary

In this article, I introduced three tips you can use with Cursor and Obsidian.
I believe that by combining Cursor and Obsidian, there are many other useful things you can do beyond what I introduced here.
On the other hand, one issue with the current state of Cursor is that it may not always provide the output you expect.
I believe that the most important thing for Obsidian in Cursor is to
always add appropriate tags to the notes you create so that Cursor can understand them better.
Although I haven't compiled statistics, I feel that the Agent's
output accuracy is higher when appropriate tags are added.
Let's enjoy a convenient note management life by adding appropriate tags.


いいなと思ったら応援しよう!