360 Secure SkillHub
360 安全技能中心

jsonl-validator

该 Skill 通过 Node 脚本读取指定 JSONL 文件,逐行校验 JSON 合法性,输出有效与无效行数量、ts 字段时间范围、高频 JSON 键以及最多 5 条无效行示例,并给出对应退出码,全程只读不修改文件。

分类:数据
147258xuan
147258xuan
热度 4.31
最近更新 2026-11-13 18:45:15

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add 147258xuan/jsonl-validator
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
jsonl-validator
description
Validate JSONL files for broken lines, summarize counts, time ranges, and key distributions. Use when checking evolution logs, memory graph exports, or any line-delimited JSON data.

JSONL Validator

Validate one JSONL file and report:

  • valid/invalid line counts
  • time range from ts fields, if present
  • top JSON keys by frequency
  • up to 5 invalid line examples

Usage

node skills/jsonl-validator/scripts/validate-jsonl.js <path/to/file.jsonl>

Exit codes:

  • 0 — all non-empty lines are valid JSON
  • 2 — invalid JSON lines found
  • 1 — usage or missing file error

Notes

  • This skill is read-only; it does not modify files.
  • Large files are read fully into memory; for very large JSONL, prefer a streaming approach.