xiaohongshu
xiaohongshu
css-design-token-enforcer
Systematically find and replace ALL hardcoded hex values with proper CSS design tokens to ensure complete color consistency across the Pomo-Flow application. This skill addresses the critical issue of yellow vs orange medium priority colors by enforcing a unified design token system based on indu...
Full skill instructions
This skill provides a comprehensive workflow for eliminating hardcoded hex values and enforcing consistent CSS design token usage across the entire Pomo-Flow codebase. It addresses the critical color inconsistency issues where medium priority tasks display different colors (yellow vs orange) across different views.
Use this skill when you encounter:
Run comprehensive scanning to identify all hardcoded color values and their usage patterns.
Execute automated replacement with intelligent mapping based on context, opacity levels, and component types.
Verify that replacements were successful and that visual consistency is achieved across all views.
Execute the hex value finder to create a comprehensive inventory of all hardcoded colors:
python scripts/find_hardcoded_hex.py --verbose
Expected Output:
Examine the generated hex_value_report.json to understand:
Preview what changes will be made without modifying files:
python scripts/replace_with_tokens.py --dry-run --verbose
Review the dry run results to confirm:
Run the replacement script to systematically update all files:
python scripts/replace_with_tokens.py
The script will:
Run comprehensive validation to ensure success:
python scripts/validate_consistency.py
Validation checks:
Test the application manually to confirm:
find_hardcoded_hex.py: Comprehensive scanner for hardcoded hex values with intelligent categorizationreplace_with_tokens.py: Automated replacement engine with context-aware mapping and backup creationvalidate_consistency.py: Post-replacement validation and consistency checkingdesign_token_best_practices.md: Industry best practices from Atlassian, Salesforce, and enterprise design systemscolor_token_mapping.md: Complete mapping between hex values and appropriate CSS tokensreplacement_patterns.md: Common patterns and edge cases for color replacementreplacement_rules.json: Configuration file defining all replacement rules and prioritiestoken_definitions.json: Complete design token definitions with usage guidelinesThe skill uses intelligent mapping based on context:
Direct Color Replacements:
#f59e0b → var(--color-priority-medium) (main color)#feca57 → var(--color-priority-medium) (yellow variant elimination)#ef4444 → var(--color-priority-high) (high priority)#3b82f6 → var(--color-priority-low) (low priority)Alpha-Aware Replacements:
rgba(245, 158, 11, 0.3) → var(--color-priority-medium-bg) (30% opacity)rgba(245, 158, 11, 0.1) → var(--color-warning-alpha-10) (10% opacity)rgba(245, 158, 11, 0.2) → var(--color-priority-medium-border-medium) (border context)Gradient Elimination:
linear-gradient(180deg, var(--color-priority-medium) 0%, #feca57 100%) → var(--color-priority-medium)The replacement engine considers:
Root Cause: Mixed use of #f59e0b (orange) and #feca57 (yellow) for medium priority
Solution: Replace all instances with consistent var(--color-priority-medium)
Root Cause: Gradients ending in different colors than they start Solution: Replace gradients with solid color tokens
Root Cause: Manual rgba() definitions with inconsistent opacity levels Solution: Use predefined alpha variant tokens
TaskCard.vue: Multiple hardcoded rgba values CalendarView.vue: Problematic gradient definitions BaseModal.vue: Hardcoded shadow effects Mobile components: Wrong color variables
The skill automatically creates timestamped backups before making changes:
.claude/css-token-backups/20231108_143022/
Restoration process:
This skill incorporates best practices from:
Complete Color Consistency: All medium priority indicators display identical orange color (#f59e0b) across every view and component.
Issue: Some colors still appear different after replacement Solution: Check browser cache and ensure CSS variables are properly loaded
Issue: Replacement script skips some matches Solution: Verify CSS context matches replacement rules in the configuration
Issue: Mobile app colors don't match web app Solution: Check for additional hardcoded values in mobile-specific components
Issue: Validation reports false positives Solution: Review replacement rules and adjust context patterns if needed
This skill provides a systematic, industry-standard approach to achieving perfect color consistency through automated design token enforcement.
CRITICAL: Before claiming ANY issue, bug, or problem is "fixed", "resolved", "working", or "complete", the following verification protocol is MANDATORY:
REQUIRED: Use the AskUserQuestion tool to explicitly ask the user to verify the fix:
"I've implemented [description of fix]. Before I mark this as complete, please verify:
1. [Specific thing to check #1]
2. [Specific thing to check #2]
3. Does this fix the issue you were experiencing?
Please confirm the fix works as expected, or let me know what's still not working."
Remember: The user is the final authority on whether something is fixed. No exceptions.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience