fiber-element

Installation
SKILL.md

FiberElement Lynx Apps

Use this skill to build Lynx apps directly from Element PAPI calls exposed through @lynx-js/type-element-api. Treat Element PAPI as the rendering layer: main thread renders, background thread handles async work and events.

Core Rules

  • Do not use ReactLynx, JSX, virtual DOM, or browser DOM APIs unless the user explicitly asks for them.
  • Split app code into src/main-thread.ts, src/background.ts, and src/style.css.
  • Use @lynx-js/type-element-api for globals/types; Element PAPI functions are runtime globals and are not imported as values.
  • Keep async work, timers, native data updates, storage, and event handling in src/background.ts.
  • Keep Element PAPI tree creation and mutation in src/main-thread.ts.
  • If first-screen data exists, keep that data in the main-thread environment first and synchronize it to background through processData.

Reading Order

  1. For project scaffold and template-webpack build setup, read references/template-webpack-build.md.
  2. For shared main-thread helpers, lifecycle shape, Element PAPI selection, and restrictions, read references/main-thread-rendering.md.
  3. For first-screen data, background updates, and double-thread communication, read references/double-thread-data-sync.md.
Related skills
Installs
9
GitHub Stars
22
First Seen
8 days ago