返回顶部
j

json-linterJSON语法校验

Validates JSON syntax across the workspace. Use this skill to check for syntax errors in configuration files, memory files, or data assets.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
789
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

json-linter

JSON 校验工具

一个简单的工具,用于递归扫描工作区中的 .json 文件,并使用 JSON.parse() 验证其语法。

使用方法

bash

扫描整个工作区(从当前工作目录开始)


node skills/json-linter/index.js

扫描指定目录

node skills/json-linter/index.js --dir path/to/dir

输出结果

JSON 报告包含以下内容:

  • - scannedat:时间戳
  • totalfiles:扫描的 .json 文件总数
  • validfiles:有效文件数量
  • invalidfiles:无效文件数量
  • errors:错误对象数组:

- path:文件的相对路径
- error:错误信息(例如:Unexpected token } in JSON at position 42)

输出示例

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
}
]
}

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 json-linter-1776420061 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 json-linter-1776420061 技能

通过命令行安装

skillhub install json-linter-1776420061

下载

⬇ 下载 json-linter v1.0.0(免费)

文件大小: 3.46 KB | 发布时间: 2026-4-17 18:35

v1.0.0 最新 2026-4-17 18:35
Initial release of json-linter.

- Scans `.json` files recursively in the workspace or a specified directory.
- Validates JSON syntax using `JSON.parse()`.
- Generates a JSON summary report including scan time, file counts, and error details for invalid files.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部