mcpField
L
lynx-api-docs

lynx-api-docs

github.com/lynx-communityDevelopment28153 installsUpdated 1d ago
Repository

About lynx-api-docs

lynx-api-docs is a reference-guided skill for writing and editing Lynx page code. It directs developers to consult the relevant installed API documentation first, rather than relying on web platform assumptions.

Key features

  1. 01Task-based documentation lookup
  2. 02Lynx layout and CSS guidance
  3. 03Element and selector references
  4. 04Web-to-Lynx migration guidance
  5. 05Pre-edit documentation checks

Use cases

  1. 01Checking supported CSS before styling a page
  2. 02Choosing a Lynx layout system
  3. 03Verifying element APIs before editing
  4. 04Adapting web code to Lynx

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/lynx-community/skills --skill lynx-api-docs

After installing, type/lynx-api-docsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

best-practices.md
css/
pseudo-classes.md
selectors.md
supported-properties.md
values-and-units.md
elements/
blur-view.md
image.md
input.md
list.md
overlay.md
page.md
refresh.md
scroll-coordinator.md
scroll-view.md
svg.md
text.md
textarea.md
view.md
viewpager.md
webview.md
examples/
bottom-nav.md
card-list.md
sidebar-layout.md
sticky-header.md
waterfall.md
layout/
flex-layout.md
grid-layout.md
linear-layout.md
relative-layout.md
lynx-vs-web/
css-differences.md

Details

From the project README

Using Lynx API Docs

Overview

Pre-training knowledge is insufficient for Lynx. Lynx is a rendering platform (like a browser) with its own elements, non-standard CSS behavior, unique layout systems, and web-incompatible defaults. Always retrieve from the installed API docs before writing or modifying Lynx page code.

Core Rule

MUST ALWAYS read the relevant API docs BEFORE writing or editing any Lynx code.

Do not rely on web CSS knowledge. Do not assume standard HTML behavior. Do not guess element APIs. Lynx is a distinct platform with its own rules.

Why Web Knowledge Fails

Lynx is not a web browser. Web assumptions produce broken Lynx code:

  • Elements: <view>, <text>, <image> — not <div>, <span>, <img>
  • CSS defaults: box-sizing: auto normally uses border-box sizing; no margin collapsing; Linear layout (not Flow)
  • Properties: Many CSS properties are unsupported or behave differently — always check css/ docs

Every web assumption is a potential bug.

How to Use the Docs

  1. Identify what you're working on (layout, CSS, element, migration, pattern)
  2. Look up the relevant doc file from the table below
  3. Read the doc BEFORE writing or editing code
  4. Apply the rules and constraints from the doc
  5. If uncertain, search the elements/ or css/ directories

Quick Reference

TaskRead These Files First
Choose layoutlayout/linear-layout.md (default), layout/flex-layout.md, layout/grid-layout.md, layout/relative-layout.md
CSS properties/unitscss/supported-properties.md, css/values-and-units.md
CSS selectorscss/selectors.md, css/pseudo-classes.md
Use an elementelements/<element-name>.md
Migrate from weblynx-vs-web/migration-guide.md, lynx-vs-web/css-differences.md
Theming/animation/responsivepatterns/theming.md, patterns/animation.md, patterns/responsive.md
General lookupquick-reference.md, best-practices.md

Core Rules

The compact layout decision rules and key CSS constraints are documented in quick-reference.md. Most critical:

  • Text must use <text> component
  • Box sizing initially uses auto, normally with border-box sizing; set an explicit value when compatibility settings may differ
  • No margin collapsing
  • Use rem + vw for screen adaptation

Red Flags — Stop and Read Docs

  • Adding a <div> or <span> → Lynx uses <view>, <text>
  • Using margin without checking if margin collapsing applies → It doesn't
  • Assuming content-box → auto normally uses border-box sizing; check css/supported-properties.md#box-model
  • Using web CSS properties without checking css/supported-properties.md
  • Guessing element attributes → Read elements/<name>.md
  • Choosing rpx for web-portable code → rpx is Lynx-specific; use rem + vw for web compatibility
  • Writing plain text without <text> wrapper → Invalid in Lynx
  • Using web pseudo-classes without checking css/pseudo-classes.md
  • Assuming standard HTML flow layout → Lynx uses linear layout by default

Comments

Markdown supported