用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/veelenga/preview-skills --skill preview-json命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | preview-json |
| description | Render and preview JSON files in browser with syntax highlighting, collapsible tree view, and search |
| user-invocable | true |
| commands | ["preview-json"] |
Interactive JSON/JSONL viewer that generates HTML visualizations with syntax highlighting, collapsible tree structure, and search functionality.
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.
# 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.
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 onlyUse this skill when the user wants to:
Natural language requests:
.json or .jsonlThe skill generates a standalone HTML file at:
.preview-skills/json/{filename}.html
The file is self-contained and can be:
jq to validate: cat file.json | jq .cat file.jsonl | jq -c '.' > /dev/nullThis skill is standalone and includes all dependencies:
lib/templates/To modify the skill:
config.sh for configurationtemplates/scripts/json-renderer.js for behaviortemplates/styles/json.css for stylingrun.sh to test changes