Lanhu Design Restoration
Paste the following prompt into your AI chat to install this skill:
Follow https://skillhub.cn/install/skillhub.md to install @user_59e19289/design-lanhu-skill.
About this skill
Problem it addresses
After a Lanhu design handoff, developers often compare layers, colors, spacing, fonts, and assets by hand. It is easy to miss gradients, shadows, non-uniform border radii, opacity, and complex layout behavior, while also creating one-off pages that diverge from the project’s existing design system. This skill turns design-to-component restoration into an inspectable workflow focused on pixel-level styling and production-ready output.
How it works
- Lists the available design screens and lets the user choose a page or index.
- Fetches
.schema.json,.tokens.txt, the design screenshot, and sliced image assets; official HTML/CSS is downloaded only when requested and used only as a structural reference. - Detects the target stack from
package.json,pubspec.yaml,Podfile, and similar files, then identifies styling approaches such asTailwind,SCSS, andCSS Modules. - Uses
.schema.jsonas the authoritative source for the layer tree and maps design elements to component code. IfDESIGN.mdexists, it reads the file first and follows its design tokens, naming, directory, and reusable component conventions. - For mobile designs, checks adaptation setups such as
pxtorem,postcss-px-to-viewport, andrembaselines before choosing output units. - Runs a 13-item verification pass covering dimensions, colors, gradients, shadows, typography, spacing, image assets,
overflow, component decomposition, andBEMnaming.
Boundaries and notes
It fits frontend or cross-platform component restoration when a valid Lanhu cookie is available and the goal is to reduce missing style details. It does not replace interaction design, API integration, or accessibility testing. If the project lacks a mobile adaptation setup, output may remain in px with a note. When DESIGN.md and the schema conflict, follow the documented rule if present; otherwise prefer schema values for single-screen fidelity.
Use Cases
- Frontend engineers receive a Lanhu homepage design and need a React component that keeps gradients, shadows, radii, and image assets.
- Cross-platform teams get a Lanhu mobile design and need resources and styles extracted from the schema for Flutter or Android components.
- Projects with DESIGN.md need a new page restored according to tokens, BEM naming, and reusable component rules.
- Before release, teams review restored Lanhu components to verify fonts, spacing, overflow, and asset paths are not missing or altered.
Best For
- Frontend engineers who need Lanhu designs converted into React or Vue components with gradients, shadows, fonts, and spacing preserved.
- Cross-platform developers who want reusable Flutter, Android, or iOS components generated from the same Lanhu schema.
- Design-system maintainers who need new pages to follow DESIGN.md tokens, naming, directory, and component conventions.
- Component-library engineers who verify BEM naming, style completeness, and local asset references in restored code.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Automatically detects engineering or competition code, analyzes bugs, vulnerabilities, algorithm complexity, and edge cases, then produces risk-level findings with before/after fixes.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
Explains enterprise workflow configuration parameters, code lines, condition templates, and unsupported features with privacy-safe standard responses.