スキップしてメイン コンテンツに移動

Connecting Obsidian with Claude Code: Developing claude-obsidian-task

Many researchers and developers use Obsidian for project management. I'm one of them. I wanted to store instructions and tasks in Obsidian and have AI execute them—this idea led to the development of claude-obsidian-task.

The Challenge: Complexity of Task Instructions to AI

Claude Code is a powerful AI coding assistant, but there are challenges when requesting complex tasks.

Context Fragmentation

Project background, past research results, related documents—copying and pasting these every time is inefficient. All information is organized in Obsidian, yet manual transcription was required to communicate it to the AI.

Scattered Work Records

Where to save the results of AI conversations? Chat history flows away and becomes hard to reference later. Returning work results to Obsidian also required manual effort.

Features of claude-obsidian-task

This tool seamlessly connects Obsidian and Claude Code.

Direct Reading from Obsidian Vault

/obsidian-task project/01

With this single command, instruction files within Obsidian Vault are automatically found and loaded. It searches using fuzzy matching, so entering project/01 will find the project/01_task-name directory.

Review-Enabled Workflow

By default, an "execution specification" is created before task execution, requesting user approval.

/obsidian-task project/01              # Execute after review
/obsidian-task project/01 --skip-review # Skip review
/obsidian-task project/01 --review-only # Create spec only

This prevents the AI from going in unintended directions and allows you to verify the plan in advance.

Automatic Result Saving

After task completion, results are automatically saved to the same directory.

All records remain within Obsidian, making later reference and search easy.

Sub-agent Integration

If sub-agents are defined in the project's CLAUDE.md, they are automatically utilized.

  • project-manager: Planning
  • architecture-specialist: Design tasks
  • python-specialist: Python implementation
  • test-runner: Test execution

Workflow Overview

The following diagram shows the flow from command execution to completion.

Installation

git clone https://github.com/manabelab/claude-obsidian-task.git
cd claude-obsidian-task
./setup.sh

The setup script will ask for your Obsidian Vault path and automatically configure settings.

Usage Example

For example, suppose you have a new feature implementation task.

  1. Create project/feature-auth/01_instructions.md in Obsidian
  2. Write the instruction content (requirements, constraints, links to references, etc.)
  3. Run /obsidian-task project/feature-auth in Claude Code
  4. Review and approve the execution specification
  5. After task completion, the result report is automatically saved

This workflow integrates task management with AI utilization, improving work transparency and reproducibility.

Conclusion

claude-obsidian-task is a tool for Obsidian users to more effectively utilize Claude Code. It provides a consistent workflow from reading instructions to saving results.

Please give it a try. Feedback and contributions are welcome.

コメント

このブログの人気の投稿

Sourcetreeを使って、特定のブランチやタグをローカルに再現する方法 - フェッチ(fetch)を使おう -

今や、プログラミング開発に欠かせない存在となったGit。上司や同僚から「修正版をブランチ"devlop"にプッシュしたから、それを反映させてね」「安定版はタグ”v1.2”だから、よろしくね」と言われることもあるでしょう。その時に「どうやってブランチやタグって変えたらいいかわからない」「そもそも言われたブランチやタグが見当たらないんだけど…」となったら、とても困ってしまいます。そんなときにどうしたらいいか、本記事では Sourcetree を使用している環境を想定して、おすすめの手順を紹介します。環境によって具体的な操作は異なるものの、手順自体は一緒です。基本的には、 フェッチ(fetch)をしてリモートリポジトリをちゃんと確認 すればよいのです。 1. コミットしていないファイルをなくそう まず、Sourcetreeのコミット一覧に「コミットされていない変更があります」とあるかどうか確認します(下記図赤下線参照)。「コミット」の箇所に青マークでコミットされてないファイル数も表示されます(下記図赤枠参照)。その変更をコミットするか、破棄するかを行い、コミットされていない変更がない、きれいな状態にしましょう。そうしないと、後の作業中にエラー等が発生して進まなくなってしまいます。 2. フェッチしよう フェッチとは、 リモートリポジトリの最新の履歴の取得だけを行う 操作です。これによって、自分から見えていなかったブランチ・タグが見えるようになります。ブランチへのマージが伴うプッシュやプルと異なり、単に履歴を取得するだけなので、意図しないコミットが発生しません。安心して実施しましょう。Sourcetreeでは下記図赤枠部分をクリックすれば、フェッチを行うことができます。 その際出てくるポップアップで「すべてのリモートからフェッチ」「全てのタグを取得」をチェックしてください(下図赤下線参照)。 3. 目的のブランチ・タグを見つけよう 目的のブランチ・タグを見つけるのに便利なのが、Sourcetreeの左側領域にある「ブランチ」「タグ」「リモート」「スタッシュ」です。目的のブランチを探したい場合は「リモート」をクリックして現れる「origin」をさらにクリックしましょう。これでリモート上にあるブランチの一覧を見ることができます。タグの場合は「タグ」をクリック...

SourcetreeでGitHubのプライベートリポジトリをクローンする

Sourcetree は、初心者でも操作しやすいgitのGUIツールです。基本無料のソフトなので、あらゆる人が導入・利用しやすいという利点を持ちます。ですが、GitHubで非公開、つまりプライベートのリポジトリを取り扱う場合には、初期設定に一工夫が必要です。 本記事で紹介する設定の流れは以下の通りです。前提として、1)GitHubのアカウントとプライベートリポジトリを既に所有しているが、2)Sourcetreeを自身のPCにまだインストールしていない状態を想定しています。 GitHubのPersonal access tokenを作成する Sourcetreeを自身のPCにインストールする SourcetreeにGitHubのアカウントを登録する プライベートリポジトリをクローンする 今回はPersonal access tokenという手法を用います。秘密鍵や公開鍵が必要なSSH接続とは異なり、アカウント名とパスワードのみで認証できます。そのため、アカウント管理がより重要となりますので、 2段階認証 でより強力なアカウント保護をおこなうことをお勧めします。また、本記事で紹介するのはWindowsでの利用です。Macでもほぼ同じ流れになるかと思いますが、試してはいませんのでご了承ください。 1. GitHubのPersonal access tokenを作成する GitHubのPersonal access tokenとは、GitHub API またはコマンドラインを使用するときに GitHub への認証でパスワードの代わりに使用できる機能です。このトークンを自身のGitHubアカウントで作成することで、Sourcetreeからプライベートリポジトリにアクセスすることができるようになります。具体的な作り方は下記のGitHub公式ページををご参考ください。 Personal access tokenの作成方法: https://docs.github.com/ja/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token ポイントは手順8に書かれているS ...

GitHubのプライベートリポジトリからクローンできてもプッシュできないときの対処法 - Write権限の有無を確認しよう -

 以前、 SourceTreeを使って、GitHubのプライベートリポジトリにアクセスする方法 を記事にしました。その際、プライベートリポジトリからクローンできても、プッシュできない!という現象に遭遇するときがあります。下記のように、”そんなリポジトリは存在しないよ”というエラーが表示されます。 remote: Repository not found. もし、そのリポジトリがOrganaizationに属するものならば、 あなたのアカウントの権限が”Read”のみで、”Write”になっていない 可能性があります。権限に関してOrganaizationの管理者に確認してもらいましょう。 管理者がどういうルールで権限を決定しているのかによって、対応が変わるかと思います。一番手っ取り早い対応は、全てのメンバーのデフォルト権限を”Write”に変えてしまえばよいでしょう。Organaizationのページの右上にある「Settings」をクリックし、左に表示されるメニューから「Member privileges」を選択します。すると、左下のような画面が表示されますので、赤枠で囲っている「Base permissions」のプルダウン部分を"Write"に変更してください。 その他に、リポジトリ毎にアクセスできるメンバーを管理したい場合もあるかと思います。その際にはリポジトリの「Settings」→「Manage access」を選択し、設定等を変更してください。