liuguang-banlan-ui – skill Thiết kế & UI cho agent AI
Xây dựng hai chế độ giao diện có tham số, 流光溢彩白 (trắng ánh cầu vồng) và 五彩斑斓黑 (đen sặc sỡ), với OKLCH, dự phòng WebGL/CSS, kiểm soát thị giác, QA bằng ảnh chụp màn hình và báo cáo cường độ tổng/theo từng màu. Dùng khi yêu cầu UI nêu một trong hai chế độ này hoặc cần thông số màu đo được.
Cài skill liuguang-banlan-ui bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/liuguang-banlan-ui-ae837.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /liuguang-banlan-ui – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/liuguang-banlan-ui-ae837.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $liuguang-banlan-ui – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/liuguang-banlan-ui-ae837.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /liuguang-banlan-ui – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/liuguang-banlan-ui-ae837.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /liuguang-banlan-ui – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
流光斑斓 UI 工坊
Overview
Use one skill with two explicit modes, not a generic material library. Preserve a stable information workspace while treating the spectral field as a controlled environmental layer. Keep the implementation parameterized so every output can report total color intensity, per-color intensity, OKLCH values, peak opacity, spatial scale, phase, and measured coverage.
Read [style-contract.md](references/style-contract.md) before choosing a mode or changing palette semantics. Read [verification.md](references/verification.md) before claiming visual or screenshot validation.
When to Use
- Use when a user names 流光溢彩白 or 五彩斑斓黑, asks for one unified skill covering both, or needs a reusable parameterized starter.
- Use when the final report must include total color intensity, each color's intensity, OKLCH values, and screenshot measurements.
- Do not use for a generic theme-token library or an unparameterized visual mockup.
Workflow
1. Classify the request
- Map “流光溢彩白” to
opaland “五彩斑斓黑” toobsidian. - If both are requested, keep one shared implementation and two explicit theme manifests.
- Inspect the existing project, framework, route, build system, and uncommitted work before copying starter assets.
- Use the smallest appropriate change surface; do not replace an existing design system without authorization.
2. Gate visual verification
- Confirm that the executing model can directly inspect images before taking a screenshot-based visual claim.
- If native image inspection is unavailable, continue with code and deterministic pixel checks but mark the result
visual-unverified; never infer visual quality from DOM or CSS alone. - Record
modelVision,screenshotCapture,deterministicPixelMetrics, andvisualVerificationModein the final report.
3. Establish the scene and structure
- Choose a neutral, information-dense workbench domain such as field research, inventory, monitoring, or operations.
- Use a continuous three-pane or similarly coherent workspace: navigation, queue/list, detail, metadata, and one signature observation band.
- Keep color in the field, map markers, and state accents. Keep the logo, avatar, rules, text, controls, boundaries, and semantic hierarchy neutral; do not paint them with palette gradients.
- Prefer restrained surfaces and weak fills. Avoid turning every region into a floating card.
4. Implement the parameter contract
Maintain a serializable manifest with these top-level fields:
{
schemaVersion, mode, label, preset, seed,
overallColorIntensity,
base: { oklch },
colors: [{
id, label, oklch, srgbFallback,
intensity, peakOpacity,
fieldScale, phase,
measuredCoverage, effectiveShare
}],
field: { scale, octaves, warpStrength, motionSpeed, staticTime, ditherStrength, luminanceCap },
output: { colorSpace, reducedMotion }
}- Keep every intensity in
[0, 1]; makeoverallColorIntensitythe global budget andcolors[].intensitythe per-color budget. The renderer multipliesintensitybypeakOpacity, so treatpeakOpacityas the calibrated strength at full intensity. - Order
colorsby hue. The renderer draws one stop per configured hue around a loop and mixes each color with its array neighbors; near-complementary neighbors mix toward gray. luminanceCapapplies only inobsidian.ditherStrengthis the dither amplitude in output codes;1enables full-amplitude dither; verify actual bias on the target renderer.- Use OKLCH as the authoring space and provide an sRGB fallback for non-OKLCH contexts.
- Keep the seed, static frame, phases, and field scales deterministic; do not use random per render.
- Expose sliders for the global intensity and every configured color. Make reset, JSON export, and copy actions available.
5. Build the spectral field
- Use a procedural fBm/domain-warp field or an equivalent continuous field; keep it behind the interface with
pointer-events: none. - Use broad flowing hue regions or ribbons, not obvious radial blobs, spotlight circles, or hard rainbow bands.
- Upload the complete palette and per-color field scales to the renderer. Apply the dark-mode luminance cap after palette mixing.
- Encode output with the sRGB transfer function, dither in output codes, and quantize in the shader. A power-curve encode or a weak linear-light dither biases the output, most visibly in low-intensity fields and near black.
- Provide a CSS fallback with comparable visual intent when WebGL is unavailable; the starter uses multiple soft linear-gradient layers and requires separate calibration; do not use fixed radial spots.
- Pause or freeze motion when the document is hidden or
prefers-reduced-motionis active, and keep field time continuous so pausing and resuming do not jump. - Repaint after every resize. Resizing clears the canvas, and a paused field has no next frame to redraw it.
- Keep the renderer local and dependency-light; do not require remote fonts, images, or APIs for the starter.
6. Preserve interaction and accessibility
- Keep semantic headings, labels, focus-visible states, keyboard escape behavior, and readable contrast.
- Test navigation, record/list selection, tab selection, parameter panel open/close, slider input, reset, export, and copy fallback.
- Make the workbench responsive at a narrow mobile viewport; collapse navigation and metadata without losing the primary record flow.
7. Validate and report
- Scaffold a clean starter with
scripts/scaffold_template.pywhen a neutral implementation is needed. - Keep theme configs as data-only assignments. The bundled parser rejects expressions, function calls, duplicate keys, trailing statements, and oversized manifests without executing JavaScript.
- Run
scripts/validate_manifest.pyon each theme config before rendering, and resolve its warnings. - Serve previews with
scripts/serve_preview.py, which disables caching, then capture desktop and mobile screenshots with a real browser. Inspect them directly if visual capability is available. - Run
scripts/measure_preview.pyon the pure field screenshot and retain measured chromatic ratio, tint, lightness shift, gray ratio, per-color coverage, and effective share. - Report configured parameters separately from measured values; do not imply that pixel attribution is an exact shader contribution.
- Use
partial,visual-unverified, orblockedwhen a required capability or native check is unavailable.
Limitations and capability states
- WebGL is optional. The starter switches to a CSS spectral fallback when a WebGL context cannot be created or shader/program setup fails; fallback rendering is parameterized but is not pixel-identical to the shader.
- Native image inspection and browser screenshot capture are runtime capabilities, not guaranteed by this skill. If either is unavailable, keep the result visual-unverified and report the missing capability explicitly.
- The deterministic measurement helper requires the optional Python packages listed in scripts/requirements.txt. Without them it exits with an unavailable-capability message instead of producing a misleading report.
- Manifests may contain 3 to 12 colors. The renderer uploads every configured entry up to that validated limit, while the shader ignores only unused capacity slots.
- Configured values, fallback values, and measured pixel attribution describe different things; do not treat measured per-color coverage as an exact decomposition of shader energy.
Anti-pattern guardrails
- Do not rename the two modes into a vague “reusable UI material” abstraction.
- Do not use pure white as the only white-mode signal, black crush as the only dark-mode signal, or RGB neon as a shortcut to “colorful”.
- Do not hide weak structure behind full-page glass, excessive blur, or giant gradients.
- Do not report visual success from screenshot dimensions, DOM state, or static CSS alone.
- Do not include private project names, links, repository identifiers, or source-chat contents in generated assets or reports.
Bundled resources
Use the bundled starter under assets/starter/ as a neutral base. Copy only the selected mode when integrating into an existing project, and preserve the existing project’s content and build conventions.
scripts/
scaffold_template.py: copy the neutral starter foropal,obsidian, or both.manifest_parser.py: statically parse the restricted data-only theme manifest without executing JavaScript.validate_manifest.py: validate required fields and ranges, and warn about hue order.measure_preview.py: measure a rendered pure-field PNG as OKLab deviation from the configured base, including lightness shift and gray ratio. Install optional dependencies fromscripts/requirements.txtwhen needed.serve_preview.py: serve a directory locally with caching disabled.
Run python -m unittest discover -s tests after changing a script.
references/
-
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- llm-application-dev-ai-assistant – Thiết kế và triển khai trợ lý AI hội thoại với quản lý ngữ cảnh, ranh giới tích hợp và…
- logo-image-design – Sổ đăng ký tài sản thương hiệu: loại tài sản, định dạng, kích thước và tỷ lệ khung hình…
- logo-to-stickers – Biến logo thương hiệu hoặc IP hiện có thành bộ sticker giấy nhất quán, vui nhộn, có câu…
- lookdev-auto – Tinh chỉnh hình ảnh tự động: mô hình thị giác hoặc video chấm điểm các biến thể đã…
- loop-library – Tìm, so sánh, điều chỉnh và thiết kế các vòng phản hồi AI-agent có giới hạn, với kiểm…
- magic-animator – Công cụ tạo chuyển động bằng AI cho logo, UI, icon và tài nguyên mạng xã hội.
- magic-ui-generator – Sử dụng Magic của 21st.dev để tạo, so sánh và tích hợp nhiều biến thể component UI sẵn…
- mailtrap-managing-contacts – Quản lý contact, danh sách, phân khúc, trường tùy chỉnh, nhập dữ liệu, đồng bộ CRM và…