RL RanceLee Tutorials
← Back to tutorials

AI Collaboration in Obsidian: From Conversation to Action

This chapter begins the fifth part: AI Collaboration.

The previous four parts covered Obsidian itself—how to get started, configure, write, and publish. This part covers the other side: with AI tools like Claude Code and Codex that can directly read and write local files, your Obsidian vault is no longer just a notebook for you to read; it also becomes a workbench where AI can work directly.

This chapter first explains how to get started, with three methods in increasing difficulty and automation:

  1. The simplest way: directly give the file path to AI, let it read and process the original file
  2. Obsidian CLI: more efficient than directly reading files, suitable when your vault has many files
  3. Skill: solidify the entire workflow into a single command, fully automated

Directly Give AI the File Path

This is the simplest method—no plugins needed, no CLI knowledge required.

The AI here refers to tools like Claude Code or Codex that can directly read and write local files, not web-based chat interfaces like DeepSeek or ChatGPT.

You just need to give Claude Code or Codex the full path to a file, and it can read the file and process it directly on the original. For example:

  • “Summarize the key points of this note: /Users/yourusername/Documents/Obsidian/01Notes/some-note.md
  • “Translate this article into English and overwrite the original”
  • “Check this draft for typos and logic issues, then fix them”

The AI reads the file content, understands your request, and writes the modified content back. Summarization, translation, polishing, formatting adjustments—these one-off tasks are well suited for this method.

The barrier is extremely low; you can use it right away. The only downside is that you have to manually specify the request and path each time, making it suitable for occasional use.


Obsidian CLI

Directly giving file paths works, but once your vault has many files, AI blindly scanning files becomes slow and the results may not be accurate. That’s where CLI comes in.

After updating to the latest version of Obsidian, a CLI interface is available, allowing AI to directly operate on your vault via commands.

Some may ask: Can’t AI already read my files directly? Why do we need CLI?

Here’s an analogy. Your Obsidian vault is a library with hundreds of books.

Without CLI: When AI needs to find information, it can only search between shelves, flipping through books one by one, or rely on you telling it “go to the third row, second book.”

With CLI: The library gains a retrieval system. AI enters a topic, and the system directly tells it which files are relevant, where they are, what keywords are in the notes—and it can also create new files, update properties, and move content between folders.

The efficiency difference is huge. Once your vault has many files, the accuracy and speed of AI finding things are on completely different levels with or without CLI.

How to Use

The simplest way: directly tell the AI to use CLI during your conversation.

For example, if you want AI to organize your notes, just say: “Use Obsidian CLI to search for content about XXX in my 01Notes/ folder,” and AI will call the obsidian search command to retrieve it, instead of blindly scanning files. Common commands include:

  • Search content: obsidian search vault="OBSIDIAN_VAULT" query="keyword" path="01Notes"
  • Read file: obsidian read vault="OBSIDIAN_VAULT" path="04Output/filename.md"
  • Create note: obsidian create vault="OBSIDIAN_VAULT" path="target-path.md" content="..."
  • List folder: obsidian files vault="OBSIDIAN_VAULT" folder="04Output"

You don’t need to memorize these commands; just tell AI what you want to do and let it choose which command to use.

An even more convenient way is to solidify these operations into a Skill. In the Skill, predefine which operations should be done via CLI, and AI will automatically follow the Skill’s rules without you having to remind it each time. My WeChat Official Account writing Skill works like this—it specifies searching for materials with obsidian search, outputting articles with obsidian create, and setting properties with obsidian property:set. Every time AI runs this Skill, it automatically uses CLI to operate the vault without additional instructions.


Skill: Turn a Workflow into a Single Command

CLI solves the “finding” problem, but you still have to manually state your needs each time. If you have a fixed workflow, you can write it as a Skill, and later run the entire process with a single command.

First, let me explain what a Skill is. Simply put, a Skill is a fixed script you write in advance for AI. You include all the rules, workflows, and formatting requirements. Then, each time you issue a command, AI runs according to this script without needing repeated explanations. If you’ve used Claude Code, a Skill corresponds to the /skill-name command.

Here are some scenarios where I use Skills to process Obsidian files:

Video to text: Bilibili or local videos, extract audio, transcribe to text, organize into Obsidian notes, and drop directly into the inbox folder.

Add bidirectional links: After writing a new note, have AI scan existing notes and add [[bidirectional links]] to related content, weaving the information network.

Write articles: Given a topic, AI searches for materials, confirms the topic direction, learns my writing style, writes a draft, reviews and reduces AI flavor, adds images, and finally outputs the article to the 04Output/ folder.

Proofreading and fact-checking: Throw a finished draft to AI, have it check paragraph by paragraph for errors, logic issues, and claims worth verifying.

These tasks used to be done manually, scattered and time-consuming. With Skills, a single command lets AI run the entire process, and you only need to confirm at key points.

Concepts alone are too abstract. Let’s look at a concrete example of a Skill.

I created a WeChat Official Account writing Skill for the 04Output/ folder, covering the complete writing process from topic selection to publication. Here’s how it works:

Step 1: Find topics. AI can search Reddit, Hacker News, and X for recent hot topics in AI, finance, and technology, and list several candidate topics for you to choose from.

Step 2: Search for materials. After confirming the topic, AI automatically searches for relevant information from the past two years, organizes it into knowledge base files, and saves them.

Step 3: Discuss direction. AI gives you 3-4 writing angles and corresponding outlines to choose from. You confirm before proceeding.

Step 4: Learn style and write draft. Several modes to choose from: read your own published articles to learn your style, apply style templates from authors like Jiubian or Huashu, or specify an article to extract style features on the spot. After learning the style, write the draft.

Step 5: Review. Three passes: content accuracy, reduce AI flavor (replace phrases like “it is worth noting,” “empower,” “in summary”), and polish sentence and paragraph details.

Step 6: Add images and publish. Insert image placeholders, and if needed, directly push to the WeChat Official Account draft box.

Throughout the process, AI uses Obsidian CLI to operate your folder: search existing notes as materials, save briefs and knowledge base files to specified directories, output the final article to 04Output/, and set frontmatter properties. You don’t need to manually move any files.

The screenshot below shows what it looks like when I issue a writing command to AI:

This is just an example for the 04Output/ folder. You can create your own Skills for any folder: a Skill for organizing reading notes, a Skill for summarizing meeting notes, a Skill for reviewing journals… As long as you can clearly describe “what I want AI to do for me in this folder,” you can write it as a Skill.

I have open-sourced this WeChat Official Account writing Skill. If you need it, you can download it directly from my blog: https://blog.discoverlabs.ac.cn/downloads/writing-gongzhonghao-skill/


Summary

What you learned today:

  1. The simplest way: directly give the file path to AI, it can read and process the original file—summarization, translation, modification all work
  2. Obsidian CLI: When your vault has many files, CLI gives AI a “library retrieval system” for more accurate and faster information finding
  3. Skill: Write a fixed workflow as a script, run the entire process with one command, suitable for repetitive workflows

Key points:

  • The three methods increase in difficulty and automation; choose according to your needs
  • The combination of CLI + Skill is the true deep integration of AI and Obsidian
  • You don’t need to write a Skill from scratch; you can have AI write it for you