Agent skill

Measure Startup Requests

by TriliumNext in TriliumNext/Trilium

A skill your agent uses when measuring what the Trilium client loads at startup — "what loads at boot?", "did this change reduce the startup bundle?", "is <dependency lazy?", or any before/after…

AGPL-3.0Auto-check passedTesting & QA

Install Measure Startup Requests

skills CLI
$ npx skills add TriliumNext/Trilium --skill measure-startup-requests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TriliumNext/Trilium measure-startup-requests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/measure-startup-requests .claude/skills/measure-startup-requests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
measure-startup-requests
GitHub stars
38k
Token cost
~1.5k tokens
SKILL.md length
687 words
Files
3
Skills in repo
23
Repo updated
First seen
Licence
AGPL-3.0

At a glance

A skill your agent uses when measuring what the Trilium client loads at startup — "what loads at boot?", "did this change reduce the startup bundle?", "is <dependency lazy?", or any before/after…

  • Works in 4 steps: Capture a baseline before changing… → Make the change (Vite dev picks it up… → Capture again and compare:… → …
  • Measuring what the Trilium client loads at startup — what loads at boot?
  • SKILL.md covers Prerequisites, Workflow for lazy-loading work, Timing one module graph,… and Interpreting results, plus 1 more section
  • Runs JavaScript scripts from its folder; calls node, pnpm and playwright; needs TRILIUM_PASSWORD

What it does

Measure Startup Requests is an agent skill from TriliumNext/Trilium. Use when measuring what the Trilium client loads at startup — "what loads at boot?", "did this change reduce the startup bundle?", "is <dependency lazy?", or any before/after comparison for lazy-loading / code-splitting work. Drives a headless browser through login against the running dev server, records every request, and analyzes captures (summary, heavy-dependency probe, before/after diff). Don't write a new throwaway Playwright script or inline node analyzers — both already live here.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files.

It sits in Testing & QA, covering Web performance, Browser automation and Browser testing. It works with Playwright. The repository describes itself as: Build your personal knowledge base with Trilium Notes. The licence is AGPL-3.0.

When your agent uses it

  • Measuring what the Trilium client loads at startup — what loads at boot?
  • Did this change reduce the startup bundle?
  • Is <dependency lazy?
  • Any before/after comparison for lazy-loading / code-splitting work

Example prompts

  • “what loads at boot?”
  • “did this change reduce the startup bundle?”
  • “is <dependency lazy?”
  • “/measure-startup-requests”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Capture a baseline before changing anything: capture-requests.mjs baseline.json.
  2. Make the change (Vite dev picks it up automatically; a fresh headless session has no HMR state).
  3. Capture again and compare: analyze-requests.mjs diff baseline.json after.json.
  4. probe confirms specific heavy deps stayed off the boot path.

What it can do on your machine

Read from SKILL.md and the folder at commit 4d9cb6d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • pnpm
    • playwright

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TRILIUM_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Measure Startup Requests loads about 1.5k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 687 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~130
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TriliumNext/Trilium at commit 4d9cb6d, republished under its AGPL-3.0 licence (© TriliumNext). 687 words, ~1,522 tokens.

Download SKILL.mdSave it as .claude/skills/measure-startup-requests/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
measure-startup-requests
description
Use when measuring what the Trilium client loads at startup — "what loads at boot?", "did this change reduce the startup bundle?", "is <dependency> lazy?", or any before/after comparison for lazy-loading / code-splitting work. Drives a headless browser through login against the running dev server, records every request, and analyzes captures (summary, heavy-dependency probe, before/after diff). Don't write a new throwaway Playwright script or inline node analyzers — both already live here.

Measuring Trilium startup requests

Two scripts in this folder do everything; don't reinvent them:

bash
# 1. Capture a full startup (login → network quiet) into a JSON file:
TRILIUM_PASSWORD=<password> node .claude/skills/measure-startup-requests/capture-requests.mjs <out.json> [baseUrl]

# 2. Analyze captures:
node .claude/skills/measure-startup-requests/analyze-requests.mjs summary <capture.json> [--top N]
node .claude/skills/measure-startup-requests/analyze-requests.mjs probe <capture.json> [name ...]
node .claude/skills/measure-startup-requests/analyze-requests.mjs diff <before.json> <after.json> [--filter <regex>]

Prerequisites

  • The dev server must already be running (pnpm server:start, http://localhost:8080 by default). Note which checkout it serves: the capture reflects the tree the server runs from, not your cwd (verify with curl on a file that only exists in one tree if unsure).
  • TRILIUM_PASSWORD env var if the instance has a password. Without it the capture still "succeeds" — it just never gets past the login page, yielding a plausible-looking ~178-request file that measures nothing. Validate every capture before drawing conclusions: a real one contains /api/ requests (/api/tree, /api/options, ...). Zero /api/ hits means you captured the login screen.
  • Playwright is resolved from packages/trilium-e2e; the script prefers system Edge/Chrome, so no playwright install is needed.

Workflow for lazy-loading work

  1. Capture a baseline before changing anything: capture-requests.mjs baseline.json.
  2. Make the change (Vite dev picks it up automatically; a fresh headless session has no HMR state).
  3. Capture again and compare: analyze-requests.mjs diff baseline.json after.json.
  4. probe confirms specific heavy deps stayed off the boot path.

Timing one module graph, without logging in

The capture above needs a session. To weigh a single entry point instead — "what does reaching CKEditor actually cost?" — skip the login entirely: Vite serves module URLs unauthenticated.

  • URL form: http://localhost:8080/assets/v<version>/@fs/<absolute repo path>/…/file.ts.
  • Navigate a blank page to that origin, setContent("<html><body>"), then take performance.now() around await import(url).catch(() => {}).
  • The .catch is what makes this work. An ES module graph is fully fetched and instantiated before any of it is evaluated, so a module whose evaluation throws without a session ("Logged in session not found") still yields a valid download-and-instantiate measurement.
  • Constructing an editor in that page needs { licenseKey: "GPL" }, or create() throws license-key-missing.

This is how the "first text note is slow" delay was attributed to the module graph rather than to the editor (dev server, 2026-08): packages/ckeditor5/src/index.ts ~290 ms / 216 modules and EditableText.tsx ~355 ms / 328 modules, against PopupEditor.create() at 83 ms first and ~25 ms after. That is why the idle preload (preloadCommonNoteTypes in note_types.tsx) is the lever — and why the 428 KB emoji definitionsUrl fetch is not a suspect: EmojiRepository.init() fires it without returning the promise, so it never blocks create().

Show full SKILL.md (318 more words)Show less

Interpreting results

  • Dev-mode numbers, not production. The dev server serves unbundled ES modules (~500+ script requests is normal), so sizes are uncompressed and per-module. The module sets and import chains are what matter; production chunk sizes differ.
  • Request order ≈ import discovery order. To find what triggers a heavy load, look at the seq of the first module of that package and at the /src/... modules requested just before it, then confirm the chain by grepping for static importers.
  • Sessions are stateful. Open tabs / the active note change what loads (e.g. a text note pulls CKEditor legitimately). Totals between two captures are only comparable for the same session state; prefer the diff of targeted module sets, and treat full-MB totals as indicative.
  • Never filter raw URLs. Dev URLs embed the absolute checkout path via /@fs/..., so a worktree named e.g. lazy-ribbon makes every request match /ribbon/. The analyzer normalizes paths (strips host, ?v=/?t= params, /assets/vX.Y.Z, and the /@fs/<checkout> prefix) — rely on that.
  • Vite's hash-named shared chunks (dist-XXXX.js) are identified by their .js.map in .cache/vite-<port>/deps/ (each dev instance has its own): grep -o '"[^"]*node_modules/[^"]*"' <chunk>.js.map | ... and count by package. (The 800 KB es-toolkit+mdast/hast chunk is CKEditor's internals, for example.)

Reference

The default probe list is the set of heavy deps that were deliberately made lazy (CKEditor, highlight.js, KaTeX, codemirror-vim, snapdom, force-graph, the LLM chat graph, ...) — if one of them reports LOADED on a plain board/empty note startup, a regression sneaked in. After the 2026-06 lazy-loading work the new-layout baseline was ~557 requests / 3.75 MB / 500 scripts (down from 810 / 8.02 MB / 745).

Both eager-load offenders this file used to list have since been fixed (re-verified 2026-08): applyModals in layout_commons.tsx now wraps every dialog in LazyDialog (a dynamic import() on first summons), keeping only PopupEditor, CallToAction, Toast and ShortcutHintsPanel eager — each with a comment saying why. The Inter font is served as woff2. Don't re-report either as a finding; measure first.

© TriliumNext, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .claude/skills/measure-startup-requests of TriliumNext/Trilium.

  • SKILL.md
  • analyze-requests.mjs
  • capture-requests.mjs

Open the folder on GitHubat commit 4d9cb6d

Compare with similar skills

Measure Startup Requests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Measure Startup Requests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Measure Startup Requests this skillTriliumNext/Trilium38k—~1.5kAutomated safety check: PassAGPL-3.0
PlaywrightEliasOulkadi/shokunin114—~3.6kAutomated safety check: NotesMIT
playwright-cli Browser Automationgithub/gh-aw5.4k25 repos~2.8kAutomated safety check: PassMIT
Playwright Skilllackeyjb/playwright-skill3.2k—~1.9kAutomated safety check: PassMIT
TabbitTabbit-Browser/dsh-tabbit104—~780Automated safety check: PassMIT
Agenttinyfish-io/tinyfish-cookbook2.2k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Playwright

    EliasOulkadi/shokunin

    Browser automation, web scraping, E2E testing, and visual regression with Playwright.

    114 GitHub stars~3.6k tokensUpdated 6 days ago
    Testing & QAAuto-check: notes
  • Official

    Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.

    5.4k GitHub starsUsed in 25 repos~2.8k tokens
    Testing & QAAuto-check passed
  • Playwright Skill

    lackeyjb/playwright-skill

    Complete browser automation with Playwright. An agent skill from lackeyjb/playwright-skill.

    3.2k GitHub stars~1.9k tokensUpdated 10 days ago
    Testing & QAAuto-check passed
  • Tabbit

    Tabbit-Browser/dsh-tabbit

    Control Tabbit Browser in a task-isolated Playwright workspace; never switch browser backends.

    104 GitHub stars~780 tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Agent

    tinyfish-io/tinyfish-cookbook

    Default browser automation agent — click, fill forms, navigate, log in, and extract structured data from any website using a natural-language goal, or run the same task across multiple sites in…

    2.2k GitHub stars~1.1k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Playwright MCP Browser Control

    Hainrixz/editor-pro-max

    Drives a live browser through the Playwright MCP server to navigate, inspect, fill forms and screenshot pages, with snapshot-first habits and output-size care.

    264 GitHub stars~2k tokensUpdated 6 mo ago
    Testing & QAAuto-check passed

More from TriliumNext/Trilium

All 24 skills in this repo
  • Cutting A Release

    TriliumNext/Trilium

    A skill your agent uses when cutting, preparing, or debugging a Trilium release — bumping the monorepo version, tagging, or diagnosing a failed "Release" workflow run.

    38k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Developing Electron Desktop

    TriliumNext/Trilium

    A skill your agent uses when working on the Trilium Electron desktop app (apps/desktop) — adding or changing an electronApi method / IPC channel, touching preload.ts, main.ts, services/window.ts or…

    38k GitHub stars~5.7k tokensUpdated today
    Auto-check passed
  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Adding Internal API Route

    TriliumNext/Trilium

    A skill your agent uses when adding, moving, or wiring an internal REST endpoint in Trilium (a new /api/ route) — choosing between a core-shared handler (packages/trilium-core/src/routes/index.ts…

    38k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Adding LLM MCP Tools

    TriliumNext/Trilium

    A skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…

    38k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Ckeditor5 Plugin Development

    TriliumNext/Trilium

    Write, extend, and review CKEditor 5 plugins in the Trilium (TriliumNext Notes) monorepo — the rich-text-note editor under packages/ckeditor5, whose plugins live in src/plugins/.

    38k GitHub stars~4.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Measure Startup Requests

What does Measure Startup Requests do?

A skill your agent uses when measuring what the Trilium client loads at startup — "what loads at boot?", "did this change reduce the startup bundle?", "is <dependency lazy?", or any before/after…. Measure Startup Requests is an agent skill from TriliumNext/Trilium.", or any before/after comparison for lazy-loading / code-splitting work.

When should I use Measure Startup Requests?

Measure Startup Requests fits situations like: measuring what the Trilium client loads at startup — what loads at boot?; did this change reduce the startup bundle?; is <dependency lazy?; any before/after comparison for lazy-loading / code-splitting work.

How do I install Measure Startup Requests in Claude Code?

Run `npx skills add TriliumNext/Trilium --skill measure-startup-requests -a claude-code`. Or copy the skill folder (.claude/skills/measure-startup-requests in TriliumNext/Trilium) into .claude/skills/measure-startup-requests in your project. Claude Code loads it when a task matches its description.

How do I install Measure Startup Requests in Codex?

Run `npx skills add TriliumNext/Trilium --skill measure-startup-requests -a codex`. Or copy the skill folder (.claude/skills/measure-startup-requests in TriliumNext/Trilium) into .agents/skills/measure-startup-requests in your project. Codex loads it when a task matches its description.

Can I use Measure Startup Requests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TriliumNext/Trilium --skill measure-startup-requests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/measure-startup-requests, .gemini/skills/measure-startup-requests, .github/skills/measure-startup-requests and .opencode/skills/measure-startup-requests in your project.

What does Measure Startup Requests need to run?

Going by SKILL.md and its folder, Measure Startup Requests needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node, pnpm and playwright) and credentials named TRILIUM_PASSWORD. Our summary lists: Node.js.

Does Measure Startup Requests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Measure Startup Requests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Measure Startup Requests use?

Measure Startup Requests is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Measure Startup Requests use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Measure Startup Requests?

Skills that share tags, products or a category with Measure Startup Requests: Playwright (EliasOulkadi/shokunin, 114 stars), playwright-cli Browser Automation (github/gh-aw, 5.4k stars), Playwright Skill (lackeyjb/playwright-skill, 3.2k stars) and Tabbit (Tabbit-Browser/dsh-tabbit, 104 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Measure Startup Requests?

TriliumNext (a GitHub organization) maintains it in TriliumNext/Trilium, which has 38,274 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 11, 2026.

Source: TriliumNext/Trilium on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.