Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

sass-scss-optimizer

/sass-scss-optimizer

Audytuje i optymalizuje Sass i SCSS: migrację z @import do @use, przestarzałe funkcje kolorów, rozmiar wyjścia i map źródłowych, z pomiarami.

Licencja
MIT
Ostatnia zmiana repozytorium
04.11.2026

Ocena i bezpieczeństwo

85/ 100Klasa: dobry
Format20 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
8
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 04.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/audit.py

Co robi i kiedy

Audytuje i optymalizuje Sass i SCSS: migrację z @import do @use, przestarzałe funkcje kolorów, rozmiar wyjścia i map źródłowych, z pomiarami.

Wyzwalacze z opisu

optimize my Sass
Oryginalny opis (EN)

Audit and optimize Sass/SCSS (Dart Sass 1.107) for @import deprecation, @use/@forward module structure, legacy JS API/node-sass, deprecated color functions, slash division, @extend/nesting bloat, output size, source maps and the Dart Sass 2 migration, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions Sass, SCSS, Dart Sass, @use/@forward, @import deprecation, node-sass, sass-loader, or "optimize my Sass" -- even if they never say audit or optimize.

Jak działa

  1. Workflow
  2. Principles
  3. Docs
Sekcje z nagłówków SKILL.md, w oryginale · 61 linii, 575 słów
Podgląd SKILL.md
---
name: sass-scss-optimizer
description: Audit and optimize Sass/SCSS (Dart Sass 1.107) for @import deprecation, @use/@forward module structure, legacy JS API/node-sass, deprecated color functions, slash division, @extend/nesting bloat, output size, source maps and the Dart Sass 2 migration, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions Sass, SCSS, Dart Sass, @use/@forward, @import deprecation, node-sass, sass-loader, or "optimize my Sass" -- even if they never say audit or optimize.
---

# Sass/SCSS Optimizer

Dart Sass 1.107 is modern Sass: modules (`@use`/`@forward`), built-in modules and the modern JS API. Cost is legacy `@import`, global color functions, deep nesting and `@extend`; the migration to Dart Sass 2 is the main risk. Optimize module structure, output and deprecations.

## Workflow

### 1. Scope (quick)

- Find the app root and detect Sass/SCSS usage: `Dart Sass 1.107.x`. Record the version, framework (React/Next/Vue/Svelte/Solid/Angular or HTML), styling system, and whether the library is a package, a CSS-only kit, or copied source.
- Run `python <skill-dir>/scripts/audit.py <project-root>` -- static scan of `package.json`, config/CSS files and source for version drift, @import deprecation, legacy JS API, global color functions, @extend/nesting bloat and Dart Sass 2 migration, with file:line evidence. Use `--json` to post-process.
- Classify the pain: bundle/import cost, runtime/re-render cost, theming/SSR style flash, accessibility/forms, large tables/lists, or migration/upgrade. Ask which hurts if unclear.
- Read `references/tooling.md` once: what can be measured here.

- Check the Sass entrypoints, `@use`/`@forward` structure, the compiler in Vite/PostCSS, and whether `node-sass`/legacy JS API remains.

### 2. Audit

The script finds cheap leads; you find the rest by reading. Read the install/config, the global CSS/theme file, the provider or plugin setup, and the 3-5 most-used components. Load only what applies:

| Area | Reference |
|------|-----------|
| Install, config, provider/plugin, theming, SSR | `references/setup.md` |
| Bundle/imports, runtime, a11y/forms, tables, upgrades | `references/optimizations.md` |
| Measurement and honest reporting | `references/tooling.md` |

**Measure, never guess.** Build for production and measure the real route/bundle. Inspect SSR HTML for style tags and dark-mode flash; run axe/Playwright on dialogs, menus, forms and tables. Component count, bundle bytes and a11y violations are evidence; "feels heavy" is not.

Mark each finding **Confirmed** (build/analyzer/axe/code evidence) or **Suspected** (needs measuring).

### 3. Report

Fill `assets/report-template.md`, save it as `SASS_SCSS_OPTIMIZATION_REPORT.md` in the project root, and show the user. Five-line summary, findings table by impact/effort, then per-finding detail (evidence, why it hurts, fix, risk, visual/behavior impact). Group near-duplicates.

### 4. Plan -- then stop for approval

Use plan mode: `EnterPlanMode` (load with ToolSearch if deferred), write the plan, present with `ExitPlanMode`; if unavailable show it in chat and wait for an explicit "go". Structure:

1. **Quick wins** -- trim imports, use path imports, add provider/plugin correctly, add missing labels/titles, move heavy components off the initial route, remove per-row overlays, align theme tokens, add SSR style/cache setup. Low risk.
2. **Structural** -- split component boundaries, virtualize tables, lazy-load heavy widgets, consolidate theming, migrate variants/tokens, fix form composition, deduplicate copied components. Name each behavior change.
3. **Heavy** -- major upgrade, primitive-base change, CSS-only to styled kit (or reverse), Tailwind 3 to 4, copy-in registry extraction, SSR architecture. Separately approved.
   Each step: files touched, expected effect, how to verify, how to roll back.

### 5. Fix

Only approved items, in small groups. After each: typecheck, lint, tests, production build, and a visual/axe check on affected components. A break must trace to one change. Do not mix a major migration with optimization edits. If a change alters a public component API, theme tokens or SSR behavior, stop and ask.

### 6. Verify and wrap up

Re-measure the same routes/components: route JS/CSS, SSR styles/theme, axe violations, dialog/form keyboard flow, table interaction. State plainly what could not be measured. End with deferred items and one suggested next step.

## Principles

- **Modules, not imports.** @use/@forward.
- **Modern API.** Dart Sass compile/compileAsync.
- **CSS output is the budget.** Measure compiled bytes.

## Docs

- https://sass-lang.com/documentation/
Pliki w paczce (8)
  • LICENSE 1 KB
  • README.md 1 KB
  • SKILL.md 5 KB
  • assets/report-template.md 1 KB
  • references/optimizations.md 1 KB
  • references/setup.md 1 KB
  • references/tooling.md 1 KB
  • scripts/audit.py 10 KB

Wersje

W bazie nie ma innych skilli o nazwie sass-scss-optimizer.

Migawka bazy z 13.11.2026 · wersja paczki 26f41a095db0 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 4 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90fe-sass
    Pisze i przegląda kod Sass dla Dart Sass, z systemem modułów @use i @forward, i wskazuje, kiedy wystarczy zwykły CSS.
  • 100css-modules-and-sass
    Utrzymuje zakresowe style komponentów, miksiny Sass, zagnieżdżone reguły i zmienne w CSS Modules i Sass/SCSS.
  • 85bootstrap-optimizer
    Audytuje i optymalizuje użycie Bootstrap 5.3: pełne importy CSS i JS, duplikację zmiennych Sass, inicjalizację wtyczek, tryb ciemny i migrację do v6.
  • 85twind-optimizer
    Audytuje użycie Twind v1: przestarzałe importy, brakujące presety, arkusze SSR, ekstrakcję klas i migrację z v0, z pomiarami przed i po.
  • 100nextjs-sass-base
    Tworzy minimalny projekt webowy z szablonu nextjs-sass-base INTDEV: Next.js, SASS i TypeScript bez dem, komponentów systemu projektowego i zależności d3.
  • 100nextjs-sass-starter
    Tworzy i rozbudowuje projekty webowe z szablonu nextjs-sass-starter INTDEV: Next.js, SASS i TypeScript z systemem projektowym, komponentami i ponad 60 stronami demo.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.