manage-note-attributes
Skill0 starsChanged 2 months agoMITView on GitHub
Add, update, or remove labels and relations on a Trilium note via postAttribute, patchAttributeById, and deleteAttributeById. Use when the user asks to tag a note, add or remove a label/relation, or change an attribute's value — general attribute management, not specifically template promoted attributes (those are covered inline by the template skills).
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-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 12
If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.
- Very specific: line 19
Add a new attribute: ask for the name, whether it's a label or relation, and the value (for a relation, resolve the target note first).
≈ “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
Manage Note Attributes
Labels (#name / #name=value) and relations (~name pointing at another note) are both "attributes" in Trilium's model. This skill covers ad-hoc tagging and relations generally; the template skills (create-note-from-template, apply-template-to-note) already handle the ~template relation and promoted-attribute values inline.
Patching is limited (verified by the tool descriptions and consistent with patchNoteById/patchBranchById behavior elsewhere in this plugin): patchAttributeById can only update a label's value/position, or a relation's position. It cannot change an attribute's name, type, or (for a relation) its target. To change any of those, delete the old attribute (deleteAttributeById) and create a new one (postAttribute) — don't attempt to patch around 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 (by title via
searchNotesor by noteId if given). - Determine the operation:
- Add a new attribute: ask for the name, whether it's a label or relation, and the value (for a relation, resolve the target note first).
postAttributewithnoteId,type,name,value. - Change an existing label's value: find the attribute (via
getNoteById'sattributesarray, matchingname), thenpatchAttributeByIdwithattributeId__pathand the newvalue. - Change a relation's target, or rename any attribute: this isn't a patch —
deleteAttributeByIdthe old one, thenpostAttributea new one with the desiredname/type/value. - Remove an attribute: find its
attributeIdthe same way, thendeleteAttributeById.
- Add a new attribute: ask for the name, whether it's a label or relation, and the value (for a relation, resolve the target note first).
- Confirm before removing an attribute that looks structurally significant — a
~templaterelation, a#templatelabel, or alabel:<field>=promoted,...definition — since removing these changes how the note behaves, not just its metadata. Plain tags/labels don't need this. - Report back: which attribute(s) changed and their new state. Don't dump the note's full attribute list unless the user asks for it.
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.

