Note Toolbar API
Developmentnote-toolbar-apiNote Toolbar API is an Agent Skill for development published in the chrisgurney/obsidian-note-toolbar repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Write, edit, or debug JavaScript that uses the Note Toolbar `ntb` API inside Obsidian. Use this skill whenever the user wants to script a toolbar item, use ntb.prompt / ntb.suggester / ntb.fileSuggester / ntb.menu / ntb.modal, read or write note properties via ntb.getProperty / ntb.setProperty, work with toolbar items via ntb.getItem / ntb.getToolbars, or combine the ntb API with Dataview JS, JS Engine, or Templater. Also trigger for any script that references `ntb`, `NtbSuggester`, or 'Note Toolbar API'.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/chrisgurney/obsidian-note-toolbar/blob/HEAD/skills/note-toolbar-api/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/note-toolbar-api, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Note Toolbar API
Full reference: https://raw.githubusercontent.com/wiki/chrisgurney/obsidian-note-toolbar/Note-Toolbar-API.md
Fetch the full reference before writing or editing any script.
Code conventions
- Comments start with a lower-case character.
- Use
activeWindow.navigator(not barenavigator) for clipboard/permission-sensitive APIs. - Use
normalizePath()for vault paths. - Keep scripts minimal; avoid unnecessary variables.
- Null-check all UI method results — every
ntbUI call returnsnullif dismissed:if (!result) return; - Inline scripts are plain JS; no type annotations.