panel-grid-layout
它能做什么
这个技能提供深色主题仪表盘布局的 CSS。面板排列在网格中,会根据屏幕大小自动调整。适合想要简洁、偏技术风格的数据仪表盘制作者。
适用场景
- ✓当你想让网页仪表盘呈现深色、数据化的风格时。
- ✓当你需要一组能在较小屏幕上自动换行的面板网格时。
- ✓当你希望把颜色和字体保存在一组变量中,方便一次性修改时。
技能链接
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/panel-grid-layout/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为仪表盘设置深色主题,并做一个同时适配手机和电脑的卡片网格。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能把颜色和字体保存为 CSS 变量,并使用自动填充网格,因此窗口大小改变时面板会重新排列。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Panel Grid Layout & Dark Theme
CSS Variables (Dark Theme)
Create src/styles/main.css with these CSS custom properties:
:root {
/* Backgrounds */
--bg: #0a0a0a;
--bg-secondary: #111;
--surface: #141414;
--surface-hover: #1e1e1e;
/* Borders */
--border: #2a2a2a;
--border-strong: #444;
--border-subtle: #1a1a1a;
/* Text */
--text: #e8e8e8;
--text-secondary: #ccc;
--text-dim: #888;
--text-muted: #666;
--text-faint: #555;
--accent: #fff;
/* Overlays */
--overlay-subtle: rgba(255, 255, 255, 0.03);
--overlay-light: rgba(255, 255, 255, 0.05);
/* Status & Semantic Colors */
--green: #44ff88;
--red: #ff4444;
--yellow: #ffaa00;
--semantic-critical: #ff4444;
--semantic-high: #ff8800;
--semantic-positive: #44ff88;
--semantic-info: #3b82f6;
/* Status indicators */
--status-live: #44ff88;
--status-cached: #ffaa00;
--status-unavailable: #ff4444;
/* Font */
--font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Fira Code', monospace;
--font-body: var(--font-mono);
}
Base Styles
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
height: 100%;
background: var(--bg);
color: var(--text);
font-family: var(--font-body);
font-size: 13px;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
Grid Layout
.panels-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
grid-auto-flow: row dense;
grid-auto-rows: minmax(200px, 380px);
gap: 4px;
padding: 4px;
align-content: start;
align-items: stretch;
min-height: 0;
}
Panel Base Styles
.panel {
background: var(--surface);
border: 1px solid var(--border);
display: flex;
flex-direction: column;
overflow: hidden;
height: 100%;
min-height: 200px;
min-width: 0;
transition: transform 0.15s, box-shadow 0.15s;
position: relative;
}
.panel.hidden { display: none; }
.panel-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 10px;
background: var(--overlay-subtle);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.panel-header-left {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.panel-title {
font-size: 11px;
font-weight: 700;
color: var(--accent);
text-transform: uppercase;
letter-spacing: 0.5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.panel-count {
font-size: 10px;
background: var(--overlay-light);
color: var(--text-dim);
padding: 1px 6px;
border-radius: 8px;
font-variant-numeric: tabular-nums;
}
.panel-content {
flex: 1;
overflow-y: auto;
padding: 8px;
font-size: 12px;
}
.panel-content::-webkit-scrollbar { width: 4px; }
.panel-content::-webkit-scrollbar-track { background: transparent; }
.panel-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
Loading & Error States
.panel-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 32px 16px;
min-height: 120px;
}
.panel-loading-spinner {
width: 32px;
height: 32px;
border: 2px solid var(--border);
border-top-color: var(--green);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 12px;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.panel-loading-text {
font-size: 12px;
color: var(--accent);
letter-spacing: 0.5px;
}
.panel-error-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 1.5rem 1rem;
min-height: 120px;
}
.panel-error-msg {
color: var(--text-dim);
font-size: 11px;
}
.panel-retry-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--text-dim);
padding: 4px 12px;
font-size: 10px;
cursor: pointer;
border-radius: 3px;
}
.panel-retry-btn:hover {
border-color: var(--accent);
color: var(--accent);
}
Row/Item Patterns (reusable across panels)
/* Generic list row */
.item-row {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-bottom: 1px solid var(--border-subtle);
transition: background 0
常见问题
我可以修改颜色吗?
可以。所有主要颜色都定义在样式表顶部的变量中,你可以在一处修改。
它需要 CSS 框架吗?
不需要。样式是纯 CSS,不依赖外部库。
面板能在手机上正常显示吗?
网格会根据较窄的屏幕自动调整,因此面板会上下排列,而不会超出屏幕边缘。
详情
作者的原始描述
CSS grid layout system for a responsive panel dashboard with dark theme. Uses CSS custom properties, auto-fill grid, and monospace font aesthetic inspired by worldmonitor.
repo: HKUDS/AgentPilot
热度
- GitHub 星标
- 7.8k
- 排名
- #13072
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
agentpilot
7.8k帮你的智能体准备任务并运行 AgentPilot 循环,逐步改进项目:循环会提出修改、测试修改并为其打分。
openspace
7.8k帮你的智能体设置 OpenSpace,这是一个用于存储和获取智能体技能的工具,并通过 MCP 将其连接到你的 AI 应用。
rsi-arena
7.8k帮你的智能体设置并运行标准 AI 基准测试,例如 AIME 和 Terminal-Bench,用来比较不同的改进方法。
experiment-guide
7.8k帮你的智能体规划小型实验、阅读实验结果并记录发现,同时研究如何改进一个程序。