Skip to content

/hyprlayer_doctor

Verify the configured thoughts storage backend is ready

Check that your hyprlayer environment is wired up for the storage backend you configured (git, obsidian, notion, or anytype). The doctor handles the backend-agnostic concerns first (config resolution, per-repo mapping, dispatch), then runs the checks specific to your backend.

/hyprlayer_doctor

No arguments, and a re-run changes nothing.

Three things invoke the skill:

Trigger What kicks it off
First backend touch per session A slash command that needs to read or write a thought calls the skill once, then caches the green result against the config-file content hash. Subsequent calls in the same session skip.
User request You ran /hyprlayer_doctor directly, or said something like “verify hyprlayer setup” or “is my notion backend connected”.
Unexpected failure A backend operation returned a 401, 404, schema mismatch, lock, or permission error. The skill runs once to diagnose; it does not loop.

The cache key is a content hash of ~/Library/Application Support/hyprlayer/config.json (or its XDG_CONFIG_HOME / %APPDATA% equivalent). Edit the config in any way (swap the backend, change a vault path, add a profile) and the cache goes stale, so the doctor re-runs on the next backend touch.

Backend-agnostic steps run for all four backends:

  1. Config resolution. Reads the hyprlayer config from the OS config dir. Errors if the file is missing, malformed JSON, or has no thoughts section.
  2. Per-repo mapping. Resolves which storage profile is active for the current working repository.
  3. Cache freshness. Computes the config-content hash and compares it against the doctor’s cache file.

Then it dispatches into a backend-specific procedure:

Backend Verifies
git The thoughts repo exists, is a git repo, has a remote, and git fetch / git status succeed.
obsidian The vault path exists, the configured subfolder is writable, and the YAML frontmatter schema parses.
notion The Notion connector is reachable through the agent tool’s MCP, the configured database_id (if any) still exists, and the unified schema is present on it.
anytype The Anytype desktop app is running, the MCP server registered, the ANYTYPE_API_KEY resolves, and the configured space + type still exist.

On notion and anytype, a missing database or type ID is not an error. The doctor confirms the lazy-create path will work on the first write.

  • Green. The backend is ready. The skill caches the result against the config hash and the caller proceeds.
  • Red. Prints a remediation step (e.g. “run hyprlayer thoughts init”, “start the Anytype desktop app”, “connect Notion in your agent tool’s MCP settings”) and stops without touching any state.

The doctor never modifies hyprlayer config, never writes to the backend, and never calls the network outside the backend it’s diagnosing.