unify

unify is a command for Claude Code from jiushiwon/wg-skills. It costs 0 tokens per session (1,154 once invoked), scanned A, original, Apache-2.0.

A command for bringing the design of multiple pages, modules, or technology versions closer to one shared design system. A design system is a common set of colours, fonts, spacing, shapes, shadows, and component rules.

In plain words
What is it for?
Use it to compare design variations, choose common values, replace inconsistent styles, and check the result with a build and screenshot comparison.
Why use it?
It removes small visual differences that accumulate when pages or teams use their own versions of the same styles. It also checks that the project still builds and that unused code is removed.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/detect-stack.mjs /path/to/project.

Good fit Use it to compare design variations, choose common values, replace inconsistent styles, and check the result with a build and screenshot comparison.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jiushiwon/wg-skills
agentmods
npx agentmods add commands/jiushiwon/wg-skills/unify

Made for: Claude Code.

Wrote 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.

agentmods badge for unify

README.md
[![agentmods](https://agentmods.dev/badge/commands/jiushiwon/wg-skills/unify/github.svg)](https://agentmods.dev/commands/jiushiwon/wg-skills/unify)
Your own site
<a href="https://agentmods.dev/commands/jiushiwon/wg-skills/unify"><img src="https://agentmods.dev/badge/commands/jiushiwon/wg-skills/unify/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.

agentmods 80×15 button for unify

Your own site · 80×15
<a href="https://agentmods.dev/commands/jiushiwon/wg-skills/unify"><img src="https://agentmods.dev/badge/commands/jiushiwon/wg-skills/unify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,154 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01154
Opus 5 $0.00000 $0.00577
Sonnet 5 $0.00000 $0.00231
Haiku 4.5 $0.00000 $0.00115

Measured 10d ago against content hash bdbcdab97c0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

unify 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 10d 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.

vibeCoding/frontend/frontend-ui-foundry/references/commands/unify.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

unify — 设计统一化

对多页面 / 多模块 / 多端的设计变体进行收敛,统一到同一套设计系统。

用法

unify [path] [--scope pages|components|stacks] [--baseline <brand>]

适用场景

  • 同一产品有多个营销页(landing1、landing2、landing3...)风格不统一
  • 多端产品(Web、App、小程序)视觉分裂
  • 多个团队维护同一产品,各自有"方言"
  • 收购/合并后需要统一品牌

流程

1. 收集变体

扫描所有目标文件,提取 Token 用法:

  • 颜色(每种用法的文件 + 出现位置)
  • 字体
  • 间距
  • 圆角
  • 阴影
  • 组件用法(不同页面用不同实现)

2. 收敛

按"使用频次 × Token 接近度"分组:

group-1: #c45c48 + #c85948 + #bd5640 → 收敛为 --color-primary
group-2: padding: 13px + 17px + 15px → 收敛为 --space-4 (16px)
group-3: border-radius: 6px + 5px + 7px → 收敛为 --radius-md (8px)

3. 替换

按使用频次从高到低替换,确保不影响构建。

4. 验证

  • 构建通过
  • 视觉对比(截图 diff)
  • 死代码检测

详细步骤

Step 1:检测项目

node scripts/detect-stack.mjs /path/to/project

Step 2:提取全部 Token

node scripts/extract-tokens.mjs /path/to/project > tokens.json

Step 3:分析变体

输出每个 Token 维度的"使用散度":

{
  "primaryColor": {
    "values": {
      "#c45c48": { "count": 23, "files": ["page1.vue", "page2.vue"] },
      "#c85948": { "count": 5, "files": ["page3.vue"] },
      "#bd5640": { "count": 2, "files": ["page4.vue"] }
    },
    "recommendation": "收敛为 #c45c48(频次最高 76%)"
  }
}

Step 4:生成替换计划

{
  "replacements": [
    {
      "type": "color",
      "from": "#c85948",
      "to": "var(--color-primary)",
      "occurrences": 5,
      "files": ["page3.vue:23", "page3.vue:45"]
    }
  ]
}

Step 5:执行替换(带 dry-run)

unify --dry-run   # 输出 diff,不写文件
unify             # 实际替换

输出:unify-report.md

# Unify Report — <project>

> 时间:2024-XX-XX
> 范围:所有页面

---

## 变体统计

| 维度 | 变体数 | 主要变体(频次) | 目标值 |
|------|--------|------------------|--------|
| 主色 | 3 | #c45c48 (76%), #c85948 (16%), #bd5640 (8%) | --color-primary |
| 副色 | 4 | ... | --color-secondary |
| 间距 | 8 | 16px (45%), 13px (15%), 17px (10%) | --space-4 |
| 圆角 | 6 | 8px (60%), 6px (20%), 12px (10%) | --radius-md |
| 字号 | 5 | ... | --font-size-base |

## 替换清单

(详细列出每处替换)

## 影响范围

- 涉及文件:42
- 涉及行数:187
- 风险等级:低(颜色 / 间距类无业务逻辑)

## 回滚

```bash
git checkout HEAD -- .

验证

(构建 + 视觉对比 + 死代码扫描结果)

Read the full file on GitHub · 160 lines

Changes

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.

  1. 10d ago First seen · 160 lines · 0 tokens per session scan A bdbcdab97c0e

Subscribe to this mod's changes

unify is a command published in the GitHub repository jiushiwon/wg-skills (97 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,154 tokens. 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.