360 Secure SkillHub
360 安全技能中心

Parser

通过 scripts/script.sh 的 json、csv、xml、yaml、lines、split、extract、stats 子命令解析多种格式文件:JSON 可用 jq 或内置解析,XML 支持 XPath、YAML 支持键路径,CSV 可按列名或列号提取,另有正则提取、行过滤、分隔符切分与文件统计,解析结果可缓存到本地目录。

ckchzh
ckchzh
热度 71.07
最近更新 2026-05-11 17:32:20
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理 / 文件转换 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add parser
Metadata
name
parser
version
3.0.2
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
license
MIT-0
tags
["parser","tool","utility"]
description
Parse JSON, CSV, XML, and logs into structured output. Use when converting formats, validating structure, extracting fields, analyzing nested data.

parser

Parse and extract data from various file formats.

Commands

json

Parse JSON files (uses jq if available, else built-in)

scripts/script.sh json

csv

Parse CSV files, optionally extract a column by name or number

scripts/script.sh csv

xml

Parse XML files with optional XPath (requires python3)

scripts/script.sh xml

yaml

Parse YAML files with optional key path (requires python3)

scripts/script.sh yaml

lines

Filter lines by pattern (grep-like, with context)

scripts/script.sh lines

split

Split file content by delimiter

scripts/script.sh split

extract

Extract text matching a regex pattern

scripts/script.sh extract

stats

Show file statistics (lines, words, chars, encoding)

scripts/script.sh stats

Requirements

  • python3
  • jq (optional)

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

Data Storage

Parse results can be cached in ~/.local/share/parser/.