library-delete
Delete a library entry from all 3 storage locations by slug.
What it does
Removes an entry from:
- Obsidian vault (via REST API DELETE, recursive)
knowledge-base/INDEX.md(via REST API GET + PUT)reference/library-index.json(direct file edit)
Quick Usage
# Delete an entry (auto-detect type from JSON index)
~/myenv/bin/python3 ${CLAUDE_SKILL_DIR}/scripts/delete_entry.py bb-browser --vault-path <VAULT_PATH>
# Override type manually
~/myenv/bin/python3 ${CLAUDE_SKILL_DIR}/scripts/delete_entry.py bb-browser --type project --vault-path <VAULT_PATH>
# Dry run (show what would be deleted)
~/myenv/bin/python3 ${CLAUDE_SKILL_DIR}/scripts/delete_entry.py bb-browser --dry-run --vault-path <VAULT_PATH>
Workflow
- Receive delete request with slug (e.g. "delete bb-browser")
- Run delete script
- Script auto-detects entry type from JSON index (or use
--type) - REST API recursively deletes files, filesystem cleans empty folders
- Removes entry from INDEX.md and JSON index
- Report result
Credentials
OBSIDIAN_REST_API_KEY— Obsidian REST API auth
Guardrails
- Never delete without explicit user confirmation
- Always run
--dry-runfirst if uncertain - Do not delete entries that other entries depend on without checking
Error Handling
- REST API unreachable → exit 1, report connection error
- Slug not found → exit 1, report "nothing to delete"
- Partial failure → report which locations succeeded/failed