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.
git clone --depth 1 https://github.com/jiushiwon/wg-skillsnpx agentmods add commands/jiushiwon/wg-skills/tokensWrote 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/commands/jiushiwon/wg-skills/tokens)<a href="https://agentmods.dev/commands/jiushiwon/wg-skills/tokens"><img src="https://agentmods.dev/badge/commands/jiushiwon/wg-skills/tokens/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/commands/jiushiwon/wg-skills/tokens"><img src="https://agentmods.dev/badge/commands/jiushiwon/wg-skills/tokens.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00000 | $0.01334 |
| Opus 5 | $0.00000 | $0.00667 |
| Sonnet 5 | $0.00000 | $0.00267 |
| Haiku 4.5 | $0.00000 | $0.00133 |
Grade A, and why
tokens 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 13d 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 — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tokens — Token 提取 / 注入 / 导出
设计 Token 是 foundry 的核心资产。tokens 子命令管理 Token 的全生命周期。
用法
tokens <action> [args]
| Action | 说明 |
|---|---|
extract <path> |
从项目代码提取 Token(频次统计) |
inject <target> |
注入 Token 文件到项目 |
export <format> |
导出为不同格式(CSS / Tailwind / SCSS / JS / JSON) |
validate <path> |
验证 Token 文件的完整性 |
list |
列出当前可用调色板 + 字体配对 |
extract — 提取
tokens extract [path]
调用 scripts/extract-tokens.mjs,输出"事实 Token"(用户当前使用的频次统计)。
tokens extract /path/to/project > project-tokens.json
输出示例:
{
"filesScanned": 87,
"summary": { "uniqueColors": 47, "uniqueSpacings": 28, ... },
"colors": [
["#c45c48", 23],
["#1a1a1a", 18],
...
],
"warnings": ["检测到 47 种独立颜色值", "约 35% 间距值不在 4pt 网格上"]
}
inject — 注入
tokens inject [path] [--palette vermilion-amber] [--strategy replace|append]
把 foundry 模板的 Token 注入到目标项目。
步骤:
- 检测项目(
detect-stack.mjs) - 选择 Token 模板(
templates/tokens.css.tpl或tokens.tailwind.tpl) - 选择调色板(默认
vermilion-amber) - 复制到目标位置:
- HTML+Tailwind:
assets/css/tokens.css+ 替换tailwind.config - React/Next:
src/styles/tokens.css+tailwind.config.ts - Vue/Nuxt:
assets/css/tokens.css+ 引入nuxt.config.ts - uniapp:
static/css/tokens.css+App.vue引入
- HTML+Tailwind:
选项:
--strategy replace:完全替换现有 Token--strategy append:追加新 Token(保留旧的)
export — 导出
tokens export <format> [--output <file>]
| 格式 | 输出 |
|---|---|
css |
CSS 变量文件 |
tailwind |
tailwind.config.js / .ts |
scss |
SCSS 变量 |
js |
JS 主题对象(用于 styled-components / Emotion) |
json |
JSON(用于 Style Dictionary) |
swift |
iOS Swift Constants |
kotlin |
Android Kotlin Constants |
示例:
# 导出为 Tailwind 配置
tokens export tailwind --output tailwind.config.ts
# 导出为 iOS Swift
tokens export swift --output Theme.swift
# 导出为 Style Dictionary
tokens export json --output tokens.json
validate — 验证
tokens validate <path>
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.
- 13d ago First seen · 175 lines · 0 tokens per session scan A 9e947af8cd83
tokens is a command published in the GitHub repository jiushiwon/wg-skills (100 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,334 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.
Other commands, from other repositories
ux-recommend
The v2 flagship. Runs the 5-parallel-search Python engine across 11 data manifests (75+ styles, 170+ palettes, 65+ type pairs, 120+ components, 170+ industries, 110+ UX laws, 50+ motion presets, 120+ anti-patterns, 92 brand specs) and returns a complete recommended design system for your project — with always-on…
color-specialist
Use when colour is failing. Contrast below AA, a palette with no system behind it, dark mode that is only inverted light mode, or semantic colours that carry no meaning.
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
revisar-ui
Auditoria visual retroativa de 6 pilares do código frontend implementado.
colorize
Introduce or rework color strategy.
extract
Pull repeated patterns into reusable components and design tokens.