style-guardian

Detect hardcoded UI styles and text in Flutter/Dart projects.

1|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/tarrragon/claude --skill style-guardian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: style-guardian
Source: https://github.com/tarrragon/claude/tree/main/skills/style-guardian
Command: npx skills add https://github.com/tarrragon/claude --skill style-guardian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Style Guardian prevents hardcoded UI styles and text in Flutter/Dart projects, ensuring a consistent design system and smoother localization.

Core Features & Use Cases

  • Enforces semantic UI tokens (UIColors, UISpacing, UIFontSizes, UIBorderRadius) across Flutter apps.
  • Detects hardcoded text (i18n violations) and recommends using the localization system.
  • Integrates with CI/hooks to automatically detect style violations during development and code reviews.

Quick Start

Run the built-in Python checker to scan a Flutter project for style violations. Example: uv run .claude/skills/style-guardian/scripts/style_checker.py scan lib/

Frequently Asked Questions about style-guardian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect hardcoded colors and spacing in a Flutter project?

To detect hardcoded colors and spacing in a Flutter project, run a Python-based static-analysis checker across your lib/ directory. This process scans Dart source code to report violations of semantic UI tokens like UIColors and UISpacing without modifying the files.

What is a static analysis checker for Flutter i18n violations?

A static analysis checker for Flutter i18n violations identifies hardcoded text strings within Dart code. It reports these instances so developers can replace them with localization system calls, ensuring smoother internationalization and consistent UI text across the application.

Can I integrate a Dart style checker with CI pipelines to enforce design tokens?

Yes, you can integrate a Dart style checker with CI pipelines to enforce design tokens. The checker runs via standard Python commands, allowing automated detection of typography, color, and i18n violations during continuous integration and code reviews.

Does the Flutter style checker automatically fix hardcoded UI styles?

No, the Flutter style checker does not automatically fix hardcoded UI styles. It operates purely as a reporting tool that identifies design-system consistency violations across colors, spacing, typography, and text, leaving source code modifications to the developer.

What do I need to run a Flutter design-system consistency checker?

To run a Flutter design-system consistency checker, you need a Python environment and an existing Flutter project. The checker scans the lib/ directory to catch deviations from semantic UI tokens like UIFontSizes and UIBorderRadius without requiring additional dependencies.