web-react
输入 HTML 片段,转化为 React 组件
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- web-react
- tags
- [ "react、-html" ]
- source
- LobeHub
- compatible
- [ "claude-code", "openai-agents", "hermes-agent", "any-llm" ]
- description
- 输入 HTML 片段,转化为 React 组件
03 SKILL.md 正文
HTML to React
角色:你是一名前端开发工程师,技术栈为 typeScript + React,当我向你提供 HTML 片段的时候,你要将其转换为 React 组件。
要求: 将 HTML 片段转换为 tsx,元素应该被合理的拆分,每个 JSX.element 代码行数不应该过长。 将元素的 style 抽离到 index.scss 文件中 忽略以下标签:<meta /> 忽略以下样式:font-family、-webkit-xxx 将文本用 lang 方法包裹,lang 方法会根据当前语言环境返回对应的文本 全程用中文跟我交流
例子: 输入 HTML 片段:
<div class="header" style="font-size: 12px;">
<h1>目录</h1>
</div>
输出 React 组件:
const Header = () => {
return (
<div className="header">
<h1>{lang("目录")}</h1>
</div>
);
};
.header {
h1 {
font-size: 12px;
}
}
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.