Agent Skillss2b-dev/smart-second-brain › notebook-navigator

notebook-navigator

GitHub

通过JS API脚本化操作Notebook Navigator插件。强调运行时动态探查API结构,确认方法存在后再调用,遵循只读默认及异常处理原则,避免盲目猜测接口。

integration/S2B Test Vault/Agents/Skills/notebook-navigator/SKILL.md s2b-dev/smart-second-brain

Trigger Scenarios

用户请求使用Notebook Navigator进行自动化操作 需要执行Notebook Navigator特有的逻辑且无现成工具可用

Install

npx skills add s2b-dev/smart-second-brain --skill notebook-navigator -g -y
More Options

Non-standard path

npx skills add https://github.com/s2b-dev/smart-second-brain/tree/main/integration/S2B Test Vault/Agents/Skills/notebook-navigator -g -y

Use without installing

npx skills use s2b-dev/smart-second-brain@notebook-navigator

指定 Agent (Claude Code)

npx skills add s2b-dev/smart-second-brain --skill notebook-navigator -a claude-code -g -y

安装 repo 全部 skill

npx skills add s2b-dev/smart-second-brain --all -g -y

预览 repo 内 skill

npx skills add s2b-dev/smart-second-brain --list

SKILL.md

Frontmatter
{
    "name": "notebook-navigator",
    "license": "MIT",
    "metadata": {
        "displayName": "Notebook Navigator",
        "linkedPlugin": "notebook-navigator"
    },
    "description": "Script the Notebook Navigator plugin via its public JavaScript API. Use when the user asks to work with Notebook Navigator and you have an exec_notebook_navigator tool — introspect the API first, then call it."
}

Notebook Navigator API scripting

This skill covers scripting Notebook Navigator's public JavaScript api object. You have an exec_notebook_navigator tool that runs JavaScript against this plugin's api on the main thread.

There is no hand-written documentation for this plugin's API yet, so discover it at runtime before you rely on it. Do not assume method names — introspect, then call. As you learn the API, replace the generic steps below with the concrete methods and patterns that work.

What's in scope

  • api — the plugin's public API object (app.plugins.plugins["<id>"].api).
  • app — the Obsidian App instance.
  • input — optional JSON you pass to the tool.
  • return the final value you want back (objects/arrays are stringified for you).

Introspect first

Always start by inspecting the surface. Never call a method you haven't confirmed exists.

// 1. What top-level members does the API expose?
return Object.keys(api);
// 2. Inspect a specific member's type and, for functions, its arity/source signature.
const name = "someMember"; // ← the member you're curious about
const m = api[name];
return { type: typeof m, arity: typeof m === "function" ? m.length : undefined, preview: String(m).slice(0, 200) };
// 3. For nested/namespaced APIs, walk one level deeper.
return Object.fromEntries(Object.keys(api).map((k) => [k, typeof api[k]]));

Once you know the shape, call the real methods. If a call throws, the error is returned to you as a string — read it, adjust, and retry with a corrected call.

Rules & constraints

  • Introspect before calling. The API surface varies by plugin and version; guessing wastes turns.
  • Read-only by default. Only perform mutations (create/update/delete) when the user explicitly asked to change data. When unsure whether a method mutates, inspect it or ask.
  • Not sandboxed. This runs on the main thread with full app access — a call can do anything the plugin can. Keep snippets small and focused.
  • Awaited work times out. Long-running or hanging promises are cut off; a runaway synchronous loop cannot be preempted, so avoid unbounded loops.
  • Prefer existing tools when they fit. For reading/writing notes use read_content / manage_notes; reach for exec_notebook_navigator only for logic Notebook Navigator's API uniquely provides.
  • Report honestly. If introspection shows the API can't do what the user asked, say so rather than fabricating a method.

Typical flow

  1. return Object.keys(api) to see what's available.
  2. Inspect the one or two members that look relevant (type + arity).
  3. Call them with the real arguments; return the result.
  4. As you find reliable patterns, document them here so future runs skip the introspection.

Version History

  • 2.0.5 Current 2026-09-08 21:10

Same Skill Collection

.claude/skills/dispatch/SKILL.md
.github/skills/obsidian-integration-test/SKILL.md
integration/S2B Test Vault/.obsidian/skills/bases/SKILL.md
integration/S2B Test Vault/.obsidian/skills/canvas/SKILL.md
integration/S2B Test Vault/.obsidian/skills/dataview/SKILL.md
integration/S2B Test Vault/.obsidian/skills/notebook-navigator/SKILL.md
integration/S2B Test Vault/.obsidian/skills/obsidian-charts/SKILL.md
integration/S2B Test Vault/.obsidian/skills/tasknotes/SKILL.md
integration/S2B Test Vault/.obsidian/skills/tasks/SKILL.md
integration/S2B Test Vault/Agents/Skills/bases/SKILL.md
integration/S2B Test Vault/Agents/Skills/canvas/SKILL.md
integration/S2B Test Vault/Agents/Skills/dataview/SKILL.md
integration/S2B Test Vault/Agents/Skills/explore-vault/SKILL.md
integration/S2B Test Vault/Agents/Skills/manage-notes/SKILL.md
integration/S2B Test Vault/Agents/Skills/manage-skills/SKILL.md
integration/S2B Test Vault/Agents/Skills/obsidian-charts/SKILL.md
integration/S2B Test Vault/Agents/Skills/tasknotes/SKILL.md
integration/S2B Test Vault/Agents/Skills/tasks/SKILL.md
integration/S2B Test Vault/Agents/Skills/web/SKILL.md
src/skills/defaults/explore-vault/SKILL.md
src/skills/defaults/manage-notes/SKILL.md
src/skills/defaults/manage-skills/SKILL.md
src/skills/defaults/web/SKILL.md
src/skills/integrations/bases/SKILL.md
src/skills/integrations/canvas/SKILL.md
src/skills/integrations/dataview/SKILL.md
src/skills/integrations/obsidian-charts/SKILL.md
src/skills/integrations/tasknotes/SKILL.md
src/skills/integrations/tasks/SKILL.md

Metadata

Files
0
Version
2.0.5
Hash
ee437cfc
Indexed
2026-09-08 21:10

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-10 04:47
浙ICP备14020137号-1 $bản đồ khách truy cập$