Introduction¶
A common workflow for collaboration between frontend developers and designers involves viewing markup in Lanhu (Blue Lake) and then manually writing pages or components. Aligning sizes, spacing, and colors with the design draft often requires repeatedly measuring annotations and comparing them against cutout images, which is time-consuming and prone to missing details. If you want AI to generate pixel-aligned component code directly from design drafts, a clear set of Skill guidelines is needed to interface with Lanhu and constrain the output granularity.
Below is an introduction to the SkillHub community skill “Lanhu Skill”: it targets the pipeline from “Lanhu design drafts → target framework component code,” turning restoration goals into executable Agent capabilities.
What is this¶
Lanhu Skill (coordinates @user_59e19289/design-lanhu-skill, version 1.0.0) is a community source skill categorized under dev-programming on SkillHub, provided by the publisher user_59e19289; the SkillHub page displays the author as vtian.
In one sentence: It restores Lanhu design drafts into pixel-level component code for target frameworks.
It solves the problem of reducing the cost of manually writing UI by comparing annotations when Lanhu design resources are already available. It allows an Agent to read design information and generate component implementations that closely match the design draft according to the skill instructions (specific frameworks and steps are subject to the installed SKILL.md).
Core Functions¶
Based on the public description on SkillHub, the currently verifiable capability boundaries are as follows:
- Design-to-Code Restoration: Takes Lanhu design drafts as input, outputs component code for a “target framework,” and emphasizes the intent for pixel-level alignment.
- Generic Skill Form: Follows the common SkillHub
SKILL.mdskill package format. After installation, it is loaded and executed by Agents that support Skills, such as Cursor and Claude Code. - API Key Dependency: The skill is tagged with
requires_api_key=true, indicating that an API Key related to Lanhu or service access usually needs to be configured before use; specific environment variable names and configuration locations are subject to the documentation within the skill package. Please readSKILL.mdfirst after installation.
The SkillHub page does not list additional subcommands or script manifests separately; features not appearing in the official summary (such as specifying a particular UI library or automatic repository uploads) are not expanded upon in this article.
Installation and Activation¶
SkillHub officially recommends allowing the AI to operate according to the installation documentation or directly invoking the skillhub CLI. When installing, ensure you use --dir to point to the current Agent’s skills directory; otherwise, it may be installed to the default ./skills/ and won’t be recognized.
1. Install SkillHub CLI (if not already installed)¶
First, check if it is already installed:
command -v skillhub && skillhub --version
If not installed, you can follow the SkillHub documentation to perform a full installation (including CLI and default Skills):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
To install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
2. Install Lanhu Skill¶
In Cursor, the skills directory is generally ~/.cursor/skills/. Example command:
skillhub install user_59e19289/design-lanhu-skill --dir ~/.cursor/skills/
You can also send the following prompt to an AI with internet access to have it complete the installation according to the official installation documentation:
Please install `@user_59e19289/design-lanhu-skill` based on https://skillhub.cn/install/skillhub.md.
Common skills paths for other clients (from SkillHub installation documentation, for comparing --dir):
- Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation is complete, restart or refresh the skill list as required by the Agent, and open SKILL.md in the skill directory to view the API Key and invocation methods.
Typical Usage¶
Public materials do not provide a separate end-to-end demonstration repository. The reproducible entry points are mainly “Install Skill + Describe design draft and target framework in conversation.”
- Complete
skillhub installor AI-assisted installation as described in the previous section. - Configure the API Key in
SKILL.mdbased onrequires_api_key=true. - Provide the Lanhu design draft link or page identifier in the Agent conversation, specify the target framework (the “target framework” in the page summary depends on your project’s actual tech stack), and request the generation of pixel-level component code.
- Run the generated results locally, perform visual and dimension spot checks against Lanhu annotations, and then merge them into the project.
The specific phrasing and field names for steps 3 and 4 above are subject to the SKILL.md within the skill package; this article does not speculate on configuration item names.
Applicable Scenarios and Notes¶
Who is it for
- Frontend or full-stack developers who already use Lanhu for design delivery in their team workflows and wish to use Agents to assist in turning design drafts into component code.
- Users of clients that support SkillHub skill directories, such as Cursor, Claude Code, and Codex.
Limitations and Notes
- The skill declares a requirement for an API Key; without configuration, access to Lanhu-side resources is usually impossible. Please place keys in environment variables or secure locations agreed upon by the project, and do not commit them to version control.
- “Pixel-level” fidelity depends on the quality of the design draft, the completeness of annotations, and the Agent’s adherence to
SKILL.md. Generated code still requires manual acceptance. - SkillHub statistics (based on crawled data): Rating 100000, Downloads 2555, Installs 54; data changes with platform updates, please refer to the SkillHub page.
Conclusion¶
Lanhu Skill converges the path from “Lanhu design drafts → target framework component code” into an installable Agent skill, suitable for assisting UI restoration in teams with existing Lanhu collaboration habits. See the SkillHub Installation Documentation for installation and priority source instructions; see SkillHub: Lanhu Skill for the skill homepage, and the API entry is https://api.skillhub.cn/user_59e19289/design-lanhu-skill.