html-mockups
它能做什么
它指导 AI 智能体把界面屏幕和组件做成单个文件的 HTML 样机。适用于希望在构建前看到界面构想的设计师和产品团队。
适用场景
- ✓当你要求为某个界面或界面组件制作样机时。
- ✓当你想要一个可以在浏览器中打开的视觉原型时。
- ✓当你需要一个以单个文件交付、便于分享的深色主题设计时。
技能链接
https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/html-mockups/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我做一个深色主题的登录界面 HTML 样机。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把所有样式和脚本放进一个 HTML 文件中,使用固定的配色系统。你可以用任何浏览器打开该文件查看样机。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Output Location
Write mockups to the task directory if one exists:
.humanlayer/tasks/{task-slug}/mockup-{description}.html
Or to a reasonable location the user specifies.
Each mockup must be a single self-contained file: put all CSS in a <style> block and all JS in a
<script> block. Do not split shared styles or scripts into sibling files. The cloud viewer serves
every artifact from its own signed URL, so an HTML file that links to a sibling .css or .js file
renders unstyled there even though it looks right when opened from disk.
Design System: Poimandres Theme
Color Palette
:root {
/* Backgrounds */
--terminal-bg: #1b1e28; /* Primary background - very dark blue-gray */
--terminal-bg-alt: #303340; /* Secondary/elevated background */
/* Text */
--terminal-fg: #a6accd; /* Primary text - muted purple-gray */
--terminal-fg-dim: #767c9d; /* Secondary/muted text */
/* Semantic Colors */
--terminal-accent: #add7ff; /* Primary accent - bright cyan blue */
--terminal-success: #5de4c7; /* Success/positive - mint green */
--terminal-warning: #fffac2; /* Warning/caution - pale yellow */
--terminal-error: #d0679d; /* Error/destructive - pink/magenta */
/* Borders & Inputs */
--terminal-border: #303340; /* Border color - matches bg-alt */
--terminal-input-bg: #ffffff05; /* Input background - 5% white */
--terminal-input-border: #ffffff10; /* Input border - 10% white */
--terminal-selection: #717cb425; /* Selection highlight */
/* Derived */
--terminal-accent-dim: rgba(173, 215, 255, 0.3); /* 30% accent */
}
Typography
- Font Family:
'JetBrains Mono', 'Fira Code', monospace - Base Size: 13px for body text
- Labels: 10-11px, uppercase, letter-spacing 1-1.5px
- Buttons: 10-11px, uppercase, letter-spacing 1-1.5px, font-weight 500
Button Styling
All buttons use these base styles:
- Border radius: 0 (fully square corners -
rounded-none) - Border: 1px solid
- Font: Monospace, uppercase, letter-spacing
- Transition: 0.15s for all properties
Button Variants
Default (Accent)
.btn-default {
background: rgba(173, 215, 255, 0.2); /* 20% accent */
color: #add7ff; /* accent text */
border-color: #add7ff; /* accent border */
}
.btn-default:hover {
background: #add7ff; /* solid accent */
color: #1b1e28; /* dark text */
}
Ghost
.btn-ghost {
background: transparent;
color: #767c9d; /* dim text */
border-color: #303340; /* border color */
}
.btn-ghost:hover {
background: rgba(173, 215, 255, 0.1); /* 10% accent */
border-color: #add7ff;
color: #add7ff;
}
Destructive
.btn-destructive {
background: transparent;
color: #d0679d; /* error */
border-color: #d0679d;
}
.btn-destructive:hover {
background: #d0679d;
color: #1b1e28;
}
Loud Success CTA (for primary actions like "Proceed to Next Step")
.btn-loud-success {
background: transparent;
color: #5de4c7; /* success */
border-color: #5de4c7;
animation: pulse-success 2s ease-in-out infinite;
}
.btn-loud-success:hover {
background: rgba(93, 228, 199, 0.1); /* 10% success */
}
@keyframes pulse-success {
0%, 100% { box-shadow: 0 0 0 0 rgba(93, 228, 199, 0.4); }
50% { box-shadow: 0 0 0 4px rgba(93, 228, 199, 0); }
}
Semantic Button Patterns
For toggle buttons that indicate state (like action buttons in bottom tray):
Success State (enabled)
.btn-icon.active-success {
background: rgba(93, 228, 199, 0.15); /* 15% success */
color: #5de4c7;
border-color: rgba(93, 228, 199, 0.3); /* 30% success */
}
.btn-icon.active-success:hover {
background: rgba(93, 228, 199, 0.25); /* 25% success */
border-color: #5de4c7;
}
Warning State (enabled)
.btn-icon.active-warning {
background: rgba(255, 250, 194, 0.15); /* 15% warning */
color: #fffac2;
border-color: rgba(255, 250, 194, 0.3); /* 30% warning */
}
.btn-icon.active-warning:hover {
background: rgba(255, 250, 194, 0.25); /* 25% warning */
border-color: #fffac2;
}
Error State (enabled)
.btn-icon.active-error {
background: rgba(208, 103, 157, 0.15); /* 15% error */
color: #d0679d;
border-color: rgba(208, 103, 157, 0.
常见问题
它需要其他文件才能显示吗?
不需要。每个样机都是一个独立文件,所有样式和脚本都包含在内。
文件保存在哪里?
如果存在任务文件夹,就保存到那里;否则保存到你指定的位置。
样机就是正式产品代码吗?
不是。它制作的是供查看和审核的样机,而不是完成的应用界面。
详情
热度
- GitHub 星标
- 13k
- 排名
- #11386
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
asd-ste100
13k教你的智能体把难懂的英文改写成短句、每句只有一个意思,方便人和其他软件阅读。
better-github-skill
13k帮你的智能体查看拉取请求的状态、阅读其审查评论,并借助现成的 GitHub 脚本找出 CI 构建失败的原因。
calldiff
13k帮你的智能体比较代码库中两个 git 版本之间的函数调用链,让代码审查能看出行为发生了什么变化。
chrome-devtools-cli
13k帮你的智能体通过终端控制 Chrome,打开页面、点击、填写表单,并截取页面快照,用于浏览器自动化和测试。