Skip to content
Back to search

tidyfactor-styler

SkillWorks with Claude CodeGitHub

"Production framework styler and surgical RTL UI polish engine with Contextual Decision Layer (CDL). Operates directly inside existing codebases across React/Next.js, PHP, WordPress, and Vanilla HTML/CSS/JS. Trigger on commands 'brief', 'component', 'section', 'page', 'redesign', 'typography', 'palette', 'layout', 'rtl', 'motion', 'styles', or requests for UI polishing and RTL refactoring."

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tidyfactor--styler/badge.svg)](/listings/tidyfactor--styler)

HTML

<a href="/listings/tidyfactor--styler"><img src="/api/listings/tidyfactor--styler/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Choose your preferred installation method:

Option A: Via TidyFactor CLI (Recommended)

Install directly using the official ecosystem package runner into your active workspace:

npx @tidyfactor/cli add styler

*Or if you have the CLI installed globally (`npm i -g @tidyfactor/cli`):*

tidyfactor add styler

Option B: Via Open Agent Skills Ecosystem (skills.sh / Vercel Labs)

Install using the universal multi-agent standard across all supported IDEs (Cursor, Antigravity, Claude Code, Windsurf, Trae, Codex):

npx skills add tidyfactor/styler

Option C: Standalone Zero-Dependency Runner (NPM Direct)

Run the dedicated skill installer directly with automatic cache invalidation:

npx @tidyfactor/styler@latest

2. Workspace Installation per AI Agent

| AI Agent | Workspace Skill Path | |---|---| | **Google Antigravity** | `.agents/skills/tidyfactor-styler/` or global `~/.gemini/config/skills/` | | **Claude Code** | `.claude-skill/skills/tidyfactor-styler/` | | **Cursor / Codex / Windsurf** | `.agents/skills/tidyfactor-styler/` |

Once installed, simply invoke `/brief`, `/component`, `/section`, or `/redesign` inside your AI agent chat to begin surgical UI engineering!

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 52 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: tidyfactor-styler
  3. description: "Production framework styler and surgical RTL UI polish engine with Contextual Decision Layer (CDL). Operates directly inside existing codebases across React/Next.js, PHP, WordPress, and Vanilla HTML/CSS/JS. Trigger on commands 'brief', 'component', 'section', 'page', 'redesign', 'typography', 'palette', 'layout', 'rtl', 'motion', 'styles', or requests for UI polishing and RTL refactoring."
  4. ---
  5. # TidyFactor Styler (Production Design — Any Stack)
  6. A command dispatcher for production-stage visual/interaction design work performed **inside a real, already-existing codebase**. Unlike `tidyfactor-design` (which builds a standalone, zero-build clickable prototype under its own locked `design-system/` folder), this skill never invents its own architecture — it reads the target stack's existing conventions and produces output that belongs there.
  7. ## What this is, precisely
  8. The deliverable is always one of: a new component, a new section, a new page, or a redesign of an existing component/section/page — written in the target codebase's actual language and conventions (JSX+Tailwind for a Next.js app, a Plates partial for a TidyFactor PHP Micro project, a WordPress block/template/page-builder structure, or plain HTML/CSS/JS for a static site). The design judgment (typography, motion, design-style direction, and — as this skill's deepest specialization — Arabic/RTL correctness) is stack-agnostic and shared across all of it.
  9. **Arabic/RTL Execution Requirement.** Any component, section, or page carrying Arabic content must implement `memory/rtl-css-engineering.md` and `memory/typography-arabic.md` — enforcing direction-agnostic logical properties CSS, letterform-aware font sizing, and Arabic-native layout structure.
  10. **When this is the right tool vs. others:**
  11. - Exploring a direction fast, before real content/data exists, as a standalone clickable demo → `tidyfactor-design`.
  12. - Scaffolding a brand-new project's folder structure and stack from zero → the matching track skill (`tidyfactor-html`, `tidyfactor-next`, `tidyfactor-php`).
  13. - Documenting codebase architecture, API specifications, or generating a Docsify site → `tidyfactor-doc`.
  14. - Building, auditing, or refactoring skills according to master governance rules → `tidyfactor-skill-architect`.
  15. - Styling, restyling, or adding to something that **already exists and already ships** → this skill.
  16. ## Commands
  17. | User intent | Command | What it loads |
  18. |---|---|---|
  19. | "Establish design brief / project baseline" | `references/commands/brief.md` | `workflows/brief.md` + `memory/decision-points.md` |
  20. | "Redesign/create this component" | `references/commands/component.md` | `workflows/component-create.md` **or** `workflows/component-redesign.md` + `memory/component-anatomy.md` + `memory/decision-points.md` + matching `memory/stacks/*.md` |
  21. | "Redesign/restyle this section" | `references/commands/section.md` | `workflows/section-create.md` **or** `workflows/section-redesign.md` + `memory/layout-archetypes.md` + `memory/nav-footer-catalog.md` + `memory/decision-points.md` + matching `memory/stacks/*.md` |
  22. | "Build a new production page" | `references/commands/page.md` | `workflows/page-create.md` + `memory/layout-archetypes.md` + `memory/nav-footer-catalog.md` + `memory/decision-points.md` + matching `memory/stacks/*.md` |
  23. | "Redesign this existing page" | `references/commands/redesign.md` | `workflows/page-redesign.md` + `memory/layout-archetypes.md` + `memory/nav-footer-catalog.md` + `memory/quality-bar.md` + matching `memory/stacks/*.md` |
  24. | "Select layout archetype / macrostructure" | `references/commands/layout.md` | `memory/layout-archetypes.md` + matching `memory/stacks/*.md` |
  25. | "Select navigation (N1–N9) & footer (Ft1–Ft8)" | `references/commands/nav-footer.md` | `memory/nav-footer-catalog.md` + `memory/typography-arabic.md` + `memory/rtl-css-engineering.md` |
  26. | "Pick/pair typography, incl. Arabic" | `references/commands/typography.md` | `memory/typography-arabic.md` |
  27. | "Extract color palette & WCAG AA contrast" | `references/commands/palette.md` | `memory/brand-tokens.md` + `memory/asset-tooling.md` |
  28. | "Asset hygiene & image optimization" | `references/commands/assets.md` | `memory/asset-tooling.md` + `memory/quality-bar.md` |
  29. | "Fix/build RTL correctness" | `references/commands/rtl.md` | `workflows/rtl-audit-fix.md` + `memory/rtl-css-engineering.md` |
  30. | "Add/review motion and interaction" | `references/commands/motion.md` | `memory/motion-principles.md` |
  31. | "Choose a design direction / style movement" | `references/commands/styles.md` | `memory/design-styles.md` |
  32. Read only the command file that matches the request. A command loads its workflow (if it has one) and its listed memory files — nothing else, until the workflow itself calls for more. `component`, `section`, `page`, and `redesign` additionally load `memory/rtl-css-engineering.md` and `memory/typography-arabic.md` whenever the target carries Arabic/bilingual content.
  33. ## Non-negotiable constraints (every command)
  34. 1. **Detect before designing.** Before producing any output, identify the target stack (React/Next.js, PHP Flight/Medoo, WordPress, or plain HTML/CSS/JS) from the files the user shows or names. If it's ambiguous, ask — never guess and silently pick one.
  35. 2. **Conform, don't compete.** Match the existing codebase's naming, file layout, and styling approach (Tailwind classes if the project uses Tailwind, the project's existing CSS methodology if not, the project's existing component patterns). Never introduce a second, parallel styling system into a codebase that already has one.
  36. 3. **If the target stack is a TidyFactor production track** (PHP Micro, PHP Kernel, Webletz Core, tidyfactor-html) **its locked architecture wins.** This skill supplies the design decision (layout, type, motion, color); it never overrides that skill's file/module contract. Read that skill's own SKILL.md constraints before writing into its codebase.
  37. 4. **Component and section redesigns are scoped.** A component redesign touches only that component's definition and its own usages — never neighboring components. A section redesign touches only that section's markup/styles — never global nav, footer, or unrelated sections. Scope creep is a failure, not thoroughness.
  38. 5. **Arabic / RTL First-Class Integration.** If the content is Arabic or bilingual, typography and layout decisions must be configured for Arabic at launch (`typography-arabic.md`) using logical-properties CSS (`rtl-css-engineering.md`), applying the per-component checklist for icons, modals, tables, and animations.
  39. 6. **Brand Single Source of Truth.** If `brand.json` is present at the project root, read `memory/brand-tokens.md` and map tokens directly into CSS variables or Tailwind theme configs.
  40. 7. **Every deliverable passes `memory/quality-bar.md` before being called finished.**
  41. Compatible with Antigravity, Claude Code, OpenAI Codex, and OpenCode.
README.md · README · 404 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. # 🎨 TidyFactor Styler `v1.4.1`
  3. ### The Production Framework Styler, Surgical RTL Redesign & Anti-Slop UI Engine for AI Coding Agents
  4. Give **Google Antigravity, Claude Code, Cursor, OpenAI Codex, or Windsurf** a production-grade UI transformation engine that operates directly inside your live codebase — without inventing duplicate style layers, alien dependencies, or per-page CSS drift.
  5. [![npm version](https://img.shields.io/npm/v/@tidyfactor/styler.svg?style=for-the-badge&color=0284C7&logo=npm)](https://www.npmjs.com/package/@tidyfactor/styler)
  6. [![GitHub Stars](https://img.shields.io/github/stars/TidyFactor/Styler.svg?style=for-the-badge&color=EAB308&logo=github)](https://github.com/TidyFactor/Styler/stargazers)
  7. [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge)](LICENSE)
  8. [![Ecosystem](https://img.shields.io/badge/TidyFactor-Skills--LAB-purple.svg?style=for-the-badge)](https://github.com/TidyFactor)
  9. [![Compatibility](https://img.shields.io/badge/Agents-Antigravity%20|%20Claude%20|%20Cursor%20|%20Codex-orange.svg?style=for-the-badge)](SKILL.md)
  10. [![RTL Native Arabic](https://img.shields.io/badge/RTL-Native%20Arabic-emerald.svg?style=for-the-badge)](README.ar.md)
  11. [![Architect Score](https://img.shields.io/badge/Architect%20Score-13%2F13%20Pass%20(100%25)-green.svg?style=for-the-badge)](#%EF%B8%8F-tidyfactor-skill-methodology--governance)
  12. [![AI Agents Compatible](https://img.shields.io/badge/AI%20Agents-Universal%20Compatibility-4285F4.svg?style=for-the-badge)](SKILL.md)
  13. [ English ](README.md) • [ العربية ](README.ar.md) • [ فارسی ](README.fa.md) • [ Español ](README.es.md) • [ Português ](README.pt.md) • [ 简体中文 ](README.zh.md) • [ Deutsch ](README.de.md) • [ Français ](README.fr.md)
  14. <br/><br/>
  15. <p align="center">
  16. <img src="assets/hero-banner.png" alt="TidyFactor Styler Hero Banner" width="100%" />
  17. </p>
  18. </div>
  19. ---
  20. ## 📚 Table of Contents
  21. - [🎯 Why TidyFactor/Styler](#-why-tidyfactorstyler)
  22. - [🚀 Quick Start](#-quick-start)
  23. - [🌟 Value Proposition: When to Use Styler?](#-value-proposition-when-to-use-styler)
  24. - [⚡ 13-Stage Command Dispatcher Architecture](#-13-stage-command-dispatcher-architecture)
  25. - [🛠️ The 8 Production Workflows](#%EF%B8%8F-the-8-production-workflows)
  26. - [🌐 Supported Production Stacks](#-supported-production-stacks)
  27. - [🇸🇦 Native Arabic & Surgical RTL Engineering](#-native-arabic--surgical-rtl-engineering)
  28. - [🛡️ Anti-Slop Governance & Quality Bar](#%EF%B8%8F-anti-slop-governance--quality-bar)
  29. - [1. The 6-Axis Pre-Emit Self-Critique (P, H, E, S, R, V)](#1-the-6-axis-pre-emit-self-critique-p-h-e-s-r-v)
  30. - [2. The 8-State Component Interaction Matrix](#2-the-8-state-component-interaction-matrix)
  31. - [❓ FAQ](#-faq)
  32. - [🏛️ The TidyFactor Ecosystem](#%EF%B8%8F-the-tidyfactor-ecosystem)
  33. - [🏛️ TidyFactor Skill Methodology & Governance](#%EF%B8%8F-tidyfactor-skill-methodology--governance)
  34. - [🤝 Contributing](#-contributing)
  35. - [👨‍💻 Support](#-support)
  36. - [📜 License](#-license)
  37. ---
  38. ## 🎯 Why TidyFactor/Styler
  39. > [!IMPORTANT]
  40. > **The Styler Manifesto: Why Raw AI Codegen Produces Bland UI**
  41. > Raw LLMs default to the statistical mean: generic purple gradients, missing interactive micro-states, arbitrary inline styles, and broken directional CSS margins (`mr-*`, `ml-*`).
  42. > **TidyFactor Styler is the surgical in-codebase antidote:** It enforces a zero-drift, framework-native contract that refactors live components, injects production-grade RTL ergonomics, and respects your existing design tokens without breaking upstream architecture.
  43. **TidyFactor/Styler enforces a strict "Conform, Don't Compete" engineering contract:** it detects your project's active framework, inspects existing design tokens, and outputs stack-native components that look like your senior frontend architect wrote them.
  44. | Dimension | Generic AI Prompting / Prototypers | `tidyfactor-styler` |
  45. |---|---|---|
  46. | **Operating Environment** | Isolated demo files or new sandboxes | **Live, existing codebases** (React/Next.js, PHP, WordPress, HTML) |
  47. | **Styling Conformance** | Injects new alien CSS rules or duplicate Tailwind layers | **Adopts your active Tailwind config**, CSS variables, or class conventions |
  48. | **Scope Control** | Sloppy edits that accidentally break global layouts | **Strictly scoped refactoring** (component touches only component) |
  49. | **Arabic & RTL Support** | Literal flipping or broken directional margins (`mr-*`, `left-*`) | **Native Logical CSS** (`ms-*`, `pe-*`, `start-*`) + letterform font scaling |
  50. | **Anti-Slop Quality** | Generic purple AI gradients and missing interactive states | **7-Axis pre-emit self-critique (P, H, E, S, R, V, D)** + mandatory 8-state interaction matrix |
  51. | **Context Consumption** | Giant unorganized design dumps (10k+ tokens) | **Context-efficient dispatcher** (~350 tokens at start, loads on demand) |
  52. ### ⚡ The Before & After Difference: Raw AI Prompting vs. Styler In-Codebase Polish
  53. ````carousel
  54. ```html
  55. <!-- ❌ RAW AI GENERATION (Generic, Fragile, LTR-Hardcoded) -->
  56. <button class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-2 px-4 rounded mr-3 shadow-lg flex items-center gap-2">
  57. <span>Submit Order</span>
  58. <svg class="w-4 h-4 ml-1" fill="none" viewBox="0 0 24 24"><!-- hardcoded LTR arrow --></svg>
  59. </button>
  60. <!-- Flaws: Hardcoded mr/ml breaks RTL; Generic purple gradient; Missing focus-visible, active, disabled, and loading states; Ignores project design tokens -->
  61. ```
  62. <!-- slide -->
  63. ```html
  64. <!-- ✅ TIDYFACTOR STYLER POLISH (Production-Grade, Token-Aligned, Native RTL) -->
  65. <button class="btn-primary inline-flex items-center justify-center gap-2 font-medium transition-all duration-150 ease-out focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:outline-none disabled:opacity-50 disabled:pointer-events-none data-[state=loading]:cursor-wait data-[state=loading]:opacity-80 active:scale-[0.98] me-3">
  66. <span>تأكيد الطلب / Submit Order</span>
  67. <svg class="w-4 h-4 rtl:rotate-180 transition-transform" aria-hidden="true" viewBox="0 0 24 24"><!-- bidi-aware --></svg>
  68. </button>
  69. <!-- Strengths: Native logical properties (me-3); Bidi-safe icon rotation; Full 8-state interaction matrix; Strictly scoped to existing design tokens -->
  70. ```
  71. ````
  72. ---
  73. ## 🚀 Installation & Quick Start
  74. Choose your preferred installation method:
  75. ### Option A: Via TidyFactor CLI (Recommended)
  76. Install directly using the official ecosystem package runner into your active workspace:
  77. ```bash
  78. npx @tidyfactor/cli add styler
  79. ```
  80. *Or if you have the CLI installed globally (`npm i -g @tidyfactor/cli`):*
  81. ```bash
  82. tidyfactor add styler
  83. ```
  84. ### Option B: Via Open Agent Skills Ecosystem (skills.sh / Vercel Labs)
  85. Install using the universal multi-agent standard across all supported IDEs (Cursor, Antigravity, Claude Code, Windsurf, Trae, Codex):
  86. ```bash
  87. npx skills add tidyfactor/styler
  88. ```
  89. ### Option C: Standalone Zero-Dependency Runner (NPM Direct)
  90. Run the dedicated skill installer directly with automatic cache invalidation:
  91. ```bash
  92. npx @tidyfactor/styler@latest
  93. ```
  94. ### 2. Workspace Installation per AI Agent
  95. | AI Agent | Workspace Skill Path |
  96. |---|---|
  97. | **Google Antigravity** | `.agents/skills/tidyfactor-styler/` or global `~/.gemini/config/skills/` |
  98. | **Claude Code** | `.claude-skill/skills/tidyfactor-styler/` |
  99. | **Cursor / Codex / Windsurf** | `.agents/skills/tidyfactor-styler/` |
  100. Once installed, simply invoke `/brief`, `/component`, `/section`, or `/redesign` inside your AI agent chat to begin surgical UI engineering!
  101. ---
  102. ## 🌟 Value Proposition: When to Use Styler?
  103. ```mermaid
  104. graph TD
  105. Intent{"What are you building?"}
  106. Intent -->|"Standalone prototype from zero"| D["🎨 tidyfactor-design<br/>(Zero-build HTML prototype)"]
  107. Intent -->|"New framework skeleton"| S["🏗️ Architecture Track<br/>(tidyfactor-next, tidyfactor-php, etc.)"]
  108. Intent -->|"Real existing codebase UI work"| ST["💎 tidyfactor-styler<br/>(Production Component/Section/Page UI)"]
  109. ```
  110. | For Frontend Developers | For Fullstack & Agency Teams | For AI Coding Agents |
  111. |---|---|---|
  112. | **Conform, Don't Compete**: Adopts your existing naming, Tailwind config, and styling conventions without creating a parallel CSS system. | **Full Stack Agnostic**: Seamlessly switches between Next.js, PHP, WordPress, and Vanilla stacks with zero manual prompt calibration. | **Token-Efficient Dispatcher**: Lightweight `SKILL.md` entry router loads only ~350 tokens at launch, pulling memory only when required. |
  113. | **Component-Scoped Precision**: Component redesigns touch only the component definition and its immediate usages — never neighboring widgets. | **Arabic / RTL First-Class**: Automated logical CSS properties (`ms-*`, `pe-*`, `start-*`), letterform-aware font scaling, and bidi isolation. | **Anti-Slop Certified**: 6-axis pre-emit self-critique (P, H, E, S, R, V) blocks generic AI purple gradients and sloppy styling tells. |
  114. | **8-State Interaction Matrix**: Guarantees default, hover, active, focus, disabled, loading, empty, and error states for all components. | **Brand SSOT Integration**: Automatically reads `brand.json` and maps design tokens to native CSS custom properties or framework theme vars. | **Deterministic Checklists**: Every workflow terminates with an explicit, quantifiable validation checklist before shipping. |
  115. ---
  116. ## ⚡ 13-Stage Command Dispatcher Architecture
  117. `tidyfactor-styler` exposes **13 precision slash commands** organized into a modular dispatch architecture:
  118. ```mermaid
  119. graph LR
  120. SK["💎 SKILL.md<br/>(Dispatcher Router)"]
  121. SK --> C0["Discovery<br/>(brief)"]
  122. SK --> C1["Component Operations<br/>(component)"]
  123. SK --> C2["Surface Operations<br/>(section, page, redesign)"]
  124. SK --> C3["Architecture & Shell<br/>(layout, nav-footer)"]
  125. SK --> C4["Design System & Brand<br/>(typography, palette, assets, styles)"]
  126. SK --> C5["Engineering Quality<br/>(rtl, motion)"]
  127. ```
  128. | Command | User Intent | What It Loads | Output & Value |
  129. |---|---|---|---|
  130. | `brief` | "Establish design brief / project baseline" | `workflows/brief.md` + `memory/decision-points.md` | Pre-flight interview caching target framework and design school. |
  131. | `component` | "Create / Redesign this component" | `workflows/component-create.md` or `component-redesign.md` + `component-anatomy.md` + `stacks/*.md` | Production React/PHP/HTML component with 8-state coverage & CVA variants. |
  132. | `section` | "Create / Restyle this section" | `workflows/section-create.md` or `section-redesign.md` + `layout-archetypes.md` + `nav-footer-catalog.md` | Scoped section surface with responsive rhythm and clean visual hierarchy. |
  133. | `page` | "Build a new production page" | `workflows/page-create.md` + `layout-archetypes.md` + `nav-footer-catalog.md` + `stacks/*.md` | Complete page assembly strictly adhering to framework file conventions. |
  134. | `redesign` | "Redesign this existing page" | `workflows/page-redesign.md` + `layout-archetypes.md` + `nav-footer-catalog.md` + `quality-bar.md` | High-impact visual overhaul with zero functional regression or broken state. |
  135. | `layout` | "Select layout archetype / macrostructure" | `memory/layout-archetypes.md` + `stacks/*.md` | Matches product context to 1 of 8 macrostructure archetypes (`editorial`, `interface`, etc.). |
  136. | `nav-footer` | "Select navigation & footer archetypes" | `memory/nav-footer-catalog.md` + `typography-arabic.md` + `rtl-css-engineering.md` | Chooses from N1–N9 navigation and Ft1–Ft8 footer archetypes with RTL alignment. |
  137. | `typography` | "Pick/pair typography, incl. Arabic" | `memory/typography-arabic.md` | Applies 7 mood-routed font pairings (Cairo, Tajawal, El Messiri, Inter, Outfit). |
  138. | `palette` | "Extract color palette & WCAG AA contrast" | `memory/brand-tokens.md` + `memory/asset-tooling.md` | Generates semantic token scales with automated WCAG 2.1 AA contrast scores. |
  139. | `assets` | "Asset hygiene & image optimization" | `memory/asset-tooling.md` + `memory/quality-bar.md` | Compresses images, inspects dimensions, and processes image assets. |
  140. | `rtl` | "Audit & fix RTL / Arabic correctness" | `workflows/rtl-audit-fix.md` + `memory/rtl-css-engineering.md` | Converts directional CSS to logical properties and fixes icon flipping rules. |
  141. | `motion` | "Add / review motion and interaction" | `memory/motion-principles.md` | Orchestrates Framer Motion / Alpine transitions with `prefers-reduced-motion` a11y. |
  142. | `styles` | "Choose a design direction / style movement" | `memory/design-styles.md` | Directs UI to a specific aesthetic movement (Modern SaaS, Editorial, Swiss, etc.). |
  143. ---
  144. ## 🛠️ The 8 Production Workflows
  145. Every task follows a strict, single-outcome workflow ending in an automated validation checklist:
  146. 1. **`brief.md`**: Pre-flight CDL Discovery $\rightarrow$ Framework Baseline Lock $\rightarrow$ Brand Token Mapping $\rightarrow$ `.tidyfactor/styler-brief.md` Cache.
  147. 2. **`component-create.md`**: Design Read $\rightarrow$ Variant & State Mapping $\rightarrow$ Stack-Native Implementation $\rightarrow$ Pre-Emit Critique $\rightarrow$ Verification.
  148. 3. **`component-redesign.md`**: Current State Audit $\rightarrow$ Intent & Direction Selection $\rightarrow$ Scoped Refactoring $\rightarrow$ Zero Regression Check.
  149. 4. **`section-create.md`**: Macrostructure Alignment $\rightarrow$ Layout Archetype Rhythm $\rightarrow$ Inner Component Composition $\rightarrow$ Responsive Polish.
  150. 5. **`section-redesign.md`**: Section Scope Isolation $\rightarrow$ Hierarchy Elevation $\rightarrow$ Visual Anchor Refresh $\rightarrow$ Mobile Grid Audit.
  151. 6. **`page-create.md`**: Page Archetype Blueprint $\rightarrow$ Nav/Footer Selection $\rightarrow$ Section Assembly $\rightarrow$ SEO & Metadata Injection.
  152. 7. **`page-redesign.md`**: Global Visual Cohesion $\rightarrow$ Conversion Path Optimization $\rightarrow$ Typography Harmony $\rightarrow$ Performance Budget.
  153. 8. **`rtl-audit-fix.md`**: Directional CSS Elimination $\rightarrow$ Logical Properties Refactor $\rightarrow$ Bi-directional Icon Inversion $\rightarrow$ Font Hierarchy Tuning.
  154. ---
  155. ## 🌐 Supported Production Stacks
  156. `tidyfactor-styler` inspects your codebase and binds dynamically to your target stack's architecture:
  157. | Target Framework | Styling Foundation | Component Architecture | Motion Engine |
  158. |---|---|---|---|
  159. | **React / Next.js** (App Router & Pages) | Tailwind CSS v4 / v3 or CSS Modules | Radix UI / shadcn/ui + CVA + `clsx` + `tailwind-merge` | Framer Motion (`framer-motion`) |
  160. | **PHP (TidyFactor / Flight / Medoo)** | Tailwind CSS or Native CSS Custom Properties | Semantic HTML5 Partials (Plates / Blade / PHP Views) | Alpine.js (`x-transition`) or CSS Transitions |
  161. | **WordPress / Classic CMS** | Modern Theme CSS / Gutenberg Styles | PHP Template Parts / Block Markup | Native CSS Keyframes / Vanilla JS |
  162. | **Static HTML / CSS / JS** | Semantic CSS / Modern CSS Variables | Modular Component Blocks | Vanilla JS / CSS Transitions |
  163. ---
  164. ## 🇸🇦 Native Arabic & Surgical RTL Engineering
  165. <p align="center">
  166. <img src="assets/demo-rtl-pipeline.png" alt="Production UI Transformation Lifecycle" width="100%" />
  167. </p>
  168. ### 1. Logical CSS Properties Enforcement
  169. `tidyfactor-styler` eliminates legacy directional styles (`margin-left`, `float: right`, `left: 0`) in favor of modern logical CSS:
  170. ```css
  171. /* Standard Logical Property Architecture */
  172. .styler-card {
  173. margin-inline-start: 1.5rem; /* Replaces margin-left / margin-right */
  174. padding-inline-end: 1.25rem; /* Replaces padding-right / padding-left */
  175. inset-inline-start: 0; /* Replaces left / right */
  176. text-align: start; /* Replaces text-align: left */
  177. border-start-start-radius: 8px; /* Logical corner radius */
  178. }
  179. ```
  180. ### 2. Letterform-Aware Arabic Typography
  181. Arabic script requires specific line-height and letter-spacing compensation:
  182. - **Never use negative `letter-spacing` (tracking)** on Arabic text (it breaks cursive glyph connections).
  183. - **Increase `line-height` by +15–20%** compared to Latin typography to accommodate ascenders and descenders.
  184. - **Mood-Routed Font Pairings**:
  185. - *Modern SaaS / Interface*: Cairo / Tajawal + Inter / Outfit
  186. - *Editorial / High-Trust B2B*: IBM Plex Arabic + IBM Plex Sans
  187. - *Luxury / Creative*: El Messiri (never below 24px) + Plus Jakarta Sans
  188. ---
  189. ## 🛡️ Anti-Slop Governance & Quality Bar
  190. ### 1. The 7-Axis Pre-Emit Self-Critique (P, H, E, S, R, V, D)
  191. Before emitting code, the agent evaluates output against the **7-Axis Anti-Slop Rubric** (`memory/quality-bar.md` / `/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */`):
  192. - **P — Palette Harmony (0–10)**: Strict WCAG 2.1 AA contrast; no generic AI purple/pink gradients without explicit brand mandate.
  193. - **H — Hierarchy & Rhythm (0–10)**: Clear visual anchor; intentional whitespace sizing using a 4px/8px baseline grid.
  194. - **E — Execution Fidelity (0–10)**: Full semantic HTML5; no empty `<div>` soup or misplaced wrappers.
  195. - **S — State Completeness (0–10)**: All 8 component states implemented.
  196. - **R — RTL Correctness (0–10)**: 100% logical CSS properties; proper icon inversion for directional arrows.
  197. - **V — Variety & Distinction (0–10)**: Distinct design school character; zero default Bootstrap-like look.
  198. - **D — Decision Alignment (0–10)**: Strict compliance with `.tidyfactor/styler-brief.md` architectural parameters.
  199. ### 2. The 8-State Component Interaction Matrix
  200. Every interactive component must provide complete visual coverage for:
  201. 1. `default`: Baseline rest state with clear affordance.
  202. 2. `hover`: Subdued lift or contrast elevation (transition $\le 150\text{ms}$).
  203. 3. `active`: Pressed micro-scale ($0.98$) or inset depth.
  204. 4. `focus-visible`: 2px offset focus ring for keyboard accessibility.
  205. 5. `disabled`: Reduced opacity ($0.5$), `cursor: not-allowed`, pointer-events disabled.
  206. 6. `loading`: Skeleton loader or accessible spinner preventing layout shifts.
  207. 7. `empty`: Welcoming empty state illustration and actionable call to action.
  208. 8. `error`: Semantic danger state with accessible error description.
  209. ---
  210. ## ❓ FAQ
  211. <details>
  212. <summary><b>How is Styler different from <code>tidyfactor-design</code>?</b></summary>
  213. <br/>
  214. <code>tidyfactor-design</code> creates standalone, zero-build clickable HTML prototypes in a separate demo directory. <b><code>tidyfactor-styler</code> operates directly inside your real codebase</b> (Next.js, PHP, WordPress, HTML) modifying existing components and respecting your active CSS architecture.
  215. </details>
  216. <details>
  217. <summary><b>Will Styler overwrite or mess up my existing Tailwind configuration?</b></summary>
  218. <br/>
  219. <b>Never.</b> Styler follows the "Conform, Don't Compete" rule: it inspects your <code>tailwind.config.js</code> or CSS files and uses your existing utility classes and token definitions.
  220. </details>
  221. <details>
  222. <summary><b>Which AI coding agents are supported?</b></summary>
  223. <br/>
  224. <b>Google Antigravity, Claude Code, Cursor, OpenAI Codex, and Windsurf</b> are all supported with 100% behavioral parity.
  225. </details>
  226. <details>
  227. <summary><b>How does Styler handle Arabic / RTL layouts?</b></summary>
  228. <br/>
  229. Styler uses CSS Logical Properties (e.g. <code>margin-inline-start</code>, <code>inset-inline-start</code>, <code>text-align: start</code>) and handles icon flipping, line-height expansion, and Arabic font pairing automatically.
  230. </details>
  231. ---
  232. ## 🏛️ The TidyFactor Ecosystem
  233. **TidyFactor** is a modular web architecture and AI coding agent skill ecosystem built on clear separation of concerns across the product lifecycle:
  234. ```
  235. TidyFactor Organization (github.com/TidyFactor)
  236. │
  237. ├── Design Skills
  238. │ ├── Cinematic → Experience / "Wow" (Apple × Cartier Scroll-Driven Landing Pages)
  239. │ ├── Design → Prototype / "Build" (Code-Native UI Design Engine & Figma Alternative)
  240. │ └── Styler → Production / "Ship" (Framework Styler & RTL Polish Engine)
  241. │
  242. ├── Development Skills
  243. │ ├── HTML → Content & Static (Semantic SEO & Static Platform Starter)
  244. │ ├── HTMX → Hypermedia (Server-Driven Micro-Interactions)
  245. │ ├── JS → Vanilla SPA (Framework-Free Reactive ES Modules)
  246. │ ├── PHP → Server-Rendered (Modern PHP 8.x Component UI & Architecture)
  247. │ └── Next → Multi-Tenant SaaS (Next.js 16, React 19, Supabase RLS & Dev-Perf)
  248. │
  249. └── Growth Skills
  250. └── Marketing → Growth / Revenue (Direct Response, Pillar SEO & Content Lifecycles)
  251. ```
  252. ### 💎 Frontend Triad
  253. ```
  254. TidyFactor
  255. │
  256. ┌─────────┼─────────┐
  257. │ │ │
  258. Cinematic Design Styler
  259. │ │ │
  260. Experience Prototype Production
  261. │ │ │
  262. "Wow" "Build" "Ship"
  263. ```
  264. ### 📦 Community Package & Skill Parity
  265. | Track | Category | GitHub Repository | Agent Skill | NPM Package |
  266. | :--- | :--- | :--- | :--- | :--- |
  267. | **Styler** | Design | [`TidyFactor/Styler`](https://github.com/TidyFactor/Styler) | `tidyfactor-styler` | [`@tidyfactor/styler`](https://www.npmjs.com/package/@tidyfactor/styler) |
  268. | **Design** | Design | [`TidyFactor/Design`](https://github.com/TidyFactor/Design) | `tidyfactor-design` | [`@tidyfactor/design`](https://www.npmjs.com/package/@tidyfactor/design) |
  269. | **Cinematic** | Design | [`TidyFactor/Cinematic`](https://github.com/TidyFactor/Cinematic) | `tidyfactor-cinematic` | [`@tidyfactor/cinematic`](https://www.npmjs.com/package/@tidyfactor/cinematic) |
  270. | **Next** | Development | [`TidyFactor/Next`](https://github.com/TidyFactor/Next) | `tidyfactor-next` | [`@tidyfactor/next`](https://www.npmjs.com/package/@tidyfactor/next) |
  271. | **HTML** | Development | [`TidyFactor/HTML`](https://github.com/TidyFactor/HTML) | `tidyfactor-html` | [`@tidyfactor/html`](https://www.npmjs.com/package/@tidyfactor/html) |
  272. | **HTMX** | Development | [`TidyFactor/HTMX`](https://github.com/TidyFactor/HTMX) | `tidyfactor-htmx` | [`@tidyfactor/htmx`](https://www.npmjs.com/package/@tidyfactor/htmx) |
  273. | **JS** | Development | [`TidyFactor/JS`](https://github.com/TidyFactor/JS) | `tidyfactor-js` | [`@tidyfactor/js`](https://www.npmjs.com/package/@tidyfactor/js) |
  274. | **PHP** | Development | [`TidyFactor/PHP`](https://github.com/TidyFactor/PHP) | `tidyfactor-php` | [`@tidyfactor/php`](https://www.npmjs.com/package/@tidyfactor/php) |
  275. | **Marketing** | Growth | [`TidyFactor/Marketing`](https://github.com/TidyFactor/Marketing) | `tidyfactor-marketing` | [`@tidyfactor/marketing`](https://www.npmjs.com/package/@tidyfactor/marketing) |
  276. ---
  277. ## 🏛️ TidyFactor Skill Methodology & Governance
  278. `tidyfactor-styler` passes all **13 Architectural Governance Rules** under [`tidyfactor-skill-architect`](https://github.com/TidyFactor/Skill-Architect):
  279. 1. ✅ **Dispatcher Discipline**: `SKILL.md` routes commands without executing tasks (~350 tokens).
  280. 2. ✅ **One Workflow = One Outcome**: Every workflow has a single deliverable with an explicit validation checklist.
  281. 3. ✅ **Operational Memory**: Pure design patterns, token schemas, and typography rules—zero narrative prose.
  282. 4. ✅ **No Empty Structures**: Clean, flattened architecture without single-file folders.
  283. 5. ✅ **Philosophy Isolation**: Technical execution separated from marketing commentary.
  284. 6. ✅ **Trigger-Justified Growth**: Commands added per verifiable UI engineering lifecycle stages.
  285. 7. ✅ **Security & Quality Bar**: Automated pre-emit self-critique rubric and 8-state interaction matrices.
  286. 8. ✅ **Cross-Platform Parity**: 100% identical behavior across Antigravity, Claude Code, Cursor, and Codex.
  287. 9. ✅ **Platform Compatibility**: Frontmatter double-quotes and valid YAML parsing.
  288. 10. ✅ **Tool Permission Declaration**: Explicit scope for tools and mutations.
  289. 11. ✅ **Memory Freshness**: Operational memory timestamps (`last-verified: YYYY-MM-DD`).
  290. 12. ✅ **Skill vs MCP Boundary**: Knowledge in skills, live state in MCP/CLI.
  291. 13. ✅ **Two-Tier Multi-Language Documentation**: Canonical technical documentation + 8-language localized guides.
  292. ---
  293. ## 🤝 Contributing
  294. We welcome community contributions, custom stack adapters, and workflow refinements!
  295. Please read our `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md` before opening a Pull Request. All proposed workflows and memory extensions must satisfy the `tidyfactor-skill-architect` governance rules.
  296. ---
  297. ## 👨‍💻 Support
  298. - 🌐 **Website:** [tidyfactor.com](https://tidyfactor.com/)
  299. - 📚 **Documentation:** [tidyfactor.com/documentation](https://tidyfactor.com/documentation)
  300. - 🤝 **Commercial Partner:** [Alwkala Digital Agency](https://alwkala.com/)
  301. - 🐙 **GitHub Organization:** [github.com/TidyFactor](https://github.com/TidyFactor)
  302. - 📧 **Inquiries:** [hello@tidyfactor.com](mailto:hello@tidyfactor.com)
  303. ---
  304. ## 👨‍💻 Organization & Support
  305. - 🌐 **Official Website:** [https://tidyfactor.com/](https://tidyfactor.com/)
  306. - 📚 **Official Documentation:** [https://tidyfactor.com/documentation](https://tidyfactor.com/documentation)
  307. - 🤝 **Official Partner Website:** [Alwkala Digital Agency](https://alwkala.com/)
  308. - 🐙 **GitHub Organization:** [github.com/TidyFactor](https://github.com/TidyFactor)
  309. - 📧 **Business Inquiries:** [hello@tidyfactor.com](mailto:hello@tidyfactor.com)
  310. - 📱 **WhatsApp:** [+20 101 665 6899](https://wa.me/201016656899)
  311. - 📞 **Phone:** +20 101 665 6899
  312. - 📍 **Location:** Cairo, Egypt
  313. ---
  314. ## 📜 License
  315. Licensed under the **Apache License 2.0**. Copyright (c) 2026 [TidyFactor](https://tidyfactor.com) & [Alwkala](https://alwkala.com).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.