json-linter

Web & Frontend Development
v1.0.0
Benign

Validates JSON syntax across the workspace.

481 downloads481 installsby @wanng-ide

Setup & Installation

Install command

clawhub install wanng-ide/json-linter

If the CLI is not installed:

Install command

npx clawhub@latest install wanng-ide/json-linter

Or install with OpenClaw CLI:

Install command

openclaw skills install wanng-ide/json-linter

or paste the repo link into your assistant's chat

Install command

https://github.com/openclaw/skills/tree/main/skills/wanng-ide/json-linter

What This Skill Does

Recursively scans a workspace for .json files and validates each one using JSON.parse(). Returns a structured report listing which files passed, which failed, and the exact parse error for each failure.

Scanning the entire workspace in one command surfaces all JSON errors at once instead of discovering them one file at a time at runtime.

When to Use It

  • Catching broken config files before a deployment
  • Auditing a repo after a bulk find-and-replace on JSON
  • Validating data asset files added by a non-technical teammate
  • Checking memory files for syntax errors after manual edits
  • Running a quick sanity check after merging multiple branches
View original SKILL.md file
# JSON Linter

A simple utility to recursively scan the workspace for `.json` files and validate their syntax using `JSON.parse()`.

## Usage

```bash
# Scan the entire workspace (from current working directory)
node skills/json-linter/index.js

# Scan a specific directory
node skills/json-linter/index.js --dir path/to/dir
```

## Output

JSON report containing:
- `scanned_at`: Timestamp
- `total_files`: Number of `.json` files scanned
- `valid_files`: Number of valid files
- `invalid_files`: Number of invalid files
- `errors`: Array of error objects:
  - `path`: Relative path to file
  - `error`: Error message (e.g., "Unexpected token } in JSON at position 42")

## Example Output

```json
{
  "scanned_at": "2026-02-14T21:45:00.000Z",
  "total_files": 150,
  "valid_files": 149,
  "invalid_files": 1,
  "errors": [
    {
      "path": "config/broken.json",
      "error": "Unexpected token } in JSON at position 42"
    }
  ]
}
```

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Catching broken config files before a deployment

AGENT
  1. 1Catching broken config files before a deployment
  2. 2Auditing a repo after a bulk find-and-replace on JSON
  3. 3Validating data asset files added by a non-technical teammate
  4. 4Checking memory files for syntax errors after manual edits
  5. 5Running a quick sanity check after merging multiple branches
OUTPUT
Validates JSON syntax across the workspace.

Share this skill

Security Audits

VirusTotalBenign
OpenClawBenign
View full report

These signals reflect official OpenClaw status values. A Suspicious status means the skill should be used with extra caution.

Details

LanguageMarkdown
Last updatedFeb 25, 2026