/trilium:trilium-apply-template-to-notefrom trilium
Retroactively attach an existing note in Trilium Notes to a template via a ~template relation, which merges the template's child-note structure, content, and promoted attributes onto that note. Use when the user asks to convert, retrofit, or "make this note use" an existing template. This overwrites the target note's content and adds child notes to it — always confirm before writing.
Ships in trilium. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Same underlying mechanism as trilium-create-note-from-template (attaching a ~template relation), but applied to a note that may already have real content and children — which makes this the destructive one of the template skills. Once the ~template relation is attached, the target note's content is replaced with the template's content, and the template's child notes are cloned in as new children under the target. This is not reversible by simply deleting the relation.
If more than one Trilium Notes instance is connected this session, resolve which one to use first — see Working with multiple instances.
Resolve the target note (by title via search_notes or by noteId if given) and the template note (same resolution as trilium-create-note-from-template step 1: noteId if given, else search_notes("#template") matched by title, asking if ambiguous).
Before writing anything, fetch both notes' current state (get_note + get_note_content for each) and summarize for the user: the target's current content (non-empty? roughly how much?) and existing child-note count — call out specifically if either is non-trivial, since both are at risk — and the template's child-note count and title, so the user knows what's about to be merged in.
Get explicit confirmation (e.g. via AskUserQuestion) before proceeding. If the user declines, stop — do not attach the relation.
On confirmation, set_attribute with type: relation, name: template, value: <template noteId>, noteId: <target noteId>. If the target already has a ~template relation, this replaces it (set_attribute updates an attribute of the same name) — say so in step 2.
Re-fetch the target note to confirm the relation applied, then walk the user through the promoted-attribute value prompts exactly as in trilium-create-note-from-template steps 5–7.
Report back: confirm the relation is attached, how many child notes were added, and which promoted attributes were set.
What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/trilium-create-noteCreate a new plain note in Trilium Notes (title, content, type, and parent location) via the create_note MCP tool. Use when the user asks to create, add, jot down, or capture a new note in Trilium Notes and no template is involved./trilium-create-note-from-templateCreate a new note in Trilium Notes instantiated from an existing template note, by creating a blank note and attaching a ~template relation, then prompting for the template's promoted-attribute values. Use when the user asks to create a note "from" or "using" a template (e.g. "create a new Server note from the Server template")./trilium-delete-noteDelete a note in Trilium Notes (and its entire subtree of child notes) via the delete_note MCP tool, after confirming with the user. Use when the user asks to delete, remove, or get rid of a note in Trilium Notes.Other plugins' skills for the same job
npx claudepluginhub marceltov/trilium-plugin --plugin trilium