# Using Lynx API Docs

Provides authoritative guidance for Lynx development involving pages, templates...

- Repository: https://github.com/lynx-family/lynx (15228 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add lynx-family/lynx --skill using-lynx-api-docs -g -a claude-code -y`
Codex: `npx skills add lynx-family/lynx --skill using-lynx-api-docs -g -a codex -y`
Cursor: `npx skills add lynx-family/lynx --skill using-lynx-api-docs -g -a cursor -y`
Gemini CLI: `npx skills add lynx-family/lynx --skill using-lynx-api-docs -g -a gemini-cli -y`

## Description

Provides authoritative guidance for Lynx development involving pages, templates, components, CSS, layouts, elements, web migration, rendering or styling bugs, and code review. Applies to *.ttml, Lynx *.tsx, and all Lynx-specific files, and requires searching the installed API docs before acting.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

The rest: https://github.com/lynx-family/lynx/blob/HEAD/ai/skills/lynx-api-docs/skills/using-lynx-api-docs/SKILL.md
