Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add jiushiwon/wg-skills --skill frontend-style-harmonizer-skillgit clone --depth 1 https://github.com/jiushiwon/wg-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jiushiwon/wg-skills/frontend-style-harmonizer-skill)<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/frontend-style-harmonizer-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/frontend-style-harmonizer-skill/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/frontend-style-harmonizer-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/frontend-style-harmonizer-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00068 | $0.02791 |
| Opus 5 | $0.00034 | $0.01396 |
| Sonnet 5 | $0.00014 | $0.00558 |
| Haiku 4.5 | $0.00007 | $0.00279 |
Grade A, and why
frontend-style-harmonizer-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Style Harmonizer
前端样式一致性治理工具。只读审计 + 可选自动重构,发现并修复三类问题:
- 复用:多个页面写了相同的样式声明块 → 抽取为公共 CSS
- 对齐:同类组件(按钮/tab/输入框/列表项)跨页面尺寸不一致 → 收敛到统一规格
- 硬编码:散落的裸值(
14rpx、#c45c48、red) → 收敛为 SCSS 变量 / CSS 变量
核心原则
- 只改视觉层:props / event / router / state / API 一律不动
- 只读优先:默认只出报告,
--apply才改文件 - dry-run 可见:所有修改提供 diff + 回滚
- uniapp 一等公民:rpx 归一化(修正 foundry 的 4pt 网格误判)
使用方式
触发词(任一即可)
统一各页面样式
样式对齐
抽取公共样式
去硬编码
按钮对齐
tab高度不一致
样式治理
样式审查
frontend-style-harmonizer
参数
| 参数 | 说明 | 默认 |
|---|---|---|
[path] |
项目路径 | cwd |
--scope |
审查维度 | all |
--report-only |
只出报告不修改 | true |
--apply |
执行修改(需先 --report-only 确认) | false |
执行流程(AI 必须按此顺序执行)
Step 1: 检测项目类型
→ 扫描根目录,判断 uniapp / vue / react / html
→ 检测依据:pages.json(uniapp) / package.json(vue/react) / index.html(html)
Step 2: 收集目标文件
→ 扫描 pages/, components/, src/ 下的 .vue/.scss/.css 文件
→ 忽略 node_modules, dist, .git
Step 3: 按维度扫描(取决于 --scope)
→ 复用: 按 references/detection-rules.md 的"样式指纹"规则扫描
→ 对齐: 按 references/align-checklist.md 的"同类组件"规则扫描
→ 硬编码: 按 references/hardcode-patterns.md 的正则扫描
Step 4: 汇总问题,生成报告
→ 按 references/report-template.md 模板生成 style-governance-report.md
→ 报告写入 <用户项目>/docs/style-governance-report.md
Step 5: (仅 --apply) 执行替换
→ 先 dry-run(输出 diff 不写文件)
→ 用户确认后执行
→ 执行后提示 git 回滚命令
AI 必须读取的参考资料:执行时必须加载以下文件获取具体规则
references/detection-rules.md— 扫描规则(rpx归一化、样式指纹)references/align-checklist.md— 对齐检查清单(按钮/tab/输入框规格)references/hardcode-patterns.md— 硬编码模式(裸值→变量映射)references/token-conventions.md— 变量命名约定references/report-template.md— 报告模板
三个审查维度
维度 A:复用(公共样式块抽取)
检测"多个文件出现相同或高度相似的样式声明块"。
发现项:
- 选择器声明块指纹相同 / 相似度 ≥ 阈值
- 内联 style 重复
- 多个 scoped style 里重复定义同名同值的规则
治理动作:
- 抽成公共 class(
common.scss/styles/components.css) - 或提示抽成公共组件
- 保留差异部分在各自页面
维度 B:对齐(同类组件尺寸 / 样式一致性)
检测"同类组件在不同页面的关键视觉属性不一致**"。
发现项:
- 按钮 / tab item / 标签 / 输入框 / 列表项 / 卡片 的
height、font-size、padding、border-radius、color、background跨文件差异 - 固定高度容器(头部 tab、导航栏)跨页面高度不一致导致切换跳变
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 271 lines · 68 tokens per session scan A 6b99f868af20
frontend-style-harmonizer-skill is a skill published in the GitHub repository jiushiwon/wg-skills (99 stars, last pushed yesterday), licensed Apache-2.0. It adds 68 tokens to every session and 2,791 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
chakra-ui-builder
Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…
visual-ralph
Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ralph with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.
frontend-ui-dark-ts
Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.
reveal-hover-effect
Build cursor-following spotlight reveals that expose a second aligned image through a soft radial mask. Use for hover-to-color, before-and-after, x-ray, material, texture, product-detail, and illustrated hero effects where a desaturated or embossed base image should remain visible while another treatment follows an…
frontend-visual-qa
Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…
prototype-web
A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.