XNews

Agent Skills with deterministic design validation rules

Agent Skills with deterministic design validation rules

A new Agent Skill called 'svg-diagram' provides deterministic rules for generating SVG diagrams via Claude Code and other agents. It addresses common issues like line connections and font problems. The skill defines rules: box height based on font size, curved connection lines, arrow offset of 11 pixels from target box. It includes a zero-dependency checker that reads the final SVG file and performs 12 checks covering escaping, whitespace, fonts, overlap, and color. Errors are reported with specific values, e.g., 'margin 11, should be 20 to 25'. The skill can be installed into Claude Code, Codex, Cursor, Gemini CLI, and dozens of other agents with a single command. It supports Chinese and English with character width tables; Chinese labels calculate width per character to check overflow. The font stack includes Noto Sans CJK SC, five semantic color sets, and a white background for visibility on dark themes. It covers five diagram types: architecture, flowchart, sequence, data flow, and state machine. The repository includes 10 sample images. Another post mentions 'Impeccable' frontend design skill with 66K stars, using 61 deterministic validation rules and hard workflows to eliminate visual errors.

Key insights

svg-diagram Skill: Deterministic SVG Generation

The svg-diagram Agent Skill enforces strict rules for SVG diagram generation: box height calculated from font size, curved connection lines, arrow offset of 11 pixels. A zero-dependency checker performs 12 checks on the final SVG, reporting exact violations. It supports Chinese and English with character width tables, includes Noto Sans CJK SC font, five semantic color sets, and a white background. Covers architecture, flowchart, sequence, data flow, and state machine diagrams. Available for Claude Code, Codex, Cursor, Gemini CLI, and more.

Impeccable Frontend Design Skill with 61 Rules

Another Agent Skill, 'Impeccable', with 66K stars on GitHub, uses 61 deterministic validation rules and hard workflows to eliminate visual errors in frontend design. It builds on Anthropic's frontend-design skill and aims to fix 'one-shot' design issues.

Source posts