using-lynx-api-docs
Skill này làm gì
Buộc trợ lý tra cứu tài liệu API Lynx đã cài trước khi nó viết hoặc thay đổi code Lynx. Dành cho lập trình viên xây dựng ứng dụng trên nền tảng render Lynx.
Khi nào nên dùng
- ✓Khi bạn yêu cầu trợ lý viết hoặc thay đổi một trang, template hoặc thành phần Lynx.
- ✓Khi bố cục hoặc kiểu CSS Lynx hoạt động khác với web.
- ✓Khi bạn yêu cầu nó rà soát code Lynx hoặc chuyển một trang web sang Lynx.
Liên kết skill
https://github.com/lynx-family/lynx/blob/develop/ai/skills/lynx-api-docs/skills/using-lynx-api-docs/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Sửa bố cục trang Lynx của tôi để hình ảnh nằm cạnh văn bản, dùng đúng các phần tử Lynx.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Trợ lý tìm tài liệu Lynx phù hợp với tác vụ, đọc nó, rồi viết code với các phần tử và quy tắc kiểu dáng của chính nền tảng thay vì giả định hành vi của web.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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: autonormally 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
- Identify what you're working on (layout, CSS, element, migration, pattern)
- Look up the relevant doc file from the table below
- Read the doc BEFORE writing or editing code
- Apply the rules and constraints from the doc
- If uncertain, search the
elements/orcss/directories
Quick Reference
| Task | Read These Files First |
|---|---|
| Choose layout | layout/linear-layout.md (default), layout/flex-layout.md, layout/grid-layout.md, layout/relative-layout.md |
| CSS properties/units | css/supported-properties.md, css/values-and-units.md |
| CSS selectors | css/selectors.md, css/pseudo-classes.md |
| Use an element | elements/<element-name>.md |
| Migrate from web | lynx-vs-web/migration-guide.md, lynx-vs-web/css-differences.md |
| Theming/animation/responsive | patterns/theming.md, patterns/animation.md, patterns/responsive.md |
| General lookup | quick-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+vwfor screen adaptation
Red Flags — Stop and Read Docs
- Adding a
<div>or<span>→ Lynx uses<view>,<text> - Using
marginwithout checking if margin collapsing applies → It doesn't - Assuming
content-box→autonormally uses border-box sizing; checkcss/supported-properties.md#box-model - Using web CSS properties without checking
css/supported-properties.md - Guessing element attributes → Read
elements/<name>.md - Choosing
rpxfor web-portable code →rpxis Lynx-specific; userem+vwfor 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
Câu hỏi thường gặp
Vì sao không dùng kiến thức web thông thường?
Lynx là nền tảng render riêng, có phần tử và mặc định bố cục riêng, nên các giả định từ web thường tạo ra code lỗi.
Nó áp dụng cho những tệp nào?
Các tệp riêng của Lynx, gồm trang .ttml và tệp Lynx TSX, được hướng dẫn này bao gồm.
Tài liệu có cần được cài sẵn không?
Có. Skill yêu cầu trợ lý tìm trong tài liệu API đã cài trước khi hành động.
Chi tiết
Mô tả gốc của tác giả
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.
repo: lynx-family/lynx
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #10921
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.