trilium

trilium is a skill for Claude Code, Codex from uvwt/agentdock-skills. It costs 42 tokens per session (3,467 once invoked), scanned A, original, Apache-2.0.

A connector for Trilium Notes, a self-hosted knowledge-base and note-taking app. It uses Trilium's official interface to search, read and organize notes and related content.

In plain words
What is it for?
Use it to search, create, edit, move, clone and delete notes; manage note trees, versions and properties; read text attachments; access calendar notes; or create a confirmed database backup.
Why use it?
It lets you work with a Trilium knowledge base without directly changing its database or using its internal web endpoints. It also keeps sensitive authentication tokens out of action inputs and results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to search, create, edit, move, clone and delete notes; manage note trees, versions and properties; read text attachments; access calendar notes; or create a confirmed database backup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uvwt/agentdock-skills/trilium
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add uvwt/agentdock-skills --skill trilium
Clone the repo
git clone --depth 1 https://github.com/uvwt/agentdock-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trilium

README.md
[![agentmods](https://agentmods.dev/badge/skills/uvwt/agentdock-skills/trilium/github.svg)](https://agentmods.dev/skills/uvwt/agentdock-skills/trilium)
Your own site
<a href="https://agentmods.dev/skills/uvwt/agentdock-skills/trilium"><img src="https://agentmods.dev/badge/skills/uvwt/agentdock-skills/trilium/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trilium

Your own site · 80×15
<a href="https://agentmods.dev/skills/uvwt/agentdock-skills/trilium"><img src="https://agentmods.dev/badge/skills/uvwt/agentdock-skills/trilium.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,467 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.03467
Opus 5 $0.00021 $0.01733
Sonnet 5 $0.00008 $0.00693
Haiku 4.5 $0.00004 $0.00347

Measured 8d ago against content hash d39008fe731e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

trilium scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (run.py, tests/test_run.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/trilium/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trilium Skill

通过 Trilium 官方 ETAPI 查询和管理个人知识库。Skill 只依赖 Python 标准库,不包含 Trilium 服务端,也不调用内部 /api/* 或任意自定义路径。

适用场景

使用本 Skill 处理:

  • 检查 Trilium 实例版本、连通性和 ETAPI 鉴权;
  • 使用 Trilium 搜索语法查询笔记;
  • 读取、创建、修改和删除笔记;
  • 读取、替换、追加或精确局部编辑笔记正文;
  • 查询最近变更和笔记版本,创建版本或恢复已删除笔记;
  • 查询子节点和子树,创建、克隆、移动和调整笔记树 Branch;
  • 查询、创建和修改 Label / Relation 属性;
  • 查询附件元数据并读取文本型附件内容;
  • 获取 Inbox、日记、周记、月记和年记;
  • 在明确确认后触发 Trilium 数据库备份。

不要使用本 Skill 处理用户密码登录、ETAPI Token 创建或吊销、内部 API、任意路径透传、批量删除、二进制上传、ZIP 导入导出或直接修改 Trilium 数据库。

环境变量

变量 类型 必填 说明
TRILIUM_URL config Trilium 实例根地址,例如 https://notes.example.com;也接受以 /etapi 结尾的地址
TRILIUM_ETAPI_TOKEN secret 在 Trilium Options → ETAPI 中创建的 Token
TRILIUM_INSECURE_TLS config 仅自签名证书调试时设为 1;会跳过 TLS 证书校验

Token 只从当前进程环境读取,不支持通过输入 JSON 传递。缺少环境变量时只返回变量名,不读取浏览器 Cookie、配置文件或宿主私有目录。

重要内容格式

ETAPI 返回和接收的是 Trilium 实际存储格式:

  • text 富文本笔记正文是 HTML,不是 Markdown;
  • codesearchmermaid 等文本型笔记通常是原始文本;
  • 图片、PDF 等二进制正文不会写入 JSON 输出,只返回 binarycontent_typesize_bytes
  • 不做 Markdown 与 HTML 转换,避免无损性和格式语义不明确;
  • append-note-content 对富文本笔记要求输入 HTML 片段,对其他文本笔记自动补一个换行;
  • edit-note-content 只支持非富文本笔记,每个 old_text 必须在当前正文中恰好出现一次。

替换正文前先读取笔记类型和当前正文。只修改标题时使用 update-note,不要重写正文。

执行方式

在 Skill 包根目录运行:

printf '%s' '{"skill_action":"status"}' | python3 run.py

输入必须是 JSON 对象,动作字段为 skill_action。输出始终为 JSON。除 status 可报告未配置状态外,其余动作均要求 URL 和 Token。

动作

笔记与正文

动作 类型 主要输入 说明
status 只读 检查配置并调用 /etapi/app-info
search-notes 只读 query,以及可选搜索参数 使用 Trilium 搜索语法查询笔记
get-note 只读 note_id 获取笔记元数据、Branch ID、属性等
get-note-content 只读 note_id 获取笔记实际存储正文
create-note 写入 parent_note_id, title, type, content? 在指定父笔记下创建笔记
update-note 写入 note_id 及需修改的字段 修改标题、类型、MIME 或创建时间
set-note-content 写入 note_id, content 替换完整正文;允许空字符串
append-note-content 写入 note_id, content 读取并重新校验版本后追加正文
edit-note-content 写入 note_id, edits 对非富文本正文执行唯一片段替换
delete-note 删除 note_id, confirm: true, confirm_title 读取当前标题并精确匹配后软删除

Read the full file on GitHub · 205 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 205 lines · 42 tokens per session scan A d39008fe731e

Subscribe to this mod's changes

trilium is a skill published in the GitHub repository uvwt/agentdock-skills (3 stars, last pushed 7d ago), licensed Apache-2.0. It adds 42 tokens to every session and 3,467 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

stay-within-limits

Use when long-running or parallel agent work must respect 5-hour and weekly usage limits by checking usage between waves, pausing near the cap, and resuming only when the window is clear.

BuilderIO/skills · 45 tokens

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-skills · 63 tokens

crisis-holding

Draft crisis holding statements, journalist Q&A posture, and what-not-to-say guidance from confirmed incident facts, with a hard legal-counsel gate. Builds each statement through proven crisis-comms frameworks (holding-statement anatomy, SCCT, CAP order, the legitimate non-answer, bridge/flag/block).

elvisun/newsjack · 67 tokens

find-journalists

Build, refine, dedupe, and enrich small fit-checked journalist lists for newsjack campaigns. Uses the newsjack CLI (preferred) or the medialyst MCP for news search and journalist enrichment, and falls back to a best-effort local mode with no verified contacts; the agent owns how returned data is organized.

elvisun/newsjack · 69 tokens

story-origin-check

Recover the first public timestamp and canonical major coverage for a newsjacking signal, then decide whether newer coverage is the same story, a different story, or a materially new development.

elvisun/newsjack · 40 tokens

prompt-proximity-architecture

Turn an approved measurement charter, ICPs, and buyer jobs into a budget-aware prompt coverage blueprint across proximity bands, aided status, information acts, journey states, roles, locales, evidence grades, partitions, and measurement lanes. Use before prompt wording to define required, optional, and prohibited…

elvisun/newsjack · 67 tokens