agentleFS
MarceltovMarceltov/trilium-plugin/skills/export-note-subtree/SKILL.md

export-note-subtree

Skill0 starsChanged 2 months agoMITView on GitHub

Export a Trilium note and its entire subtree as readable markdown or HTML text via exportNoteSubtree. Use when the user asks to export, dump, or get a readable copy of a note and its children — e.g. for backup, review, or pasting elsewhere.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are 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.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.

    line 12

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Export a Note Subtree

exportNoteSubtree fetches Trilium's ZIP export of the subtree rooted at a note, unpacks it, and returns each note's path followed by its text content — no ZIP handling needed on the caller's side. Binary attachments (images, files) are listed by name but not inlined.

There is no corresponding working import in this plugin: importZip was tested against a live instance and is broken as exposed by the MCP tool (it takes no file-content parameter, and calling it returns an HTTP 500). Don't offer it as an option.

If more than one Trilium instance is connected this session, resolve which one to use first — see Working with multiple instances.

Steps

  1. Resolve the note to export (by title via searchNotes or by noteId if given). Use "root" if the user wants the entire document exported.
  2. Determine the format — markdown (default, most readable) or html. Ask only if the user's intent isn't clear; default to markdown otherwise.
  3. Call exportNoteSubtree with noteId and format.
  4. Present the result. For a small export, show it inline. For a large one, save it to a file (ask where, or use a sensible default like the note's title) rather than flooding the conversation — mention that any binary attachments were only listed by name, not included, in case the user needs those separately.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.