check-vue-style — check-vue-style工具
v1.0.0检查 Vue 单文件组件(.vue)中的 CSS 样式规范问题并输出提示。用于用户提到样式规范检查、CSS 代码审查、Vue 页面样式质量巡检时。
0· 62·0 当前·0 累计
安全扫描
OpenClaw
安全
high confidenceThe skill's code and instructions are consistent with its stated purpose (local lint-style checks of .vue <style> blocks), with no network calls or credential access; the only minor mismatch is that the shipped script requires Node.js but the skill metadata does not declare that binary requirement.
评估建议
This skill appears to do exactly what it says: run a local style-check over .vue files and print warnings. Before installing or running it: (1) ensure you run it from the project root (it operates on process.cwd()); (2) install Node.js if you expect to run the script (the metadata omits this requirement); (3) review the script if you have sensitive/untrusted repositories (it reads files under the repo but does not send data anywhere); (4) if you prefer an existing linter, consider using or exten...详细分析 ▾
ℹ 用途与能力
Skill name/description (Vue style checking) matches the included script and instructions. Minor inconsistency: metadata lists no required binaries, but the script explicitly requires Node.js and will exit if Node isn't present.
✓ 指令范围
SKILL.md instructs only to run the provided local script in the project root. The script reads .vue files under the current directory (skips node_modules, .git, dist, build), reports style-related warnings, and does not access other system files, environment variables, or external endpoints.
✓ 安装机制
No install spec — instruction-only plus a local script. No downloads or external installers; the script runs embedded Node code. Low install risk.
✓ 凭证需求
The skill requests no environment variables or credentials. The script does not read or require secrets or config paths. (It does require a runtime dependency: Node.js.)
✓ 持久化与权限
Skill does not request persistent/always-on presence, does not modify other skills or system-wide configuration, and only runs when invoked.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/4/7
用于自动巡检 Vue 单文件组件(.vue)中的 CSS 样式规范问题。它会扫描 <style> 区块,识别如缺少 scoped、!important 滥用、ID 选择器、深度选择器、类名非 kebab-case、嵌套层级过深等常见问题
● 无害
安装命令 点击复制
官方npx clawhub@latest install check-vue-style
镜像加速npx clawhub@latest install check-vue-style --registry https://cn.clawhub-mirror.com
技能文档
适用场景
当用户希望检查.vue 文件中的样式规范问题(如 !important 滥用、ID 选择器、非 kebab-case 类名、深度选择器、缺少 scoped)时,使用本技能。一、快速检查流程
1) 执行样式巡检脚本
在项目根目录执行:bash ./scripts/check-vue-style.sh
2) 理解输出结果
输出格式为:文件路径:行号: ⚠️ 问题说明
3) 修复后复查
修复完成后再次运行同一命令,直到没有警告为止。二、当前规则(默认内置)
脚本会对每个.vue 文件的 区块执行以下检查:- 检查是否缺少
scoped - 检查是否使用
!important - 检查是否使用 ID 选择器(如
#app) - 检查是否使用深度选择器(
/deep/、>>>、::v-deep) - 检查类名是否为 kebab-case(如
.用户-card-title) - 检查样式嵌套层级是否超过 3 层(粗略规则)
三、执行约定
- 默认扫描当前目录下全部
.vue文件。 - 若脚本返回非 0,表示发现规范问题,需要提示并给出修复建议。
- 如项目已有 Stylelint,可在此脚本基础上再补充团队规则。
Resources
scripts/check-vue-样式.sh
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制