preview-json

preview-json is a skill for Claude Code from veelenga/preview-skills. It costs 21 tokens per session (1,188 once invoked), scanned A, original, MIT.

A browser viewer for JSON and JSONL files. JSON is a common format for structured data, while JSONL stores one JSON record per line; the viewer displays them with highlighting, collapsible sections, and search.

In plain words
What is it for?
Use it to preview JSON or JSONL files, expand and collapse their structure, search their contents, and generate an HTML view with an optional background color.
Why use it?
It makes nested data and large records easier to inspect than plain text. Sorting is not implied; the listed features focus on navigating and searching the data.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to preview JSON or JSONL files, expand and collapse their structure, search their contents, and generate an HTML view with an optional background color.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/veelenga/preview-skills/preview-json
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add veelenga/preview-skills --skill preview-json
Clone the repo
git clone --depth 1 https://github.com/veelenga/preview-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview-json

README.md
[![agentmods](https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-json.svg)](https://agentmods.dev/skills/veelenga/preview-skills/preview-json)
Your own site
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-json"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-json.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,188 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.01188
Opus 5 $0.00010 $0.00594
Sonnet 5 $0.00004 $0.00238
Haiku 4.5 $0.00002 $0.00119

Measured 8d ago against content hash cf266c2ff93e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

preview-json scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (config.sh, lib/browser-utils.sh, lib/content-utils.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/preview-json/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Preview JSON Skill

Interactive JSON/JSONL viewer that generates HTML visualizations with syntax highlighting, collapsible tree structure, and search functionality.

Agent Usage

When the user asks to preview a JSON or JSONL file, DO NOT build HTML manually. Use the Bash tool to execute this skill's run.sh script:

# Preview a JSON file
./run.sh data.json

# Preview a JSONL file
./run.sh logs.jsonl

# Pipe content
cat data.json | ./run.sh

The script handles all HTML generation and automatically opens the result in the browser. Do NOT open the file manually to avoid duplicate tabs.

Usage

# Preview a JSON file
/preview-json data.json

# Preview a JSONL file (JSON Lines format)
/preview-json logs.jsonl

# Pipe JSON data (preferred for temporary content)
cat data.json | /preview-json
echo '{"name":"test","value":123}' | /preview-json

# Pipe JSONL data
echo '{"id":1,"name":"Alice"}
{"id":2,"name":"Bob"}' | /preview-json

# With custom background color
/preview-json data.json --background "#1e1e1e"

Best Practice: For temporary or generated content, prefer piping over creating temporary files. This avoids cluttering your filesystem and the content is automatically cleaned up.

Options

The script works with sensible defaults but supports these flags for flexibility:

  • -o, --output PATH - Custom output path
  • --no-browser - Skip browser, output file path only

Features

  • Syntax highlighting with color-coded types:
    • Strings (green)
    • Numbers (blue)
    • Booleans (orange)
    • Null values (red)
    • Keys (purple)
  • Collapsible tree view for nested structures
  • Search through keys and values in real-time
  • Copy values to clipboard with one click
  • Pretty formatted with proper indentation
  • Type indicators for each value
  • Line numbers for easy reference
  • Responsive design adapts to screen size

When to Use This Skill

Use this skill when the user wants to:

  • View and explore JSON data files
  • View JSONL (JSON Lines) log files or streaming data
  • Inspect API responses
  • Debug JSON structures
  • Verify JSON formatting
  • Share formatted JSON data
  • Analyze newline-delimited JSON exports

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 206 lines · 21 tokens per session scan A cf266c2ff93e

Subscribe to this mod's changes

preview-json is a skill published in the GitHub repository veelenga/preview-skills (8 stars, last pushed 28d ago), licensed MIT. It adds 21 tokens to every session and 1,188 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-browser

A command-line browser automation tool for AI agents. It can navigate websites and operate Electron desktop applications, using a compact view of page controls and their references.

cafe3310/public-agent-skills · 36 tokens

twitter-watch

A workflow for collecting interaction data from a series of Twitter posts and combining it into a report. It uses a visible, persistent browser session so an already logged-in Twitter account can be reused.

cafe3310/public-agent-skills · 18 tokens

browser-testing

A browser-based end-to-end testing workflow, where end-to-end testing means checking a complete user-facing feature through the browser, with test cases stored in Markdown files.

cafe3310/public-agent-skills · 34 tokens

playwright-best-practices

Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions…

firstsun-dev/skills · 214 tokens

firecrawl-search

Web search with full page content extraction. Use this skill whenever the user asks to search the web, find articles, research a topic, look something up, find recent news, discover sources, or says "search for", "find me", "look up", "what are people saying about", or "find articles about". Returns real search…

firstsun-dev/skills · 93 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

x-cmd/skill · 35 tokens