move-note
Skill0 starsChanged 2 months agoMITView on GitHub
Move a Trilium note to a different parent note, by creating a branch under the new parent and deleting the old one. Use when the user asks to move, relocate, or file a note under a different note.
In this repository11 other files it gives its agents.
- apply-template-to-noteSkill
- create-note-from-templateSkill
- create-noteSkill
- delete-noteSkill
- export-note-subtreeSkill
- find-template-instancesSkill
- journal-noteSkill
- manage-note-attributesSkill
- manage-trilium-instancesSkill
- rename-noteSkill
- search-notesSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.
- Distinctive: line 19
If there's exactly one parent, that's the branch to remove.
- Very specific: line 20
If there's more than one, ask the user which current location they mean to move (unless they already specified the source parent), and …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Move a Trilium Note
There is no move-specific endpoint. Verified against a live instance: patchBranchById rejects parentNoteId outright (PROPERTY_NOT_ALLOWED — it only accepts prefix, notePosition, isExpanded). A note's placement in the tree is its branch, and moving a note means creating a new branch under the destination parent (postBranch) and deleting the old branch (deleteBranchById) — not the note itself.
Note that a Trilium note can be cloned into multiple parents at once (multiple branches, one note). If the note has more than one parentBranchIds entry, moving one placement must not touch the others — be precise about which branch you're deleting.
If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.
Steps
- Resolve the note to move (by title via
searchNotesor by noteId if given) and the destination parent note (same resolution). - Fetch the note via
getNoteByIdand look atparentBranchIds/parentNoteIds:- If there's exactly one parent, that's the branch to remove.
- If there's more than one, ask the user which current location they mean to move (unless they already specified the source parent), and match it to the corresponding branch id (
<parentNoteId>_<noteId>).
- Create the new placement:
postBranchwithnoteId: <note's id>,parentNoteId: <destination parent id>(andnotePositionif the user cares about ordering). - Remove the old placement:
deleteBranchByIdwith the branch id identified in step 2. Do this only after step 3 succeeds — never delete the old branch first, since a note must always have at least one placement. - Confirm the move:
getNoteByIdon the note and checkparentNoteIdsnow shows the destination (and, if there was only one parent before, no longer shows the old one). - Report back: the note's title and its new location.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

