Skip to content
Productivity
Command

/refactor

Reorganize notes and folders safely — rename, move, split, merge — and rewire every affected wikilink

From plugin
obsidian-knowledge-agent
20612 skills12 commands
Install
> /plugin marketplace add Michael-OvO/obsidian-knowledge-agent
> /plugin install obsidian-knowledge@obsidian-knowledge-agent

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/refactor

Context preview

What this command does when you run it.

Reorganize notes and folders safely — rename, move, split, merge — and rewire every affected wikilink

Command definition

refactor.md
description: Reorganize notes and folders safely — rename, move, split, merge — and rewire every affected wikilink
argument-hint: <the change, e.g. "rename ML to Machine Learning" or "split the Transformers note">

Carry out the restructuring in `$ARGUMENTS` without breaking the vault.

1. **Plan.** State exactly what will move, rename, split, or merge, and which files link to the affected notes (search for wikilinks to them). Show me the plan before changing anything. 2. **Baseline.** Validate links first (`scripts/validate_links.py`) so we know the starting point is clean. 3. **Execute** with `git mv` where possible (preserve history). For a split, create the new notes and move the relevant content; for a merge, combine and redirect. Preserve frontmatter. 4. **Rewire EVERY wikilink** that pointed at a moved/renamed/merged note — including aliased and table-escaped (`\|`) links — and update any indexes and concept-graph canvas. 5. **Re-validate links** (must be zero broken) and **commit**. Never delete a note without my explicit approval — leave a redirect stub or archive it instead.

Ships withobsidian-knowledge-agent

Talk to your vault. It does the rest. You drop it in. It files, it teaches, and it remembers how you like your notes. Point any agentic assistant at your Obsidian vault and talk to it — "save this link", "organize my inbox", "ingest the syllabus in Inbox".

Get the whole plugin
Stats
206
Stars
12
Forks
Maintained
Maintenance
Python
Language
MIT
License
1mo ago
Last commit
2mo ago
Created

Repo: Michael-OvO/obsidian-knowledge-agent