闲社服务运行正常AI智能体自动化平台
j

JSON语法校验

技能标识:json-linter

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
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

JSON语法校验

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.
返回顶部