SWC Config Validator

v1.0.0

Validate SWC config files (.swcrc, package.json#swc) for parser settings, transform conflicts, module type issues, and best practices. Use when validating SW...

0· 78·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for charlie-morrison/swc-config-validator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "SWC Config Validator" (charlie-morrison/swc-config-validator) from ClawHub.
Skill page: https://clawhub.ai/charlie-morrison/swc-config-validator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install swc-config-validator

ClawHub CLI

Package manager switcher

npx clawhub@latest install swc-config-validator
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description, SKILL.md commands, and the included Python script all focus on parsing and validating .swcrc / package.json#swc; required capabilities (reading those files, JSON parsing) align with the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run the included Python script against local config files (.swcrc or package.json). The script reads and parses files, reports findings, and returns CI-style exit codes — all within the expected scope.
Install Mechanism
No install spec; instruction-only skill with a bundled Python script. It declares no external packages and the script states it uses only stdlib. This is proportionate for a linter-style tool.
Credentials
No environment variables, credentials, or config paths are requested. The tool only needs permission to read the target files, which is appropriate for its function.
Persistence & Privilege
always is false and the skill does not request persistent/system-wide changes. Autonomous invocation is allowed (platform default) but there are no other elevated privileges requested.
Assessment
The skill appears coherent and limited to validating SWC configs: it reads local files and reports linting-style findings. Before installing, confirm the skill author/source (source/homepage are unknown) and review the bundled script yourself if you can. Run it in the repository you intend to scan (not a system or home directory) or in a sandbox/CI runner for the first run. Ensure you have Python 3.8+ available. Because the provided file view was truncated in the review, if you need maximum assurance, inspect the full scripts/swc_config_validator.py file to verify it contains no network calls, subprocess execution, or writes outside its working directory.

Like a lobster shell, security has layers — review code before you run it.

latestvk977hhkcjfdq19a0dx6qf1e28h85be00
78downloads
0stars
1versions
Updated 6d ago
v1.0.0
MIT-0

SWC Config Validator

Validate .swcrc and package.json#swc for parser errors, invalid targets, transform conflicts, module type issues, minification problems, and best practices. Supports text, JSON, and summary output formats with CI-friendly exit codes.

Commands

# Full validation (all 22+ rules)
python3 scripts/swc_config_validator.py validate .swcrc

# Quick syntax/structure check only
python3 scripts/swc_config_validator.py check .swcrc

# Explain config in human-readable form
python3 scripts/swc_config_validator.py explain .swcrc

# Suggest improvements
python3 scripts/swc_config_validator.py suggest .swcrc

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

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

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

# Validate from package.json#swc
python3 scripts/swc_config_validator.py validate package.json

Rules (22+)

#CategorySeverityRule
S1StructureErrorFile not found or unreadable
S2StructureErrorEmpty config
S3StructureErrorInvalid JSON syntax
S4StructureWarningUnknown top-level keys
S5StructureWarningMissing jsc key (most configs need it)
J1JSC ConfigErrorInvalid parser syntax (must be ecmascript or typescript)
J2JSC ConfigWarningJSX enabled in parser without React transform
J3JSC ConfigWarningDeprecated loose mode in jsc.transform
J4JSC ConfigWarningMissing target (no compilation target specified)
J5JSC ConfigErrorInvalid target value (not es3/es5/es2015-es2024/esnext)
M1ModulesErrorUnknown module type
M2ModulesWarningisModule: false with ESM module type
M3ModulesWarningCommonJS module with ESM-only parser features
T1TransformErrorReact transform without parser.jsx enabled
T2TransformWarningLegacy decorators without decoratorsBeforeExport
T3TransformWarningConflicting useDefineForClassFields with TypeScript
T4TransformWarningDeprecated constModules in jsc.experimental
N1MinificationWarningMinification enabled with compress: false
N2MinificationWarningMangle enabled without compress
N3MinificationWarningDrop console in development config
B1Best PracticesWarningsourceMaps not configured
B2Best PracticesInfoNo env config for different environments

Output Formats

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

Exit Codes

  • 0: No errors (warnings/info 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)

Supported Targets

es3, es5, es2015 through es2024, esnext

Supported Module Types

es6, commonjs, umd, amd, nodenext, systemjs

Valid Top-Level Keys

$schema, jsc, module, minify, env, isModule, sourceMaps, inlineSourcesContent, emitSourceMapColumns, inputSourceMap, test, exclude, filename

Comments

Loading comments...