styles-lint
它能做什么
这个技能设置一个 CSS 和 SCSS 检查工具,检查样式表中的错误和样式规则,并能自动修复许多问题。它面向希望样式表一致、整洁的前端团队。
适用场景
- ✓你请智能体为项目添加样式检查工具的时候。
- ✓团队的样式表不一致,或存在被遗漏的错误的时候。
- ✓你希望在提交或部署代码之前自动运行样式检查的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/styles-lint/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为项目设置 CSS 检查工具,让样式错误能被自动发现吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用标准配置安装 Stylelint,并在需要的地方添加 SCSS 支持。然后它会把检查工具接入你的编辑器、提交前检查和持续集成流程。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Lint CSS and SCSS files
CSS linting catches syntax errors, enforces consistent coding standards, and prevents maintainability issues before they reach production.
Quick Reference
- Install Stylelint with stylelint-config-standard
- Add SCSS support with stylelint-config-standard-scss
- Enable auto-fix in your IDE and pre-commit hooks
- Include in CI/CD pipeline to catch issues early
Check
Set up CSS/SCSS linting tools like Stylelint to automatically detect syntax errors, enforce coding standards, and maintain consistent code quality.
Fix
Configure Stylelint with appropriate rules and integrate it into your build process and code editor for real-time error detection and fixing.
Explain
Explain how CSS linting prevents errors, enforces consistent coding standards, and improves maintainability of stylesheets across the team.
Code Review
Review stylesheets, component styles, and responsive states related to Lint CSS and SCSS files. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/styles-lint
常见问题
什么是 Stylelint?
它是一个检查 CSS 和 SCSS 文件中的错误和编码标准的工具。
它能自动修复问题吗?
这个技能提到可以在编辑器和提交前钩子中启用自动修复。
应该在哪里运行检查?
这个技能建议在编辑器、提交时以及持续集成流程中运行,以便及早发现问题。
详情
作者的原始描述
Use when reviewing stylesheets, component styles, and responsive behavior related to Lint CSS and SCSS files. Check the rendered layout across breakpoints and interaction states before proposing a fix.
热度
- GitHub 星标
- 75k
- 排名
- #3039
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。