delete-note
Skill0 starsChanged 2 months agoMITView on GitHub
Delete a Trilium note (and its entire subtree of child notes) via the deleteNoteById MCP tool, after confirming with the user. Use when the user asks to delete, remove, or get rid of a note in Trilium.
In this repository11 other files it gives its agents.
- apply-template-to-noteSkill
- create-note-from-templateSkill
- create-noteSkill
- export-note-subtreeSkill
- find-template-instancesSkill
- journal-noteSkill
- manage-note-attributesSkill
- manage-trilium-instancesSkill
- move-noteSkill
- rename-noteSkill
- search-notesSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 10
If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.
- Very specific: line 14
Resolve the target note: If the user gave a noteId, use it directly.
≈ “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
Delete a Trilium Note
deleteNoteById deletes the note and its whole subtree — verified against a live instance: deleting a parent note deletes all of its child notes too, not just the one note. This is destructive, so always confirm before calling it.
If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.
Steps
- Resolve the target note. If the user gave a noteId, use it directly. Otherwise
searchNotesby title; if there are multiple matches, list them and ask which one. - Fetch the note before deleting:
getNoteByIdto see its title andchildNoteIds. If it has children, also note the count — the user needs to know the deletion is not just this one note. - Confirm with the user (e.g. via
AskUserQuestion), stating the note's title and, if non-empty, how many child notes will be deleted along with it. If the user declines, stop. - On confirmation, call
deleteNoteByIdwith the note'snoteId. - Report back that the note (and its subtree, if any) was deleted. Mention that Trilium keeps deleted notes recoverable for a period via
undeleteNote, in case the user changes their mind.
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.

