← 返回 Skills 市场
37
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laosi-obsidian
功能描述
Obsidian笔记助手 - 通过API创建/搜索/组织Obsidian笔记,支持双向链接、标签管理、图谱分析和每日笔记自动化
使用说明 (SKILL.md)
Obsidian Helper - Obsidian笔记助手
激活词: Obsidian / 笔记 / 知识库 / 双向链接
工作原理
通过操作Obsidian vault中的Markdown文件实现笔记管理。无需插件,直接读写.md文件。
功能
1. 创建笔记
# 在 vault 中创建新笔记
echo "---\
tags: [idea, project]\
created: $(date)\
---\
\
# 新笔记\
\
正文内容" > vault/ideas/新笔记.md
2. 每日笔记
import os
from datetime import datetime
VAULT = r"D:\Obsidian\main-vault"
today = datetime.now().strftime("%Y-%m-%d")
path = os.path.join(VAULT, "Daily", f"{today}.md")
if not os.path.exists(path):
with open(path, "w", encoding="utf-8") as f:
f.write(f"""---
created: {today}
tags: [daily]
---
# {today}
## 今日待办
- [ ]
## 笔记
## 反思
""")
print(f"Created daily note: {path}")
3. 全文搜索
import os, re
VAULT = r"D:\Obsidian\main-vault"
def search_notes(query: str, vault: str = VAULT):
results = []
for root, _, files in os.walk(vault):
for f in files:
if f.endswith(".md"):
path = os.path.join(root, f)
with open(path, encoding="utf-8", errors="ignore") as fh:
content = fh.read()
if query.lower() in content.lower():
results.append((path, content.count(query)))
results.sort(key=lambda x: -x[1])
return results
matches = search_notes("机器学习")
for path, count in matches[:10]:
print(f"{count} hits: {path}")
4. 标签管理
import os, re
VAULT = r"D:\Obsidian\main-vault"
def get_all_tags(vault: str = VAULT):
tags = {}
for root, _, files in os.walk(vault):
for f in files:
if f.endswith(".md"):
path = os.path.join(root, f)
with open(path, encoding="utf-8") as fh:
for m in re.finditer(r"#(\w[\w-]*)", fh.read()):
tag = m.group(1)
if tag not in ["obsidian"]:
tags[tag] = tags.get(tag, 0) + 1
return sorted(tags.items(), key=lambda x: -x[1])
for tag, count in get_all_tags():
print(f"#{tag}: {count} notes")
5. 双向链接检测
import os, re
VAULT = r"D:\Obsidian\main-vault"
def find_backlinks(target: str, vault: str = VAULT):
backlinks = []
pattern = re.escape(f"[[{target}]]")
for root, _, files in os.walk(vault):
for f in files:
if f.endswith(".md"):
path = os.path.join(root, f)
with open(path, encoding="utf-8") as fh:
if re.search(pattern, fh.read()):
backlinks.append(path)
return backlinks
links = find_backlinks("机器学习")
for l in links:
print(f" ← {l}")
6. 图谱数据导出
import os, re, json
VAULT = r"D:\Obsidian\main-vault"
def export_graph(vault: str = VAULT, output: str = "graph.json"):
nodes, edges = [], []
notes = [f.replace(".md", "") for f in os.listdir(vault) if f.endswith(".md")]
for note in notes:
path = os.path.join(vault, f"{note}.md")
if os.path.isfile(path):
with open(path, encoding="utf-8") as fh:
content = fh.read()
links = re.findall(r"\[\[([^\]]+)\]\]", content)
for link in links:
clean = link.split("|")[0].strip()
if clean in notes:
edges.append({"source": note, "target": clean})
nodes.append({"id": note, "group": 1})
with open(output, "w") as f:
json.dump({"nodes": nodes, "edges": edges}, f, ensure_ascii=False)
print(f"Exported {len(nodes)} nodes, {len(edges)} edges to {output}")
export_graph()
使用场景
- 知识管理: Zettelkasten笔记法,原子笔记+双向链接
- 每日笔记: 自动创建模板化日记,记录待办和反思
- 关系探索: 导出图谱数据,发现知识间隐藏关联
- 写作辅助: 跨笔记引用,构建长篇内容大纲
- 标签审计: 清理冗余标签,统一标签体系
配置
vault_path: "D:\\Obsidian\\main-vault"
daily_notes_dir: "Daily"
templates_dir: "Templates"
default_tags: [daily, auto]
依赖
- Python 3.8+
- 本地 Obsidian vault
安全使用建议
Install only if you are comfortable letting the agent read and modify your Obsidian vault. Before using write actions, confirm the vault path and target filenames, preview generated content, and keep normal backups for important notes.
能力评估
Purpose & Capability
The stated purpose is creating, searching, organizing, linking, tagging, and exporting Obsidian notes, and the artifact’s examples match that purpose.
Instruction Scope
The skill discloses direct Markdown file reads and writes, but its activation phrases are broad and write operations are not framed with an explicit preview-or-confirm step.
Install Mechanism
No install commands or dependency packages are declared; the artifact is a single non-executable SKILL.md file.
Credentials
Access to a local Obsidian vault is proportionate for the stated note-management purpose, and no unrelated filesystem, network, credential, or account access is requested.
Persistence & Privilege
The skill creates or modifies notes and can export a graph file, but it does not install background workers, persistence hooks, privilege escalation, or automatic startup behavior.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install laosi-obsidian - 安装完成后,直接呼叫该 Skill 的名称或使用
/laosi-obsidian触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Obsidian Helper.
- Create, search, and organize Obsidian notes via API.
- Supports bidirectional links, tag management, and knowledge graph export.
- Automates daily note creation with customizable templates.
- No Obsidian plugins required—directly operates on markdown files.
- Python-based, easy to configure for any local Obsidian vault.
元数据
常见问题
Obsidian笔记助手 是什么?
Obsidian笔记助手 - 通过API创建/搜索/组织Obsidian笔记,支持双向链接、标签管理、图谱分析和每日笔记自动化. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 37 次。
如何安装 Obsidian笔记助手?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install laosi-obsidian」即可一键安装,无需额外配置。
Obsidian笔记助手 是免费的吗?
是的,Obsidian笔记助手 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Obsidian笔记助手 支持哪些平台?
Obsidian笔记助手 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Obsidian笔记助手?
由 534422530(@534422530)开发并维护,当前版本 v1.0.0。
推荐 Skills