360 Secure SkillHub
360 安全技能中心

extract-json

通过 ZeroGPU 命令行工具从自由文本中按用户给出的字段 schema(name::type::description)抽取指定字段,输出以分组为键的 JSON 对象。需用 Bash 执行 zerogpu extract_json,并以 heredoc 包装源文本、单引号传入 schema。未提供字段校验、错误处理或认证说明。

zerogpu
zerogpu
热度 9.17
最近更新 2026-07-14 04:19:01
分类:效率依赖:代码执行 / 第三方 API应用场景:数据处理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add extract-json
Metadata
name
extract-json
description
Schema-driven structured JSON extraction via ZeroGPU. Use when the user wants to pull specific named fields out of free text into a JSON object — contact info, invoice details, order data, profile attributes — defined by a per-field type/description schema.
argument-hint
<text> -s '<json schema>'
allowed-tools
Bash(zerogpu extract_json *)

Run structured JSON extraction:

zerogpu extract_json $ARGUMENTS

Quoting (required, to survive shell parsing of arbitrary user text): format $ARGUMENTS with the source text wrapped via heredoc command substitution, then flags after. Inside the heredoc, paste the user's text verbatim — do not escape:

"$(cat <<'ZGPU_T'
<the source text, verbatim, multi-line and special chars all OK>
ZGPU_T
)" -s '{"contact":["name::str::Full name","email::str::Email address","phone::str::Phone number"]}'

Schema is required, single-quoted JSON. Each field is name::type::description. Output is a JSON object keyed by group, with extracted field values.

Savings note: only if the command output literally contains a line starting with 💰 ZeroGPU savings, append that exact line, unchanged, as the last line of your reply. If no such line is present, say nothing about savings.