iging/agent-spec/ui-snapshot-tokens

Claude Code and agent skill by iging/agent-spec

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Extract core visual tokens (colors, padding, radii) from a built component and record them in context/design-tokens.md so future components perfectly match the project's visual identity. Run this immediately after building any frontend component. Do NOT execute on backend code.

Install

npx vskill@latest install iging/agent-spec/ui-snapshot-tokens

SKILL.md

The same SKILL.md was published earlier as iging/agent-spec/ui-snapshot-tokens.

UI Snapshot

0. Identity

  • Role: Design System Enforcer. Reads a newly built UI component, extracts visual properties, and updates the design registry to maintain global consistency.
  • Authority: Controls the extraction of visual tokens. Cannot alter the component code.
  • Must not define: The underlying design philosophy, only enforces it.
  • Normative base: context/design-tokens.md.

1. Intent (9 Dimensions)

#DimensionValue
1TaskExtract visual tokens from a UI component and update the design registry.
2Target ToolAny agent runtime.
3Output FormatAppended entries in context/design-tokens.md.
4ConstraintsExtract only visual tokens (colors, radii, spacing). Ignore structural tokens (flex, grid, position).
5InputFilepath to the newly built component.
6ContextEnforces UI consistency across isolated agent sessions.
7AudienceThe executing agent for future UI tasks.
8Success Criteriacontext/design-tokens.md is updated and developer is informed of the extracted tokens.
9ExamplesSee §10.

2. Trigger Matrix

TriggerFire?Notes
"Run ui-snapshot on this component"YESCore trigger.
"Record these UI styles"YESCore trigger.
"Refactor this backend route"NONot a UI component.

3. Execution Workflow

Step 1: Target Identification
  • Action: Read the component file provided by the developer. If no file is provided, ask the developer which file to snapshot.
  • Input: Filepath.
  • Stop Condition: If filepath is invalid or points to backend logic, halt and report.
  • Validation: Component source code is loaded.
Step 2: Token Extraction
  • Action: Extract specific visual classes or properties: backgrounds, text colors, border radii, border colors, and padding/gap spacing. Discard structural layout properties (flex, grid, relative positioning).
  • Input: Component source code.
  • Stop Condition: None.
  • Validation: Visual tokens isolate correctly.
Step 3: Registry Update
  • Action: Open context/design-tokens.md. Append the extracted tokens under a clear heading for the component type (e.g., "Card", "Button").
  • Input: Extracted tokens.
  • Stop Condition: None.
  • Validation: File is written successfully.
Step 4: Developer Handoff
  • Action: Output a summary of the extracted tokens to the developer.
  • Input: Updated registry state.
  • Stop Condition: Await next task.
  • Validation: Summary matches written registry.

4. Output Specification

markdown
# Snapshot Complete
Recorded the following tokens for **[Component Name]** into `context/design-tokens.md`:
-Background: [token]
-Border Radius: [token]
-Padding: [token]
Future components of this type will adhere to these properties.

5. Validation Gate

  • [ ] Target file was confirmed as UI code.
  • [ ] Only visual tokens (not structural) were extracted.
  • [ ] context/design-tokens.md was appended to, not overwritten entirely.

6. Anti-Triggers and Calibration

  • Under-execution threshold: Failing to record extracted tokens to the registry file.
  • Over-execution threshold: Extracting layout properties (e.g., flex-col, absolute) as global design tokens.

7. Anti-Pattern Compliance

StepPrevents APMechanism
1AP-29 (no file path)Demands exact component filepath.
2AP-21 (vague adjectives)Replaces vague instructions with hardcoded visual tokens.
3AP-10 (assumed knowledge)Persists UI knowledge into a fixed file for future sessions.

8. Versioning & Changelog

  • Version: 1.0.0
  • Changelog:
  • 1.0.0 — Initial enterprise tier implementation.

9. Portability Matrix

RuntimeStatus
Clineverified

10. Examples

Input: "Snapshot Button.tsx" Output: Extracts bg-blue-500, rounded-md, px-4 py-2 and appends to DESIGN.md.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/iging/agent-spec/ui-snapshot-tokens/badge)](https://verified-skill.com/skills/iging/agent-spec/ui-snapshot-tokens)

Something wrong with this skill or its page? Tell us.