Developing PDF Viewer
TriliumNext/Trilium
A skill your agent uses when changing Trilium's built-in PDF viewer — anything under packages/pdfjs-viewer (the code injected into Mozilla's PDF.js viewer: bootstrap.ts, annotations.ts, pages.ts…
Create a new custom TipTap node for the Rich Text Editor that works in edit mode, on-screen preview, and PDF download.
$ npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install getlago/lago-front create-rich-text-editor-custom-node --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/getlago/lago-front.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-rich-text-editor-custom-node .claude/skills/create-rich-text-editor-custom-node && rm -rf skills-srcUse ~/.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/
Install the "create-rich-text-editor-custom-node" agent skill from https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-node into .claude/skills/create-rich-text-editor-custom-node/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "create-rich-text-editor-custom-node", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-nodeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install getlago/lago-front create-rich-text-editor-custom-node --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/getlago/lago-front.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/create-rich-text-editor-custom-node .agents/skills/create-rich-text-editor-custom-node && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "create-rich-text-editor-custom-node" agent skill from https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-node into .agents/skills/create-rich-text-editor-custom-node/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "create-rich-text-editor-custom-node", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install getlago/lago-front create-rich-text-editor-custom-node --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/getlago/lago-front.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/create-rich-text-editor-custom-node .cursor/skills/create-rich-text-editor-custom-node && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "create-rich-text-editor-custom-node" agent skill from https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-node into .cursor/skills/create-rich-text-editor-custom-node/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "create-rich-text-editor-custom-node", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/getlago/lago-front.git --path .agents/skills/create-rich-text-editor-custom-node--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install getlago/lago-front create-rich-text-editor-custom-node --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/getlago/lago-front.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/create-rich-text-editor-custom-node .gemini/skills/create-rich-text-editor-custom-node && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "create-rich-text-editor-custom-node" agent skill from https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-node into .gemini/skills/create-rich-text-editor-custom-node/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "create-rich-text-editor-custom-node", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install getlago/lago-front create-rich-text-editor-custom-nodeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/getlago/lago-front.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/create-rich-text-editor-custom-node .github/skills/create-rich-text-editor-custom-node && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "create-rich-text-editor-custom-node" agent skill from https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-node into .github/skills/create-rich-text-editor-custom-node/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "create-rich-text-editor-custom-node", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install getlago/lago-front create-rich-text-editor-custom-node --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/getlago/lago-front.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/create-rich-text-editor-custom-node .opencode/skills/create-rich-text-editor-custom-node && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "create-rich-text-editor-custom-node" agent skill from https://github.com/getlago/lago-front/tree/main/.agents/skills/create-rich-text-editor-custom-node into .opencode/skills/create-rich-text-editor-custom-node/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "create-rich-text-editor-custom-node", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
create-rich-text-editor-custom-nodeCreate a new custom TipTap node for the Rich Text Editor that works in edit mode, on-screen preview, and PDF download.
Create Rich Text Editor Custom Node is an agent skill from getlago/lago-front. Create a new custom TipTap node for the Rich Text Editor that works in edit mode, on-screen preview, and PDF download. Generates the schema, editor extension, NodeView component, CSS styles, tests, and registers the extension.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Documents & Office, covering PDF and React components. The repository describes itself as: Open Source Metering and Usage Based Billing. The licence is AGPL-3.0.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit d4cb9fe. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadGlobGrepEditWriteBashAskUserQuestionFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Create Rich Text Editor Custom Node loads about 2k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 371 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Glob, Grep, Edit, Write, Bash, AskUserQuestionAutomated 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.
The full file from getlago/lago-front at commit d4cb9fe, republished under its AGPL-3.0 licence (© getlago). 371 words, ~1,957 tokens.
.claude/skills/create-rich-text-editor-custom-node/SKILL.md (or your agent's skills folder).This guide helps create a new custom TipTap node for the Rich Text Editor following the project's architecture conventions. The node will work across all three rendering contexts: edit mode (interactive), on-screen preview, and PDF download.
renderHTML() in .schema.ts <-- single source of truth for preview + PDF
|
+-- On-screen preview: editor.getHTML() --> dangerouslySetInnerHTML
+-- PDF download: editor.getHTML() --> printHtmlContent (hidden iframe)
NodeView (edit mode only) <-- interactive UI, no preview logicAll files live under src/components/designSystem/RichTextEditor/.
renderHTML is the single source of truth for preview/PDF appearance. Never duplicate rendering logic in NodeViews.if (isPreview) branches..schema.ts has zero React imports (headless-safe). .ts extends it with addNodeView().addOptions() + .configure(). The schema declares options, consumers pass data at configuration time.richTextEditor.css scoped to .ProseMirror. They apply to both the editor and PDF automatically.Read these before starting:
extensions/baseExtensions.tsextensions/PlanBlock.schema.tsextensions/Mention.schema.tsextensions/PlanBlock.tsextensions/LinkCard.tsPlanBlock/PlanBlockView.tsxRichTextEditor.tsxdownloadMarkdownPdf.ts__tests__/PlanBlock.test.ts| Pattern | When to use | Files to create |
|---|---|---|
| Schema only (like LinkCard) | No interactive edit UI, no resolution data | extensions/YourNode.ts only |
| Schema + NodeView (like PlanBlock) | Needs interactive edit UI and/or resolution data | extensions/YourNode.schema.ts + extensions/YourNode.ts + YourNode/YourNodeView.tsx |
Create extensions/{NodeName}.schema.ts with zero React imports:
import { mergeAttributes, Node } from '@tiptap/core'
export interface YourNodeAttributes {
yourId: string
}
export const YourNodeSchema = Node.create({
name: 'yourNode',
group: 'block',
atom: true,
// Only needed if renderHTML uses external data for resolution
addOptions() {
return {
items: {} as Record<string, { name: string }>,
}
},
addAttributes() {
return {
yourId: {
default: '',
parseHTML: (element) => element.dataset.yourId ?? '',
},
}
},
// Markdown serialization
addStorage() {
return {
markdown: {
serialize(
state: { write: (text: string) => void; closeBlock: (node: unknown) => void },
node: { attrs: YourNodeAttributes },
) {
state.write(`<!-- entity:yourtype:${node.attrs.yourId} -->`)
state.closeBlock(node)
},
parse: {
updateDOM(element: HTMLElement) {
element.innerHTML = element.innerHTML.replaceAll(
/<!--\s*entity:yourtype:(\S*?)\s*-->/g,
(_match: string, yourId: string) =>
`<div data-type="your-node" data-your-id="${yourId}"></div>`,
)
},
},
},
}
},
parseHTML() {
return [{ tag: 'div[data-type="your-node"]' }]
},
// SINGLE SOURCE OF TRUTH for preview and PDF
renderHTML({ HTMLAttributes }) {
const yourId = String(HTMLAttributes.yourId ?? '')
const item = this.options.items?.[yourId]
const wrapperAttrs = mergeAttributes(HTMLAttributes, {
'data-type': 'your-node',
'data-your-id': yourId,
class: 'your-node',
})
if (item) {
return ['div', wrapperAttrs, ['span', { class: 'your-node__name' }, item.name]]
}
return ['div', wrapperAttrs, ['span', { class: 'your-node__placeholder' }, yourId || 'Select...']]
},
})Create extensions/{NodeName}.ts:
import { ReactNodeViewRenderer } from '@tiptap/react'
import { YourNodeView } from '../YourNode/YourNodeView'
import { YourNodeSchema } from './YourNode.schema'
export type { YourNodeAttributes } from './YourNode.schema'
export const YourNode = YourNodeSchema.extend({
addNodeView() {
return ReactNodeViewRenderer(YourNodeView)
},
})Create {NodeName}/{NodeName}View.tsx:
import { NodeViewProps, NodeViewWrapper } from '@tiptap/react'
export const YourNodeView = ({ node, updateAttributes, selected }: NodeViewProps) => {
const yourId = String(node.attrs.yourId ?? '')
const isEmpty = !yourId
// Edit mode UI only. No preview branches.
if (isEmpty) {
return (
<NodeViewWrapper>
<button className={`your-node your-node--empty ${selected ? 'your-node--selected' : ''}`}>
<span className="your-node__placeholder">Select...</span>
</button>
</NodeViewWrapper>
)
}
return (
<NodeViewWrapper>
<button className={`your-node ${selected ? 'your-node--selected' : ''}`}>
<span>Item: {yourId}</span>
</button>
</NodeViewWrapper>
)
}In richTextEditor.css inside .ProseMirror:
.your-node {
@apply my-2 rounded-lg border border-grey-300 p-3;
}
.your-node__name {
@apply text-base font-medium text-grey-700;
}If the node needs resolution data:
In RichTextEditor.tsx extensions array:
YourNode.configure({ items: itemsFromProps }),In downloadMarkdownPdf.ts extensions array:
YourNodeSchema.configure({ items }),Also add the new data to DownloadMarkdownPdfOptions and to RichTextEditorProps.
If the node does NOT need resolution data:
Add it to baseExtensions.ts:
export const getBaseExtensions = (): Extensions => [
// ...existing...
YourNode,
]__tests__/{NodeName}.test.ts)Test renderHTML via a real Editor instance:
const getHtml = (attrs: Record<string, unknown>, options?: Record<string, unknown>) => {
const editor = new Editor({
extensions: [StarterKit, YourNodeSchema.configure(options)],
content: { type: 'doc', content: [{ type: 'yourNode', attrs }] },
})
const html = editor.getHTML()
editor.destroy()
return html
}Test: renderHTML with/without resolution data, markdown serialize/parse, parseHTML.
__tests__/{NodeName}View.test.tsx)Test edit mode interactions only. No preview tests.
renderHTML handles both resolved and fallback casesif (isPreview) branches.ProseMirrorRichTextEditor.tsx and downloadMarkdownPdf.ts (or baseExtensions.ts)npx tsc --noEmit passesnpx jest --no-coverage src/components/designSystem/RichTextEditor/__tests__/ passes© getlago, 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
Just SKILL.md in .agents/skills/create-rich-text-editor-custom-node of getlago/lago-front.
Open the folder on GitHubat commit d4cb9fe
Create Rich Text Editor Custom Node 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Create Rich Text Editor Custom Node this skillgetlago/lago-front | 163 | — | ~2k | Automated safety check: Notes | AGPL-3.0 | |
| Developing PDF ViewerTriliumNext/Trilium | 38k | — | ~1.8k | Automated safety check: Pass | AGPL-3.0 | |
| Build With SimplepdfSimplePDF/simplepdf-embed | 407 | — | ~7k | Automated safety check: Pass | MIT | |
| React PDFtrailofbits/skills-curated | 512 | — | ~3.1k | Automated safety check: Notes | CC-BY-SA-4.0 | |
| HTML Reportginlix-ai/LangAlpha | 1.8k | — | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| Frontend Textbooksonepixelaway/frontend-textbooks | 106 | — | ~3.5k | Automated safety check: Pass | MIT |
TriliumNext/Trilium
A skill your agent uses when changing Trilium's built-in PDF viewer — anything under packages/pdfjs-viewer (the code injected into Mozilla's PDF.js viewer: bootstrap.ts, annotations.ts, pages.ts…
SimplePDF/simplepdf-embed
Integrate SimplePDF into a web application for PDF viewing, editing, filling, signing, programmatic control, AI-agent interaction, human-in-the-loop form prefilling, submissions, webhooks, or…
trailofbits/skills-curated
Generates PDF documents using the React-PDF library (@react-pdf/renderer) with TypeScript and JSX.
ginlix-ai/LangAlpha
Self-contained styled HTML reports written to the task directory: PDF-exportable research documents with inline data, charts, and theme-aware CSS
onepixelaway/frontend-textbooks
Turns a manuscript into a designed US Letter HTML book with a matching PDF, original cover art and checks that the manuscript text is preserved.
lianghsun/open-sheet
Technical reference for writing open-sheet workbooks as React files that export live .xlsx models, built around a rule against hand-written cell addresses.
getlago/lago-front
A skill your agent uses when asked to babysit, monitor, shepherd, or keep working on a GitHub pull request until it is green, review-ready, approved, mergeable, or ready to merge.
getlago/lago-front
Triage a CVE / Dependabot alert in a JS/TS project and recommend the least-invasive fix.
getlago/lago-front
Extract a Formik form section into a TanStack Form drawer with Zod validation, following the plan form migration pattern.
getlago/lago-front
Phase 2 of the loop pipeline for lago-front. An agent skill from getlago/lago-front.
getlago/lago-front
Cleanup phase of the loop pipeline for lago-front, for the worktree layout only.
getlago/lago-front
You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production…
Categories
Create a new custom TipTap node for the Rich Text Editor that works in edit mode, on-screen preview, and PDF download. Create Rich Text Editor Custom Node is an agent skill from getlago/lago-front. Create a new custom TipTap node for the Rich Text Editor that works in edit mode, on-screen preview, and PDF download.
Create Rich Text Editor Custom Node fits situations like: tasks that involve PDF; tasks that involve React components.
Run `npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a claude-code`. Or copy the skill folder (.agents/skills/create-rich-text-editor-custom-node in getlago/lago-front) into .claude/skills/create-rich-text-editor-custom-node in your project. Claude Code loads it when a task matches its description.
Run `npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a codex`. Or copy the skill folder (.agents/skills/create-rich-text-editor-custom-node in getlago/lago-front) into .agents/skills/create-rich-text-editor-custom-node in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add getlago/lago-front --skill create-rich-text-editor-custom-node -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-rich-text-editor-custom-node, .gemini/skills/create-rich-text-editor-custom-node, .github/skills/create-rich-text-editor-custom-node and .opencode/skills/create-rich-text-editor-custom-node in your project.
Going by SKILL.md and its folder, Create Rich Text Editor Custom Node needs the command-line tools its instructions call (npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Glob, Grep, Edit, Write, Bash, AskUserQuestion.
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Create Rich Text Editor Custom Node 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.
About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Create Rich Text Editor Custom Node: Developing PDF Viewer (TriliumNext/Trilium, 38k stars), Build With Simplepdf (SimplePDF/simplepdf-embed, 407 stars), React PDF (trailofbits/skills-curated, 512 stars) and HTML Report (ginlix-ai/LangAlpha, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
getlago (a GitHub organization) maintains it in getlago/lago-front, which has 163 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.
Source: getlago/lago-front on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.