AgentSkillsCN

styled-jsx-audit

审计 styled-jsx 的使用情况,排查作用域泄漏、过度全局化的选择器、不安全的插值操作以及可维护性问题,并针对性地提出重构方案。

SKILL.md
--- frontmatter
name: styled-jsx-audit
description: Audit styled-jsx usage for scoping leaks, overly global selectors, unsafe interpolations, and maintainability issues; propose targeted refactors.
argument-hint: "[path or ComponentName]"
allowed-tools: Read, Grep, Glob
disable-model-invocation: true

styled-jsx Audit Skill

Audit for correctness and best practices.

Check for

  • Incorrect use of global styles
  • Excessive :global selectors or broad resets
  • Deep descendant selectors
  • Unsafe CSS interpolations
  • Missing focus-visible states on interactive controls
  • Styling via brittle DOM structure
  • Missing className pass-through when needed

Output expectations

  • Findings (bullets)
  • Severity (low/med/high)
  • Refactor plan with minimal changes
  • Test/story updates needed