Project Form Patterns
AkaraChen/aghub
Form implementation guidance for the aghub desktop app. An agent skill from AkaraChen/aghub.
Implementation patterns for the @open-doc/core runtime — the split between the viewer and the published bundle, virtual modules, the flow pipeline, the ops layer, dev-only plugins, and the…
$ npx skills add simonliu-ai-product/open-doc --skill doc-runtime-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install simonliu-ai-product/open-doc doc-runtime-patterns --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/simonliu-ai-product/open-doc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/doc-runtime-patterns .claude/skills/doc-runtime-patterns && 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 "doc-runtime-patterns" agent skill from https://github.com/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patterns into .claude/skills/doc-runtime-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "doc-runtime-patterns", 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/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patternsType 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 simonliu-ai-product/open-doc --skill doc-runtime-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install simonliu-ai-product/open-doc doc-runtime-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simonliu-ai-product/open-doc.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/doc-runtime-patterns .agents/skills/doc-runtime-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "doc-runtime-patterns" agent skill from https://github.com/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patterns into .agents/skills/doc-runtime-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "doc-runtime-patterns", 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 simonliu-ai-product/open-doc --skill doc-runtime-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install simonliu-ai-product/open-doc doc-runtime-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simonliu-ai-product/open-doc.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/doc-runtime-patterns .cursor/skills/doc-runtime-patterns && 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 "doc-runtime-patterns" agent skill from https://github.com/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patterns into .cursor/skills/doc-runtime-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "doc-runtime-patterns", 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/simonliu-ai-product/open-doc.git --path .agents/skills/doc-runtime-patterns--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 simonliu-ai-product/open-doc --skill doc-runtime-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install simonliu-ai-product/open-doc doc-runtime-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simonliu-ai-product/open-doc.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/doc-runtime-patterns .gemini/skills/doc-runtime-patterns && 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 "doc-runtime-patterns" agent skill from https://github.com/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patterns into .gemini/skills/doc-runtime-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "doc-runtime-patterns", 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 simonliu-ai-product/open-doc doc-runtime-patternsInstalls 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 simonliu-ai-product/open-doc --skill doc-runtime-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/simonliu-ai-product/open-doc.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/doc-runtime-patterns .github/skills/doc-runtime-patterns && 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 "doc-runtime-patterns" agent skill from https://github.com/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patterns into .github/skills/doc-runtime-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "doc-runtime-patterns", 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 simonliu-ai-product/open-doc --skill doc-runtime-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install simonliu-ai-product/open-doc doc-runtime-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simonliu-ai-product/open-doc.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/doc-runtime-patterns .opencode/skills/doc-runtime-patterns && 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 "doc-runtime-patterns" agent skill from https://github.com/simonliu-ai-product/open-doc/tree/main/.agents/skills/doc-runtime-patterns into .opencode/skills/doc-runtime-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "doc-runtime-patterns", 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.
doc-runtime-patternsImplementation patterns for the @open-doc/core runtime — the split between the viewer and the published bundle, virtual modules, the flow pipeline, the ops layer, dev-only plugins, and the…
Doc Runtime Patterns is an agent skill from simonliu-ai-product/open-doc. Implementation patterns for the @open-doc/core runtime — the split between the viewer and the published bundle, virtual modules, the flow pipeline, the ops layer, dev-only plugins, and the React/perf rules that matter when a page is measured offscreen before it is drawn. Use when writing or refactoring anything under packages/core/src, packages/mcp/src, or when reviewing a PR that touches them. Not for authoring documents under docs/ — that's the create-doc / doc-authoring skills.
Its SKILL.md is about 2.1k 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 Development, covering Refactoring. It works with React and Model Context Protocol. The repository describes itself as: The document framework built for agents — write reports as React, get real A4 pages, an outline, page numbers, and a PDF. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit af6095d. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
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.
Doc Runtime Patterns loads about 2.1k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 1,091 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 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.
The full file from simonliu-ai-product/open-doc at commit af6095d, republished under its MIT licence (© simonliu-ai-product). 1,091 words, ~2,098 tokens.
.claude/skills/doc-runtime-patterns/SKILL.md (or your agent's skills folder).Rules for code that ships inside @open-doc/core (and the MCP server that sits on top of it). They exist because this runtime has two properties most React apps don't: it runs twice in the same tab, and it measures the DOM before it paints.
The viewer imports src/app/** directly. A user's document imports the built dist bundle through @open-doc/core. Both are alive in the same page.
globalThis. See app/lib/page-context.tsx and app/lib/outline.ts.let, a plain createContext, or a module-scoped Map will silently split in two: the viewer writes one copy, the document reads the other, and nothing throws.index.ts changes. If a document is supposed to call it, it must be exported there — not deep-imported from app/lib/*.vite/open-doc-plugin.ts globs docs/*/index.{tsx,jsx,ts,js} into virtual:open-doc/docs with a per-doc cache-bust token; themes-plugin.ts does the same for themes/*.md into virtual:open-doc/themes; folders land in virtual:open-doc/folders for static builds.
fetch of a JSON file. Dev and build then agree by construction.docs/.folders.json is the reference implementation.docs/ (including each document's assets/) and themes/.| Layer | File | Rule |
|---|---|---|
| Pure packer | app/lib/flow.ts (paginateBlocks) | No DOM. Takes BlockMetrics[] + available height, returns page assignments. Every pagination rule is unit-testable here. |
| Measurement | app/lib/flow-measure.ts | Owns offscreen DOM measurement. Batches reads; never interleaves read/write. |
| Composition | app/lib/use-doc-pages.ts | Joins fixed pages + flow output into the rendered page list. |
Everything downstream — viewer, thumbnails, export-pdf.ts, export-html.ts — consumes useDocPages. Reading doc.default directly is a bug, because it skips flow expansion and yields a different page count than the exporters.
Adding a break rule means: extend paginateBlocks, add a case to flow.test.ts, done. If the rule needs a measured value it doesn't have, add it to BlockMetrics — don't reach into the DOM from the packer.
src/ops/vite/routes/docs.ts and the MCP tools are two transports over one implementation.
ops/.OpsError with the status the transport should report — a route never invents its own status text.ops/ + a thin route + a thin MCP tool. Logic inline in a route is a review block: it ships to one caller and not the other.@open-doc/mcp is resolved dynamically by vite/mcp-plugin.ts through a variable specifier. Core must never take a static import on it — the peer relationship points the other way. Missing install warns and disables /mcp; it is never fatal.api-plugin.ts and design-plugin.ts mount under apply: 'serve' only. They write to the user's disk.
validateMutationRequest (http/request-guard.ts) first. No exceptions, including "internal" endpoints.files/assets.ts. Never path.join a user-supplied name onto a directory by hand, and never trust a name that round-tripped through the client.design-plugin.ts accepts literal objects only and reports anything else back to the panel rather than overwriting it. editing/edit-ops.ts refuses any node that isn't a single text child. Widening either of those is an explicit product decision, not an implementation detail.The app targets React 18 — no use(), forwardRef is still required, and there is no compiler. Assume nothing is memoized for you.
memo and re-triggers measurement. Never define a component inside another component.content-visibility: auto is for the viewer only. It must never reach the export path — skipped rendering serializes as empty.The viewer's chrome is compound by design: routes/home-shell.tsx owns the left sidebar and hands folder state to routes through the outlet context; components/doc-sidebar.tsx owns the document rail; the design panel docks right.
<DocSidebar mode="outline"> beats showOutline showThumbnails compact.children over renderX props. Prefer lifting state into the provider that already owns it over threading a callback down three levels.Both exporters build their own offscreen copy, scan the outline there, serialize, then restore the previous snapshot.
waitForFonts(), waitForImages(), waitForDataWaitfor() (app/lib/print-ready.ts).data-waitfor="<selector>" — that is the only contract the exporter has for "not done yet".face.load() on unloaded font faces. document.fonts.ready already covers requested faces; forcing the rest ignores unicode-range and will hang the tab on a subsetted CJK family. (There's a comment in print-ready.ts saying so — don't undo it.)globalThisindex.tsuseDocPages, not doc.defaultflow.ts with a test; measurement in flow-measure.tsops/, OpsError for status, both transports reach the same functionvalidateMutationRequest on every mutating handler; user-named paths via files/assets.tscore without a reason that outweighs install size© simonliu-ai-product, MIT. 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/doc-runtime-patterns of simonliu-ai-product/open-doc.
Open the folder on GitHubat commit af6095d
Doc Runtime Patterns 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 |
|---|---|---|---|---|---|---|
| Doc Runtime Patterns this skillsimonliu-ai-product/open-doc | 108 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Project Form PatternsAkaraChen/aghub | 272 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Claude Code Skillcodeaashu/claude-code | 3.4k | 1 repos | ~2.7k | Automated safety check: Pass | Proprietary | |
| ast-grep Structural Searchcode-yeongyu/oh-my-openagent | 70k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Nuqstrycompai/crm | 11k | 1 repos | ~1.7k | Automated safety check: Pass | MIT | |
| LangBot Core Developmentlangbot-app/LangBot | 18k | — | ~1.4k | Automated safety check: Notes | Apache-2.0 |
AkaraChen/aghub
Form implementation guidance for the aghub desktop app. An agent skill from AkaraChen/aghub.
codeaashu/claude-code
Development conventions and architecture guide for the Claude Code CLI repository.
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
trycompai/crm
nuqs (type-safe URL query state) best practices for Next.js and other React frameworks.
langbot-app/LangBot
Covers developing the LangBot core backend and web UI: dev setup, repo layout, API auth types, adding endpoints, migrations and keeping the MCP server in step.
tirth8205/code-review-graph
Plans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan.
simonliu-ai-product/open-doc
A skill your agent uses when the user asks to apply, process, or clear the comments they left in the open-doc inspector — phrases like "apply the comments", "apply my edits", "I left notes on the…
simonliu-ai-product/open-doc
Technical reference for writing or editing open-doc pages — file contract, the A4/B4/A3 page canvas, print type scale, the vertical budget that decides where a page breaks, tables, charts, table of…
simonliu-ai-product/open-doc
A skill your agent uses when the user wants to create, draft, author, or generate a new document, report, whitepaper, proposal, memo, or spec in this open-doc repo.
simonliu-ai-product/open-doc
Resolve which document, page, and (optionally) selected element the user is currently viewing in the open-doc dev server.
simonliu-ai-product/open-doc
Reviews page layout, typography, and pagination code in open-doc against a print craft bar — the sheet is the deliverable, not the screen.
simonliu-ai-product/open-doc
Design and accessibility rules for the open-doc viewer chrome — the browser shell, sidebars, thumbnail rail, outline, assets and design panels, inspector overlay, and menus.
Works with
Categories
Implementation patterns for the @open-doc/core runtime — the split between the viewer and the published bundle, virtual modules, the flow pipeline, the ops layer, dev-only plugins, and the…. Doc Runtime Patterns is an agent skill from simonliu-ai-product/open-doc. Implementation patterns for the @open-doc/core runtime — the split between the viewer and the published bundle, virtual modules, the flow pipeline, the ops layer, dev-only plugins, and the React/perf rules that matter when a page is measured offscreen before it is drawn.
Doc Runtime Patterns fits situations like: refactoring anything under packages/core/src; packages/mcp/src; reviewing a PR that touches them.
Run `npx skills add simonliu-ai-product/open-doc --skill doc-runtime-patterns -a claude-code`. Or copy the skill folder (.agents/skills/doc-runtime-patterns in simonliu-ai-product/open-doc) into .claude/skills/doc-runtime-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add simonliu-ai-product/open-doc --skill doc-runtime-patterns -a codex`. Or copy the skill folder (.agents/skills/doc-runtime-patterns in simonliu-ai-product/open-doc) into .agents/skills/doc-runtime-patterns 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 simonliu-ai-product/open-doc --skill doc-runtime-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/doc-runtime-patterns, .gemini/skills/doc-runtime-patterns, .github/skills/doc-runtime-patterns and .opencode/skills/doc-runtime-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Doc Runtime Patterns is instructions for the agent only.
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.
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.
Doc Runtime Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.4k 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 Doc Runtime Patterns: Project Form Patterns (AkaraChen/aghub, 272 stars), Claude Code Skill (codeaashu/claude-code, 3.4k stars), ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars) and Nuqs (trycompai/crm, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
simonliu-ai-product (a GitHub organization) maintains it in simonliu-ai-product/open-doc, which has 108 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.
Source: simonliu-ai-product/open-doc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.