refactor-css-mdn

Refactor CSS files to MDN Web Docs best practices with backups and reports.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/projetsX/french_skills_vscode --skill refactor-css-mdn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-css-mdn
Source: https://github.com/projetsX/french_skills_vscode/tree/main/refactor-css-mdn
Command: npx skills add https://github.com/projetsX/french_skills_vscode --skill refactor-css-mdn

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Refactor CSS files to MDN Web Docs best practices to improve readability, modernize syntax, and reduce duplication across large style sheets.

Core Features & Use Cases

  • MDN-guided refactoring: Transform CSS to align with MDN guidance, including modern layout methods, variables, and cleaner selectors.
  • Safety and traceability: Automatically creates timestamped backups before applying changes and logs rationale.
  • Documentation and references: Integrates MDN references and a summary report to support future maintenance.

Quick Start

Provide the CSS file path to refactor and run the MDN-guided modernization process.

Frequently Asked Questions about refactor-css-mdn

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

FAQPage Schema
How do I refactor CSS files to align with MDN best practices?

To refactor CSS files to MDN best practices, you provide the file path to a modernization process that replaces deprecated properties, consolidates repetitive rules, and introduces variables and semantic selectors. A timestamped backup and a refactoring report are generated.

What is the best way to modernize legacy CSS across large style sheets?

Modernizing legacy CSS across large style sheets involves consolidating repetitive rules, replacing deprecated properties, and applying MDN-recommended layout techniques, variables, and cleaner selectors to improve readability and reduce duplication.

How does CSS refactoring handle deprecated properties and repetitive rules?

CSS refactoring handles deprecated properties and repetitive rules by automatically replacing outdated syntax with modern alternatives and consolidating duplicated declarations, ensuring the final style sheet remains maintainable and aligned with MDN guidance.

Can I refactor CSS for web projects with multiple components and themes?

Yes, you can refactor CSS for web projects with multiple components and themes. The process applies modern layout techniques, semantic selectors, and variables across your style sheets to ensure maintainability and consistency throughout the project.

Does refactoring CSS modify my original files directly without backups?

Refactoring CSS does not modify your original files without backups. The process automatically creates timestamped backups before applying any changes, ensuring safety and traceability while logging the rationale for each modification.

When do I need to use CSS variables and semantic selectors during refactoring?

You need to use CSS variables and semantic selectors during refactoring when you want to reduce duplication, improve readability, and modernize syntax across large style sheets, replacing repetitive rules with maintainable, MDN-guided patterns.