Install
$ agentstack add skill-21noises-agent-skills-obsidian-base-query ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
你在这里做两件事:运行已有的 .base 取回结果,以及在结果不符预期时解读、调试。你只读,不新建也不修改任何笔记与 .base,这些写入都归 obsidian-base-author。
问题能不能用 base 回答、该不该为它新建 base,不由你负责判断。
如果既有 bases 没有能与问题相匹配的,你唯一出口是立即调用 Skill 工具、skill 名 obsidian-base-author,把用户的原始需求原样转交。不要自己回答,不要改用全文搜索或手工读笔记凑答案,也不要只报告「没有这个 base」就收尾。
前置条件
Obsidian 1.12.7 及以上,并已启用 CLI:Settings → General → Command line interface(一次性注册后会生成 obsidian 命令)。若命令报「command not found」,说明 CLI 尚未注册,请如实报告,不要改用其他工具绕开。
命令依赖 Obsidian 应用运行,但不必手动先开;首条命令会自动把它启动起来,可能略有延迟。
关键约定
- 一个
.base文件只放一个视图。 - 文件名主体等于视图的
name字段,看文件名就能认出是什么视图。
工作流
- 先列出已有 base。 跑
obsidian bases列出 vault 里全部.base文件。这一步强制,用来在已有文件里定位目标,而不是凭空猜文件名。 - 定位目标。 在第 1 步的清单里按文件名挑出目标;文件名不足以判断时,用 Read 打开那个
.base看它筛什么。若整个清单里都没有对得上的 base,那不是名字一时对不上,而是它还不存在,按上文立即调用 Skill 工具转交obsidian-base-author,本步到此结束,不要在没有 base 的前提下继续往下跑查询,也不要自己另寻答案。 - 跑查询取结果。
obsidian base:query path= format=。path取第 1 步列出的完整路径,要带扩展名,值含空格时加引号;单视图无歧义,view=可省。格式按消费方选:给人看用md,给程序用json、csv、tsv,只要命中文件清单用paths,默认md。 - 整理回报。 把结果按用户需要的形式呈现。
解读与调试分支
结果不符预期时:
- 用 Read 读那个
.base文件。 - 逐条展开
filters的and、or、not,解析属性的类型前缀以及this的语境含义;类型前缀有note.、file.、formula.,无前缀时默认按 note。 - 对照常见原因排查:属性名或类型不匹配,公式输出类型由底层数据与函数返回值决定;缺空值保护导致该行报错;
file.hasTag连带命中嵌套标签、精确字符串比较不会;file.inFolder连带命中子文件夹;链接相等与this语境;日期相减得毫秒数,误用不存在的.days字段会算空,求天数要除以86400000;file.backlinks、file.properties不随 vault 变化自动刷新。 - 需要更深的筛选语法、类型行为或函数语义来判断,或定位后要改筛选,都立即调用 Skill 工具转交
obsidian-base-author,不要凭印象自行改写筛选或猜测语义。
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: 21noises
- Source: 21noises/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.