SuperAPI AI Directory

lov-obsidian-reset-cache

General & other

View repository

Updated 10-16 00:01

About this skill

obsidian-reset-cache — Reset Obsidian cache

Solve the problem of Obsidian being stuck at "Loading cache..." and unable to start.

When to Use

  • Obsidian is stuck at "Loading cache..." and not moving when starting
  • The Vault has a large number of files and many non-markdown files (such as node_modules)
  • Suspect cache corruption

Workflow

Step 1: Confirm Obsidian is closed

pgrep -x Obsidian && echo "Obsidian 正在运行,请先关闭" || echo "OK: Obsidian 未运行"

If Obsidian is running, prompt the user to close it first. If the user has not clearly confirmed that Obsidian is closed, use AskUserQuestion confirm before continuing.

Step 2: Clear the IndexedDB cache

Before executing, confirm again that the target is the Obsidian IndexedDB cache, not the vault, plugin configuration, or notes.

rm -rf ~/Library/Application\ Support/obsidian/IndexedDB/

Step 3: Prompt the user to reopen Obsidian

Tell the user:

  1. The cache has been cleared
  2. Reopen Obsidian; the first load will be slightly slower (rebuilding the index)
  3. If the vault contains a large number of non-markdown files such as node_modules, it is recommended to create a .obsidianignore file to exclude them

Optional: Create .obsidianignore

If the user's vault contains node_modules or other directories that should be ignored, help the user create it in the vault root directory:

node_modules
.git
.output
dist
build

Notes

  • This operation only affects macOS
  • What is cleared is the global cache, which will affect the index of all vaults
  • It will not delete user data, notes, or plugin configuration

Runtime context (shared)

Before running, read this Skill package's skill.yaml, with skill-runtime/v1 context provided by the host. The field resolution order is: current request, project context, personal Preferences, brand Profile, general defaults.

  • Use only fields declared in the Manifest; Profile stores public brand facts, and Preferences stores personal work preferences.
  • required: true When a field is missing, ask the user one focused question according to the Manifest's question configuration; save the answer only after the user explicitly agrees.
  • Errors provide a copyable context_id, field path, and source; diagnostic content avoids secrets, full private paths, and raw configuration.

General feedback loop

When the user provides revision feedback during a Skill-driven task, before continuing with the current artifact you must execute:

  1. First determine whether the feedback is task-specific(this time only) or reusable(reusable across tasks).
  2. task-specific Only modify the current task, not the Skill.
  3. reusable First determine the scope: for domain rules, first update the corresponding canonical Skill; for rules applicable to all Skills, first update the shared specification.
  4. After completing rule updates, versioning, linting, and distribution verification, then apply the changes to the current task.
  5. reusable The modification will invalidate previous "confirm", "continue", and "send it" responses; after completing the current artifact modification and reading it back, you must stop and wait for the user's next instruction, without automatically proceeding to publishing, submitting, or other external writes.