用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tools-only/X-Skills --skill policyengine-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
基于 SOC 职业分类
正在显示 SKILL.md
| name | policyengine-design |
| description | PolicyEngine design system — tokens, typography, colors, charts, and branding for all project types |
Single source of truth for PolicyEngine's visual identity. All tokens live in @policyengine/design-system (npm). Every project — app-v2, standalone tools, charts, Streamlit — should reference these values rather than hardcoding hex codes.
Install:
npm install @policyengine/design-system
Three export formats:
| Format | Import | Use case |
|---|---|---|
| TypeScript | import { colors } from '@policyengine/design-system/tokens' | app-v2, any TS/JS project |
| JSON | import tokens from '@policyengine/design-system/tokens.json' | Python scripts, config files |
| CSS | import '@policyengine/design-system/tokens.css' | Standalone tools, plain HTML |
CDN (no install):
<link rel="stylesheet" href="https://unpkg.com/@policyengine/design-system/dist/tokens.css">
Source: PolicyEngine/policyengine-app-v2/packages/design-system/
| Token | Hex | Usage |
|---|---|---|
primary.500 | #319795 | Main brand color — buttons, links, active states |
primary.400 | #38B2AC | Lighter interactive elements |
primary.600 | #2C7A7B | Hover state |
primary.700 | #285E61 | Active/pressed state |
primary.50 | #E6FFFA | Tinted backgrounds |
primary.800 | #234E52 | Dark text on light teal |
CSS: var(--pe-color-primary-500) through var(--pe-color-primary-900)
| Token | Hex | Usage |
|---|---|---|
gray.50 | #F9FAFB | Subtle backgrounds |
gray.100 | #F2F4F7 | Card backgrounds |
gray.200 | #E2E8F0 | Borders, dividers |
gray.500 | #6B7280 | Secondary text |
gray.600 | #4B5563 | Chart secondary series |
gray.700 | #344054 | Dark UI text |
| Token | Hex | Usage |
|---|---|---|
blue.500 | #0EA5E9 | Informational highlights |
blue.700 | #026AA2 | Chart secondary series |
| Color | Hex | CSS variable | Usage |
|---|---|---|---|
| Success | #22C55E | --pe-color-success | Positive changes, gains |
| Error | #EF4444 | --pe-color-error | Negative changes, losses |
| Warning | #FEC601 | --pe-color-warning | Cautions, alerts |
| Info | #1890FF | --pe-color-info | Informational |
| Token | Hex | CSS variable |
|---|---|---|
text.primary | #000000 | --pe-color-text-primary |
text.secondary | #5A5A5A | --pe-color-text-secondary |
text.tertiary | #9CA3AF | --pe-color-text-tertiary |
| Token | Hex | CSS variable |
|---|---|---|
background.primary | #FFFFFF | --pe-color-bg-primary |
background.secondary | #F5F9FF | --pe-color-bg-secondary |
background.tertiary | #F1F5F9 | --pe-color-bg-tertiary |
These appear in older projects. Migrate to the values above.
| Old | Hex | Replacement |
|---|---|---|
TEAL_ACCENT | #39C6C0 | primary.500 (#319795) |
BLUE_PRIMARY | #2C6496 | blue.700 (#026AA2) |
DARK_GRAY | #616161 | text.secondary (#5A5A5A) |
Two font families only: Inter + JetBrains Mono. No serif fonts, no Roboto, no Public Sans.
| Context | Font | CSS variable |
|---|---|---|
| Everything (UI, charts, blog, tools) | Inter | --pe-font-family-primary |
| Code | JetBrains Mono | --pe-font-family-mono |
Legacy aliases (--pe-font-family-chart, --pe-font-family-body, --pe-font-family-prose, --pe-font-family-secondary) all resolve to Inter for backward compatibility.
Loading Inter:
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
| Token | Size | Usage |
|---|---|---|
xs | 12px | Small labels, captions |
sm | 14px | Body text, form labels |
base | 16px | Large body text |
lg | 18px | Subheadings |
xl | 20px | Section titles |
2xl | 24px | Page titles |
3xl | 28px | Large headings |
All UI text uses sentence case — capitalize only the first word and proper nouns.
| Token | Value | CSS variable |
|---|---|---|
xs | 4px | --pe-space-xs |
sm | 8px | --pe-space-sm |
md | 12px | --pe-space-md |
lg | 16px | --pe-space-lg |
xl | 20px | --pe-space-xl |
2xl | 24px | --pe-space-2xl |
3xl | 32px | --pe-space-3xl |
4xl | 48px | --pe-space-4xl |
| Token | Value | CSS variable |
|---|---|---|
sm | 4px | --pe-radius-sm |
md | 6px | --pe-radius-md |
lg | 8px | --pe-radius-lg |
import plotly.graph_objects as go
# Import from tokens.json or hardcode
TEAL = "#319795"
CHART_FONT = "Inter"
LOGO_URL = "https://raw.githubusercontent.com/PolicyEngine/policyengine-app-v2/main/app/public/assets/logos/policyengine/teal.png"
def format_fig(fig):
fig.update_layout(
font=dict(family=CHART_FONT, color="black", size=14),
plot_bgcolor="white",
paper_bgcolor="white",
template="plotly_white",
height=600,
width=800,
margin=dict(l=60, r=40, t=40, b=60),
modebar=dict(bgcolor="rgba(0,0,0,0)", color="rgba(0,0,0,0)"),
)
fig.add_layout_image(dict(
source=LOGO_URL,
xref="paper", yref="paper",
x=1.0, y=-0.10,
sizex=0.10, sizey=0.10,
xanchor="right", yanchor="bottom",
))
return fig
import { BarChart, Bar, XAxis, YAxis, Tooltip } from "recharts";
<BarChart data={data}>
<XAxis dataKey="name" style={{ fontFamily: "Inter" }} />
<YAxis style={{ fontFamily: "Inter" }} />
<Tooltip />
<Bar dataKey="value" fill="#319795" />
</BarChart>
| Meaning | Color | Hex |
|---|---|---|
| Positive / bonus / gains | Teal | #319795 |
| Negative / penalty / losses | Gray or red | #4B5563 or #EF4444 |
| Neutral / baseline | Light gray | #E2E8F0 |
| Multi-series | Series array | #319795, #0EA5E9, #285E61, #026AA2, #6B7280 |
Inverted metrics (taxes): When a positive delta means bad (higher taxes), use invertDelta logic to show "Penalty" label and swap colors.
All logo files in policyengine-app-v2/app/public/assets/logos/policyengine/:
| File | Background | Format |
|---|---|---|
teal.png / teal.svg | Light | Wide |
teal-square.png / teal-square.svg | Light | Square (for chart watermarks) |
white.png / white.svg | Dark | Wide |
white-square.svg | Dark | Square |
Raw URL for charts:
https://raw.githubusercontent.com/PolicyEngine/policyengine-app-v2/main/app/public/assets/logos/policyengine/teal.png
# .streamlit/config.toml
[theme]
base = "light"
primaryColor = "#319795"
backgroundColor = "#FFFFFF"
secondaryBackgroundColor = "#E6FFFA"
textColor = "#000000"
[client]
toolbarMode = "minimal"
| Project type | Token source | Font setup |
|---|---|---|
| app-v2 | import { colors } from '@/designTokens' | Built-in (Mantine + Inter) |
| Standalone tool | @import tokens.css or CDN link | Google Fonts: Inter |
| Python chart | Hardcode or load tokens.json | Inter for Plotly |
| Streamlit | .streamlit/config.toml | Default sans-serif |
| Blog HTML | Hardcode from token values | Google Fonts: Inter |
#319795 on white passes WCAG AA for large text (3.8:1)text.primary (#000000) on white passes AAA (21:1)text.secondary (#5A5A5A) on white passes AA (7.4:1)policyengine-interactive-tools-skill — Building standalone tools that use these tokenspolicyengine-vercel-deployment-skill — Deploying standalone toolspolicyengine-app-skill — app-v2 developmentpolicyengine-writing-skill — Content style (complements visual style)