Token导航 LogoToken导航

Agent Skill · 研究检索

gemini-json-parsing(Gemini JSON parsing 搜索)

gemini-json-parsing 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gemini-json-parsing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 70,176。

总安装 212周安装 9GitHub Stars 61下载 74核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gemini-json-parsing(Gemini JSON parsing 搜索)
来源仓库:https://github.com/melodic-software/claude-code-plugins
仓库路径:skills/gemini-json-parsing
安装命令:
npx skills add https://github.com/melodic-software/claude-code-plugins --skill gemini-json-parsing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/melodic-software/claude-code-plugins --skill gemini-json-parsing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。gemini-json-parsing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。适合根据关键词快速定位候选结果或来源线索。通过 GitHub 安装,建议确认搜索范围和结果过滤方式。可能触发联网请求,需评估数据源可靠性和更新频率。

适用于 Codex、Claude、Cursor 和 Gemini CLI 研究场景。

来源仓库内路径:skills/gemini-json-parsing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/melodic-software/claude-code-plugins --skill g…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gemini-json-parsing 怎么安装?

在终端执行 npx skills add https://github.com/melodic-software/claude-code-plugins --skill gemini-json…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gemini-json-parsing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gemini-json-parsing 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

gemini-json-parsing 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gemini-json-parsing 用的人多吗?

公开数据是累计安装 212 次,近一周安装 9 次,下载 74 次,GitHub 61 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gemini-json-parsing 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
gemini-json-parsing

Gemini JSON parsing 搜索 · 本页

21261需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Gemini JSON Parsing

🚨 MANDATORY: Invoke gemini-cli-docs First

STOP - Before providing ANY response about Gemini JSON output: 1. INVOKE gemini-cli-docs skill 2. QUERY for the specific output format topic 3. BASE all responses EXCLUSIVELY on official documentation loaded

Overview

Skill for parsing Gemini CLI's structured output formats. Essential for integration workflows where Claude needs to process Gemini's responses programmatically.

When to Use This Skill

Keywords: parse gemini output, json output, stream json, gemini stats, token usage, jq parsing, gemini response

Use this skill when:

  • Extracting responses from Gemini JSON output
  • Analyzing token usage and costs
  • Parsing tool call statistics
  • Handling errors from Gemini CLI
  • Building automation pipelines

Output Formats

Standard JSON (--output-format json)

Single JSON object returned after completion:

{
  "response": "The main AI-generated content",
  "stats": {
    "models": {
      "gemini-2.5-pro": {
        "api": {
          "totalRequests": 2,
          "totalErrors": 0,
          "totalLatencyMs": 5053
        },
        "tokens": {
          "prompt": 24939,
          "candidates": 20,
          "total": 25113,
          "cached": 21263,
          "thoughts": 154,
          "tool": 0
        }
      }
    },
    "tools": {
      "totalCalls": 1,
      "totalSuccess": 1,
      "totalFail": 0,
      "totalDurationMs": 1881,
      "totalDecisions": {
        "accept": 0,
        "reject": 0,
        "modify": 0,
        "auto_accept": 1
      },
      "byName": {
        "google_web_search": {
          "count": 1,
          "success": 1,
          "fail": 0,
          "durationMs": 1881
        }
      }
    },
    "files": {
      "totalLinesAdded": 0,
      "totalLinesRemoved": 0
    }
  },
  "error": {
    "type": "ApiError",
    "message": "Error description",
    "code": 500
  }
}

Stream JSON (--output-format stream-json)

Newline-delimited JSON (JSONL) with real-time events:

Event TypeDescriptionFields
initSession startsession_id, model, timestamp
messageUser/assistant messagesrole, content, timestamp
tool_useTool call requeststool_name, tool_id, parameters
tool_resultTool execution resultstool_id, status, output
errorNon-fatal errorstype, message
resultFinal outcomestatus, stats

Example stream:

{"type":"init","timestamp":"2025-10-10T12:00:00.000Z","session_id":"abc123","model":"gemini-2.5-flash"}
{"type":"message","role":"user","content":"List files","timestamp":"2025-10-10T12:00:01.000Z"}
{"type":"tool_use","tool_name":"Bash","tool_id":"bash-123","parameters":{"command":"ls -la"}}
{"type":"tool_result","tool_id":"bash-123","status":"success","output":"file1.txt\nfile2.txt"}
{"type":"message","role":"assistant","content":"Here are the files...","delta":true}
{"type":"result","status":"success","stats":{"total_tokens":250}}

Common Extraction Patterns

Extract Response Text

# Get main response
gemini "query" --output-format json | jq -r '.response'

# With error handling
result=$(gemini "query" --output-format json)
if echo "$result" | jq -e '.error' > /dev/null 2>&1; then
  echo "Error: $(echo "$result" | jq -r '.error.message')"
else
  echo "$result" | jq -r '.response'
fi

Token Statistics

# Total tokens used
echo "$result" | jq '.stats.models | to_entries | map(.value.tokens.total) | add'

# Cached tokens (cost savings)
echo "$result" | jq '.stats.models | to_entries | map(.value.tokens.cached) | add'

# Billable tokens
total=$(echo "$result" | jq '.stats.models | to_entries | map(.value.tokens.total) | add')
cached=$(echo "$result" | jq '.stats.models | to_entries | map(.value.tokens.cached) | add')
echo "Billable: $((total - cached))"

# Tokens by model
echo "$result" | jq '.stats.models | to_entries[] | "\(.key): \(.value.tokens.total) tokens"'

Tool Call Analysis

# Total tool calls
echo "$result" | jq '.stats.tools.totalCalls'

# List tools used
echo "$result" | jq -r '.stats.tools.byName | keys | join(", ")'

# Tool success rate
total=$(echo "$result" | jq '.stats.tools.totalCalls')
success=$(echo "$result" | jq '.stats.tools.totalSuccess')
echo "Success rate: $((success * 100 / total))%"

# Detailed tool stats
echo "$result" | jq '.stats.tools.byName | to_entries[] | "\(.key): \(.value.count) calls, \(.value.durationMs)ms"'

Model Usage

# List models used
echo "$result" | jq -r '.stats.models | keys | join(", ")'

# Model latency
echo "$result" | jq '.stats.models | to_entries[] | "\(.key): \(.value.api.totalLatencyMs)ms"'

# Request counts
echo "$result" | jq '.stats.models | to_entries[] | "\(.key): \(.value.api.totalRequests) requests"'

Error Handling

# Check for errors
if echo "$result" | jq -e '.error' > /dev/null 2>&1; then
  error_type=$(echo "$result" | jq -r '.error.type // "Unknown"')
  error_msg=$(echo "$result" | jq -r '.error.message // "No message"')
  error_code=$(echo "$result" | jq -r '.error.code // "N/A"')
  echo "Error [$error_type]: $error_msg (code: $error_code)"
  exit 1
fi

File Modifications

# Lines changed
echo "$result" | jq '"Added: \(.stats.files.totalLinesAdded), Removed: \(.stats.files.totalLinesRemoved)"'

Stream Processing

Filter by Event Type

# Get only tool results
gemini --output-format stream-json -p "query" | jq -r 'select(.type == "tool_result")'

# Get only errors
gemini --output-format stream-json -p "query" | jq -r 'select(.type == "error")'

# Get assistant messages
gemini --output-format stream-json -p "query" | jq -r 'select(.type == "message" and .role == "assistant") | .content'

Real-time Monitoring

# Watch tool calls as they happen
gemini --output-format stream-json -p "analyze code" | while read line; do
  type=$(echo "$line" | jq -r '.type')
  case "$type" in
    tool_use)
      tool=$(echo "$line" | jq -r '.tool_name')
      echo "[TOOL] Calling: $tool"
      ;;
    tool_result)
      status=$(echo "$line" | jq -r '.status')
      echo "[RESULT] Status: $status"
      ;;
    error)
      msg=$(echo "$line" | jq -r '.message')
      echo "[ERROR] $msg"
      ;;
  esac
done

Quick Reference

Whatjq Command
Response text.response
Total tokens`.stats.models \to_entries \map(.value.tokens.total) \add`
Cached tokens`.stats.models \to_entries \map(.value.tokens.cached) \add`
Tool calls.stats.tools.totalCalls
Tools used`.stats.tools.byName \keys \join(", ")`
Models used`.stats.models \keys \join(", ")`
Error message.error.message // "none"
Error type.error.type // "none"
Lines added.stats.files.totalLinesAdded
Lines removed.stats.files.totalLinesRemoved
Total latency`.stats.models \to_entries \map(.value.api.totalLatencyMs) \add`

Complete Example

#!/bin/bash
# Analyze code and report stats

result=$(cat src/main.ts | gemini "Review this code for security issues" --output-format json)

# Check for errors
if echo "$result" | jq -e '.error' > /dev/null 2>&1; then
  echo "Error: $(echo "$result" | jq -r '.error.message')"
  exit 1
fi

# Extract response
echo "=== Security Review ==="
echo "$result" | jq -r '.response'

# Report stats
echo ""
echo "=== Stats ==="
total=$(echo "$result" | jq '.stats.models | to_entries | map(.value.tokens.total) | add // 0')
cached=$(echo "$result" | jq '.stats.models | to_entries | map(.value.tokens.cached) | add // 0')
models=$(echo "$result" | jq -r '.stats.models | keys | join(", ") | if . == "" then "none" else . end')
tools=$(echo "$result" | jq '.stats.tools.totalCalls // 0')

echo "Tokens: $total (cached: $cached)"
echo "Models: $models"
echo "Tool calls: $tools"

Test Scenarios

Scenario 1: Extract Response

Query: "How do I extract the response from Gemini JSON output?" Expected Behavior:

  • Skill activates on "parse gemini output" or "json output"
  • Provides jq extraction pattern Success Criteria: User receives .response extraction command

Scenario 2: Token Usage Analysis

Query: "How do I track token usage from Gemini CLI?" Expected Behavior:

  • Skill activates on "token usage" or "gemini stats"
  • Provides stats extraction patterns Success Criteria: User receives token calculation jq commands

Scenario 3: Stream Processing

Query: "How do I process Gemini CLI stream-json output?" Expected Behavior:

  • Skill activates on "stream json"
  • Provides JSONL processing patterns Success Criteria: User receives real-time stream processing example

References

Query gemini-cli-docs for official documentation on:

  • "json output format"
  • "stream-json output"
  • "headless mode"

Version History

  • v1.1.0 (2025-12-01): Added Test Scenarios section
  • v1.0.0 (2025-11-25): Initial release

平台分布

Codex

36.09%
按下载量换算27

Claude

31.68%
按下载量换算23

Cursor

18.8%
按下载量换算14

Gemini CLI

9.23%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills