agentleFS
lynx-communitylynx-community/skills/skills/vanilla-lynx/SKILL.md

vanilla-lynx

Skill28 starsChanged 8 months agoApache-2.0View on GitHub

Author, review, or explain Vanilla Lynx source that directly uses Element PAPI, delivered as a build-free `.lynxml` artifact or an Rspeedy project, including related build and serving workflows. Excludes ReactLynx, Canvas/WebGL, standalone API/CSS lookups, device-side runtime debugging, and bundle analysis.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill to author Vanilla Lynx directly with Element PAPI and Lynx Runtime APIs, without ReactLynx or JSX.

    line 9
  2. Distinctive:

    Add background-thread source only for heavier business logic, async work, timers, native calls, or data processing.

    line 24
  3. Very specific:

    Keep external bundle building and loading separate and background-only.

    line 26
  4. Distinctive:

    Read only the reference files needed for the current task.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Author Vanilla Lynx with Element PAPI

Use this skill to author Vanilla Lynx directly with Element PAPI and Lynx Runtime APIs, without ReactLynx or JSX. Treat build-free .lynxml and Rspeedy as peer output formats.

Choose the Output Format

  • Choose .lynxml when the user asks for a single file, build-free or directly loadable output, or explicitly says not to add a build step.
  • Choose Rspeedy when the user asks for Rspeedy, a project scaffold or build configuration, or an app bundle produced by a build.
  • Generic words such as app, page, card, or project do not select a format by themselves. If a complete authoring request lacks a distinguishing delivery or build requirement, or gives conflicting format signals, ask one concise clarification before generating the deliverable. Do not generate both complete formats unless the user requests both.
  • For a focused source-level question or snippet request, answer the requested scope without forcing an output-format decision.

Core Rules

  • Rely only on Lynx-supported ECMAScript built-ins (note that Intl is not built in), Element PAPI, and Lynx runtime globals documented by this skill (lynx, SystemInfo, console, timers, requestAnimationFrame/cancelAnimationFrame, and background-only NativeModules/fetch). Do not use ReactLynx, JSX, virtual DOM, or undeclared browser/Node globals such as window, document, navigator, localStorage, or performance (use either Date.now() or the requestAnimationFrame callback timestamp consistently without mixing the two; lynx.performance is for trace/timing observation and has no .now()).
  • For a complete authoring request, deliver a complete artifact in the selected format. Never return only an example asset or reference path.
  • Keep Element PAPI tree creation, mutation, lifecycle rendering, and UI updates in the main-thread source: <script thread="main"> for .lynxml or main-thread.ts for Rspeedy. Never call Element PAPI APIs or __FlushElementTree() from the background-thread source; it only sends serializable patches for the main thread to apply and flush.
  • Rely on the SDK flush for initial render; call __FlushElementTree() after later UI mutations.
  • Add background-thread source only for heavier business logic, async work, timers, native calls, or data processing. Keep cross-thread payloads serializable.
  • Use lynx.getEngine() only for engine-defined lifecycle events such as __RenderPage, __UpdatePage, and __DestroyLifetime; never use it for app-defined thread-local or cross-thread events. Lifecycle handlers may ignore their event payload when the implementation does not need it. Keep stable handler references for long-lived and cross-thread listeners; remove them with the same context and event name during destroy instead of registering inline callbacks.
  • Keep external bundle building and loading separate and background-only. External modules must be plain TypeScript or JavaScript; never use ReactLynx, JSX, or ReactLynx transforms in them. Match the rslib entry key to the first loadScript argument.

Reference Routing

Read only the reference files needed for the current task. Preserve their explicit constraints rather than replacing them with generic guidance.

TaskRead
Author, assemble, or review a complete .lynxml documentreferences/lynxml.md
Author or review a complete Rspeedy project or build workflowreferences/rspeedy-project.md
Build the main-thread Element PAPI tree or update UIreferences/main-thread.md
Choose runtime event APIs or wire lifecycle eventsreferences/event.md
Implement heavier logic in the background scriptreferences/background.md
Author or review CSS using Lynx styling and layout rulesreferences/style.md
Build background-thread code into an external bundle with rslibreferences/external-build.md
Load or call a background-thread external bundle at runtimereferences/external-runtime.md

Runtime Validation

For a generated .lynxml, run npx http-server . from the directory containing the unchanged artifact and use an address printed by that server that the target device can reach. For an Rspeedy project, use its configured build and development-server workflow rather than a generic static server. Then use the lynx-devtool skill for client discovery, opening the reachable URL, runtime inspection, console logs, screenshots, and interactions. Do not duplicate device-debugging workflow here or present agent-lynx as an artifact builder or server.

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.