← 返回 Skills 市场
charlie-morrison

Babel Config Validator

作者 charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
100
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install babel-config-validator
功能描述
Validate Babel config files (babel.config.json, .babelrc, .babelrc.json, package.json#babel) for deprecated presets, plugin conflicts, ordering issues, and b...
使用说明 (SKILL.md)

Babel Config Validator

Validate babel.config.json, .babelrc, .babelrc.json, and package.json#babel for deprecated presets/plugins, conflicting transforms, ordering issues, and best practices. Supports text, JSON, and summary output formats with CI-friendly exit codes.

Commands

# Full validation (all 24+ rules)
python3 scripts/babel_config_validator.py validate babel.config.json

# Quick syntax-only check (structure rules only)
python3 scripts/babel_config_validator.py check .babelrc

# Explain config in human-readable form
python3 scripts/babel_config_validator.py explain babel.config.json

# Suggest improvements
python3 scripts/babel_config_validator.py suggest package.json

# JSON output (CI-friendly)
python3 scripts/babel_config_validator.py validate .babelrc --format json

# Summary only (pass/fail + counts)
python3 scripts/babel_config_validator.py validate .babelrc --format summary

# Strict mode (warnings become errors)
python3 scripts/babel_config_validator.py validate .babelrc --strict

Rules (24+)

# Category Severity Rule
S1 Structure Error File not found or unreadable
S2 Structure Error Empty config or no content
S3 Structure Warning Both babel.config and .babelrc present (conflict)
S4 Structure Warning Unknown top-level config keys
S5 Structure Error Invalid JSON syntax
P1 Presets Error Deprecated preset (es2015, es2016, es2017, latest, stage-*)
P2 Presets Warning Preset ordering matters (@babel/preset-typescript before @babel/preset-env)
P3 Presets Warning Duplicate presets
P4 Presets Error Unknown/misspelled preset name
P5 Presets Warning Missing @babel/preset-env (most configs need it)
L1 Plugins Error Deprecated plugin (@babel/plugin-proposal-* → built-in)
L2 Plugins Warning Duplicate plugins
L3 Plugins Warning Plugin ordering conflict (decorators before class-properties)
L4 Plugins Warning Conflicting plugins (transform-runtime + external-helpers)
L5 Plugins Warning Plugin without @babel/ scope (may be community or typo)
M1 Modules Warning modules: false in preset-env without bundler context
M2 Modules Warning sourceType mismatch with modules setting
M3 Modules Warning Conflicting module transforms
E1 Env/Overrides Warning Empty env config section
E2 Env/Overrides Warning Override without test pattern
E3 Env/Overrides Warning Unknown env name (not development/production/test)
B1 Best Practices Warning loose mode inconsistency across plugins
B2 Best Practices Warning Missing targets/browserslist (unoptimized output)
B3 Best Practices Warning useBuiltIns without corejs version
B4 Best Practices Warning corejs version outdated (\x3C 3)

Output Formats

  • text (default): Human-readable with colors and severity icons
  • json: Machine-parseable JSON array of findings
  • summary: Pass/fail with error/warning counts

Exit Codes

  • 0: No errors (warnings only or clean)
  • 1: One or more errors found
  • 2: File not found or invalid input

Requirements

  • Python 3.8+
  • No external dependencies (pure stdlib)
安全使用建议
This skill appears safe and does what it claims: run the included Python script against Babel config files to get warnings/errors. Before running, ensure you execute it on projects you trust (it will read the target file and other Babel-related files in the same directory). No network calls, installs, or secret access are present, but if you need extra assurance you can open and review scripts/babel_config_validator.py yourself (it uses only the Python stdlib).
功能分析
Type: OpenClaw Skill Name: babel-config-validator Version: 1.0.0 The babel-config-validator skill is a legitimate utility for auditing Babel transpiler configurations. The core logic in scripts/babel_config_validator.py uses only the Python standard library to parse and validate JSON/JSONC files for deprecated presets, plugin conflicts, and best practices. There are no indicators of data exfiltration, network activity, or malicious execution patterns, and the SKILL.md instructions are strictly aligned with the tool's stated purpose.
能力评估
Purpose & Capability
Name/description match the included script and runtime instructions. The tool only reads and analyzes Babel config files and reports findings; it does not require unrelated credentials, binaries, or services.
Instruction Scope
SKILL.md instructs running the bundled Python script on local config files. The script only reads the specified file and looks for sibling config files in the same directory (expected for detecting config conflicts). It does not instruct broad data collection or transmission.
Install Mechanism
No install steps are declared and the code is pure Python stdlib. No downloads, package manager installs, or archive extraction are present in the manifest.
Credentials
The skill requests no environment variables, credentials, or config paths. The script reads files the user points it at and sibling files in the same directory—this is proportionate to a config linter.
Persistence & Privilege
Skill is not always-enabled and does not attempt to modify other skills or system configuration. It performs read-only analysis of local files and does not persist credentials or enable itself automatically.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install babel-config-validator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /babel-config-validator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: 24+ rules for babel.config.json, .babelrc, package.json#babel validation
元数据
Slug babel-config-validator
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Babel Config Validator 是什么?

Validate Babel config files (babel.config.json, .babelrc, .babelrc.json, package.json#babel) for deprecated presets, plugin conflicts, ordering issues, and b... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 100 次。

如何安装 Babel Config Validator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install babel-config-validator」即可一键安装,无需额外配置。

Babel Config Validator 是免费的吗?

是的,Babel Config Validator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Babel Config Validator 支持哪些平台?

Babel Config Validator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Babel Config Validator?

由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。

💬 留言讨论