Agent Vault Hooks · Obsidian plugin documentation

Agent Vault Hooks documentation

Agent Vault Hooks Obsidian plugin preview

Agent Vault Hooks runs declarative local vault rules when notes are created, modified, or renamed in Obsidian. It stamps YAML frontmatter fields, appends review tags, and logs entries to an activity feed note through atomic vault.process writes, with zero shell execution and zero background network calls.

Version 1.0.0. Requires Obsidian 1.13.4 or later. Works on desktop and mobile.

1 Installation

Community plugins

  1. Open Settings > Community plugins in Obsidian.
  2. Select Browse and search for Agent Vault Hooks.
  3. Select Install, then select Enable.

Manual installation

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <vault>/.obsidian/plugins/agent-vault-hooks/.
  3. Reload Obsidian and enable Agent Vault Hooks in Settings > Community plugins.

2 Getting started

Create and edit hook rules

  1. Open the command palette and run Agent Vault Hooks: Open hook rules.
  2. Select Add hook rule or select Edit on one of the three starter rules.
  3. Choose the trigger events (create, modify, or rename) and set an optional folder prefix, tag filter, or frontmatter key-value filter.
  4. Pick the action to run (stamp_yaml, append_tag, or log_activity) and adjust its field name, stamp format, tag, or message.

Preview changes with dry run

  1. Open any Markdown note inside your target folder.
  2. Run Agent Vault Hooks: Test hooks on active note (dry run) from the command palette.
  3. Switch between create, modify, and rename in the event selector to inspect which rules match, why other rules are skipped, and the exact line-by-line frontmatter diff.
  4. Select Apply matching hooks now when you want to commit the planned changes to the note and activity feed.

Enable automatic execution and rollback (Pro)

  1. Open Settings > Agent Vault Hooks and turn on Automatic debounced execution.
  2. Tune the debounce window (200 to 10000 ms) and loop guard cooldown (500 to 30000 ms) to match your editing pace.
  3. Turn on Record execution audit log to track each run, export Markdown or JSON logs, or run Agent Vault Hooks: Roll back last hook write to undo the most recent hook mutation safely.

3 Features

Free declarative vault hooks

Agent Vault Hooks lets you build local event automation without writing scripts or running shell commands. In the free tier, you can configure up to 3 hook rules that respond to create, modify, or rename events. Each rule filters target notes by folder prefix, frontmatter or inline tag, and an optional frontmatter key and value.

Pro automation, predicates, and rollback

Pro unlocks hands-free automation and deeper rule logic for active agent vaults while keeping every mutation local to your device.

4 Commands

Open the command palette and type the plugin name to see these commands. You can give each one a hotkey in Settings, Hotkeys.

Command Command id
Open hook rules agent-vault-hooks:open-hook-rules
Test hooks on active note (dry run) agent-vault-hooks:test-hook-active-note
Run matching hooks on active note agent-vault-hooks:run-hooks-active-note
Open hook execution audit log agent-vault-hooks:open-audit-log
Roll back last hook write agent-vault-hooks:rollback-last-hook
Open what pro adds agent-vault-hooks:open-what-pro

5 Settings

Setting Default Description
Activity feed note path Agent-Activity-Feed.md Note path where log_activity actions append entries.
Automatic debounced execution Off Pro: run hooks automatically after layoutReady.
Debounce window (ms) 800 Pro: delay before running hooks after the last event (200 to 10000 ms).
Loop guard cooldown (ms) 2500 Pro: suppression window for self-originated writes (500 to 30000 ms).
Record execution audit log Off Pro: keep recent hook runs in memory for export and rollback.
Audit log export path Agent-Hooks-Audit.md Pro: destination note path for Markdown audit log export.

6 Privacy, payment and network

The core features are free. Pro features need a GitHub Sponsors sponsorship of theluckystrike: $5 a month or more, or $15 once. A total payment of $15 meets the payment requirement for Pro without further payment. Sign-in and the checks below still apply. Your notes stay readable and editable with or without Pro.

GitHub handles the payment. Sponsor at https://github.com/sponsors/theluckystrike. You need no account for the free features. Pro needs the GitHub account that sponsors.

Until you select "Sign in with GitHub" in the settings, Agent Vault Hooks makes no network requests. Sign in uses the GitHub device flow. Agent Vault Hooks sends its public client ID and the scope read:user to https://github.com/login/device/code and shows you a code. While you enter the code at https://github.com/login/device, it asks https://github.com/login/oauth/access_token every few seconds to check the sign-in status. The scope permits profile reads only. GitHub needs this access to show the sponsorship tier. It grants no repository scope and no write access.

After sign in, Agent Vault Hooks sends one query to https://api.github.com/graphql. It checks if the signed-in account sponsors theluckystrike. It asks for the tier and the total payment to theluckystrike. The plugin reuses a successful check for 7 days. Failed checks can retry after 6 hours. Select Refresh to request an earlier check. It sends no note content, file names or other vault data, and it has no telemetry.

After a successful check, Pro can work offline for up to 14 days. Sign out or a negative sponsorship answer turns Pro off. The plugin stores the GitHub token through the secret storage API of Obsidian. It does not put the token in its saved settings or its local sponsorship data. The local storage of this device keeps your GitHub login, the tier and the time of the last check. Sign out clears the token. You can also revoke the access in your GitHub settings, under Applications.

7 Questions and answers

Does Agent Vault Hooks run shell commands or external scripts?

No. Agent Vault Hooks is pure TypeScript with zero shell execution, zero child processes, and zero network requests for hook rules. It works on desktop and mobile Obsidian.

How does the plugin avoid infinite modify loops?

When a hook writes to a note or appends to the activity feed, the loop guard records the file path and content hash for the configured cooldown window. Incoming modify events that match the self-write are suppressed, and the activity feed and audit log notes are always excluded from rule matching. Vault listeners also wait for layoutReady so startup indexing never fires hooks.

Will YAML comments or Windows CRLF line endings be lost?

No. Frontmatter updates operate surgically on lines inside the YAML block, preserving existing comments, inline comments, key order, and CRLF or LF line endings.

What happens if I edit a note after a hook runs and then click Roll back?

Rollback verifies that the current note content still matches the exact output produced by the hook. If you edited the note afterward, rollback stops and shows a notice so your manual edits are never overwritten.

8 Support

Report bugs, share workflow ideas, or attach a minimal frontmatter sample on the GitHub issue tracker for this repository.

Agent Vault Hooks · Obsidian plugin documentation