Agent skill

JSON UI

by actionbook in actionbook/actionbook

CRITICAL: Use for json-ui component rendering and development.

Apache-2.0Auto-check passedFrontend & Design

Install JSON UI

skills CLI
$ npx skills add actionbook/actionbook --skill json-ui -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install actionbook/actionbook json-ui --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/actionbook/actionbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/playground/json-ui-skill .claude/skills/json-ui && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
json-ui
GitHub stars
1.6k
Token cost
~2.7k tokens
SKILL.md length
792 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

CRITICAL: Use for json-ui component rendering and development.

  • Works in 3 steps: Read the relevant source file(s) listed… → If file read fails: Inform user… → Still answer based on SKILL.md patterns…
  • Json-ui component rendering and development
  • SKILL.md covers Quick Reference, Documentation, IMPORTANT: Documentation… and Architecture, plus 8 more sections
  • Calls pnpm and node

What it does

JSON UI is an agent skill from actionbook/actionbook. CRITICAL: Use for json-ui component rendering and development. Triggers on: json-ui, json render, component catalog, report render, HTML report, I18nString, i18n, bilingual, language switch, dual language, PaperHeader, AuthorList, Abstract, MetricsGrid, Section, Highlight, Zod schema, catalog.ts, cli.ts, components/index.tsx, "how to add a component", "how to render JSON", JSON 渲染, 组件目录, 报告渲染, 多语言, 中英文切换

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering React components, Internationalization and Translation. It works with Zod and React. The repository describes itself as: Let your AI agent get the sources behind logins and paywalls. The licence is Apache-2.0.

When your agent uses it

  • Json-ui component rendering and development
  • Component catalog
  • Language switch
  • Components/index.tsx

Example prompts

  • “how to add a component”
  • “how to render JSON”
  • “/json-ui”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read the relevant source file(s) listed above
  2. If file read fails: Inform user "本地文档不完整,建议更新"
  3. Still answer based on SKILL.md patterns + built-in knowledge

What it can do on your machine

Read from SKILL.md and the folder at commit 0e31254. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

JSON UI loads about 2.7k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 792 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from actionbook/actionbook at commit 0e31254, republished under its Apache-2.0 licence (© actionbook). 792 words, ~2,739 tokens.

Download SKILL.mdSave it as .claude/skills/json-ui/SKILL.md (or your agent's skills folder).
name
json-ui
description
CRITICAL: Use for json-ui component rendering and development. Triggers on: json-ui, json render, component catalog, report render, HTML report, I18nString, i18n, bilingual, language switch, dual language, PaperHeader, AuthorList, Abstract, MetricsGrid, Section, Highlight, Zod schema, catalog.ts, cli.ts, components/index.tsx, "how to add a component", "how to render JSON", JSON 渲染, 组件目录, 报告渲染, 多语言, 中英文切换

json-ui

Version: 1.0.0 | Last Updated: 2026-01-29

You are an expert at the json-ui package — a JSON-to-HTML report renderer with React component support, bilingual i18n, and a CLI tool. Help users by:

  • Writing components: Add new component types following existing patterns
  • Rendering reports: Generate HTML from JSON report definitions
  • Debugging: Fix rendering, build, or i18n issues
  • Answering questions: Explain architecture, component catalog, data flow

Quick Reference

TaskFilePattern
Define component schemasrc/catalog.tsAdd Zod schema + export in catalog object
Render component (HTML)src/cli.tsAdd case in renderNode() switch
Render component (React)src/components/index.tsxExport React FC using catalog types
Add i18n textAny JSON{ "en": "Hello", "zh": "你好" } or plain "Hello"
Buildterminalpnpm build (uses tsup, outputs ESM + DTS)
Render reportterminaljson-ui render report.json [-o out.html] [--no-open]

Documentation

Refer to local source files for detailed documentation:

  • packages/json-ui/src/catalog.ts - All Zod schemas and type definitions
  • packages/json-ui/src/cli.ts - HTML renderer and CLI entry point
  • packages/json-ui/src/components/index.tsx - React component implementations

IMPORTANT: Documentation Completeness Check

Before answering questions, Claude MUST:

  1. Read the relevant source file(s) listed above
  2. If file read fails: Inform user "本地文档不完整,建议更新"
  3. Still answer based on SKILL.md patterns + built-in knowledge

Architecture

JSON Report Format

Reports are trees of nodes:

json
{
  "type": "Report",
  "props": { "title": "My Report", "theme": "auto" },
  "children": [
    {
      "type": "Section",
      "props": { "title": "Overview", "icon": "bulb" },
      "children": [
        { "type": "Abstract", "props": { "text": "..." } }
      ]
    }
  ]
}
Three Rendering Layers
LayerFileOutputUse Case
Zod Schemascatalog.tsType definitionsValidation, type safety
HTML Renderercli.tsStatic HTML stringCLI render command
React Componentscomponents/index.tsxReact elementsEmbedded usage
Data Flow
JSON file → CLI parse → renderNode() recursion → HTML string → file write → browser open

Component Catalog (38 types)

Layout
ComponentKey PropsDescription
Reporttitle?, themeRoot wrapper, 800px max-width
Sectiontitle, icon?, collapsible?Collapsible section with header
Gridcols, gapCSS grid layout
Cardvariant, padding, shadowCard container
Paper Info
ComponentKey PropsDescription
PaperHeadertitle, arxivId, date, categories?Paper title + metadata
AuthorListauthors, layout?, maxVisible?Author names + affiliations
Abstracttext, highlights?, maxLength?Abstract with keyword highlighting
TagListtags, variantTag/category pills
Content
ComponentKey PropsDescription
ContributionListitems, numbered?Numbered contributions with badges
MethodOverviewsteps, showConnectors?Step-by-step method pipeline
Highlighttext, type, source?Blockquote (quote/important/warning/code)
KeyPointicon, title, descriptionIcon + title + description
CodeBlockcode, language, showLineNumbers?Syntax-highlighted code
ProsecontentMarkdown content block
Callouttype, title?, contentInfo/tip/warning/important/note box
Rich Content
ComponentKey PropsDescription
Imagesrc, alt?, caption?, width?Single image
Figureimages, caption?, label?Multi-image figure
Formulalatex, block?, label?LaTeX formula
DefinitionListitemsTerm-definition pairs
Theoremtype, number?, title?, contentTheorem/lemma/proposition
Algorithmtitle, steps, caption?Algorithm pseudocode
ResultsTablecolumns, rows, highlights?Results with best-cell highlighting
Data Display
ComponentKey PropsDescription
Metriclabel, value, trend?, icon?Single metric card
MetricsGridmetrics, cols?Grid of metric cards
Tablecolumns, rows, striped?, caption?Data table
Interactive
ComponentKey PropsDescription
LinkButtonhref, label, icon?, external?Styled link button
LinkGrouplinks, layout?Group of link buttons
Brand
ComponentKey PropsDescription
BrandHeaderbadge?, poweredBy?, showBadge?AI-generated badge header
BrandFootertimestamp, attribution?, disclaimer?Footer with attribution

I18n System

Backward-Compatible Bilingual Strings

The I18nString type accepts both plain strings and bilingual objects:

typescript
// catalog.ts
export const I18nString = z.union([
  z.string(),
  z.object({ en: z.string(), zh: z.string() }),
]);
Show full SKILL.md (311 more words)Show less
JSON Usage
json
// Plain string (backward compatible)
{ "title": "Hello World" }

// Bilingual object
{ "title": { "en": "Hello World", "zh": "你好世界" } }
HTML Rendering (cli.ts)

For HTML output, i18n strings render as dual spans:

typescript
// renderI18n() outputs:
<span class="i18n-en">Hello</span><span class="i18n-zh">你好</span>

// CSS controls visibility:
html[lang="en"] .i18n-zh { display: none; }
html[lang="zh"] .i18n-en { display: none; }

For HTML attributes (alt, title) where only a plain string works:

typescript
// resolveI18n() picks one language:
const alt = resolveI18n(props.alt, 'en'); // returns plain string
React Rendering (components/index.tsx)
typescript
// Use <I18nText> component for JSX:
<I18nText value={props.title} />

// Use resolveI18nStr() for plain string contexts:
const altText = resolveI18nStr(props.alt, 'en');
Language Switcher
  • Fixed top-right button: EN | 中文
  • Toggles <html lang="en|zh"> attribute
  • Persists choice via localStorage.getItem('json-ui-lang')

Key Patterns

Pattern 1: Adding a New Component
  1. Define schema in catalog.ts:
typescript
export const MyWidgetSchema = z.object({
  label: I18nString,        // Use I18nString for user-visible text
  count: z.number(),        // Use z.string()/z.number() for data
  variant: VariantType.default('default'),
});

// Add to catalog object:
export const catalog = {
  // ...existing...
  MyWidget: MyWidgetSchema,
} as const;

// Export type:
export type MyWidgetProps = z.infer<typeof MyWidgetSchema>;
  1. Add HTML renderer in cli.ts renderNode() switch:
typescript
case 'MyWidget': {
  const { label, count, variant } = props;
  return `<div class="my-widget ${variant}">
    <span>${renderI18n(label)}</span>
    <strong>${escapeHtml(String(count))}</strong>
  </div>`;
}
  1. Add React component in components/index.tsx:
typescript
export const MyWidget: React.FC<MyWidgetProps> = ({ label, count, variant = 'default' }) => (
  <div className={`my-widget ${variant}`}>
    <span><I18nText value={label} /></span>
    <strong>{count}</strong>
  </div>
);
Pattern 2: Handling I18n in Special Cases

For text that needs processing (e.g., Abstract highlights):

typescript
// HTML (cli.ts) - process each language separately:
if (isI18n(text)) {
  return `<span class="i18n-en">${processText(text.en)}</span>
          <span class="i18n-zh">${processText(text.zh)}</span>`;
} else {
  return processText(String(text));
}

// React (components/index.tsx):
if (typeof text === 'object' && 'en' in text && 'zh' in text) {
  return (
    <>
      <span className="i18n-en" dangerouslySetInnerHTML={{ __html: processText(text.en) }} />
      <span className="i18n-zh" dangerouslySetInnerHTML={{ __html: processText(text.zh) }} />
    </>
  );
}

Common Errors

ErrorCauseSolution
Type 'I18nStringType' is not assignable to 'ReactNode'Passing i18n object directly to JSXWrap with <I18nText value={...} />
Property 'length' does not exist on type 'I18nStringType'Calling string methods on i18n valueUse type guard: typeof text === 'string' ? text : text.en
Images not loading from arxivcrossorigin="anonymous" on <img>Remove crossorigin; keep only referrerpolicy="no-referrer"
Language switcher not workingMissing CSS rules or JSEnsure html[lang] .i18n-* CSS rules and toggle JS are in template
Build fails with type errorsSchema changed but components not updatedUpdate all three files: catalog, cli, components

CRITICAL: Image Handling

Do NOT use crossorigin="anonymous" on <img> tags.

Sites like arxiv.org do not send CORS headers. Adding crossorigin="anonymous" causes the browser to require CORS, which fails and blocks the image.

html
<!-- WRONG - breaks images from arxiv and similar sites -->
<img src="..." referrerpolicy="no-referrer" crossorigin="anonymous" />

<!-- CORRECT -->
<img src="..." referrerpolicy="no-referrer" />

Chinese Translation Guidelines

When writing Chinese translations for ML/AI papers:

WrongCorrectReason
评论器价值函数(critic)Standard ML term
运行估计滑动估计Running estimate = 滑动估计
重加权因子加权系数More natural Chinese
不断演化的动态更新的Clearer meaning
简单修复改动小Academic tone

Build & CLI

bash
# Build (ESM + DTS via tsup)
cd packages/json-ui && pnpm build

# Render report to HTML
node dist/cli.js render example-report-rich.json

# With options
node dist/cli.js render report.json -o output.html --no-open

When Writing Code

  1. Always use I18nString for user-visible text properties in schemas
  2. Always handle both string and {en, zh} forms in renderers
  3. Never use crossorigin="anonymous" on img tags
  4. Keep referrerpolicy="no-referrer" on img tags for privacy
  5. Test with pnpm build after any schema or component changes
  6. Update all three layers (catalog, cli, components) when adding components

© actionbook, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in playground/json-ui-skill of actionbook/actionbook.

Open the folder on GitHubat commit 0e31254

Compare with similar skills

JSON UI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

JSON UI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
JSON UI this skillactionbook/actionbook1.6k—~2.7kAutomated safety check: PassApache-2.0
Kibana I18nelastic/kibana21k—~2.5kAutomated safety check: PassCustom licence
Taro UI Guidejd-opensource/taro-ui4.7k—~1.3kAutomated safety check: PassMIT
Frontend I18nlangflow-ai/langflow156k—~1kAutomated safety check: PassMIT
Readme I18nY80/bmm3442 repos~1.9kAutomated safety check: PassMIT
Frontend DevelopmentOpenHands/OpenHands90k—~324Automated safety check: PassMIT

Similar skills

  • Kibana I18n

    elastic/kibana

    Official

    Add i18n to Kibana React components and server code using @kbn/i18n and @kbn/i18n-react.

    21k GitHub stars~2.5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Taro UI Guide

    jd-opensource/taro-ui

    Guides installing, configuring, styling and using taro-ui (At* components) in Taro apps for WeChat, Alipay, H5 and React Native.

    4.7k GitHub stars~1.3k tokensUpdated 12 days ago
    Frontend & DesignAuto-check passed
  • Frontend I18n

    langflow-ai/langflow

    Add, change, or review user-facing text in the Langflow frontend using the i18n system (i18next / react-i18next).

    156k GitHub stars~1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • A skill your agent uses when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized…

    344 GitHub starsUsed in 2 repos~1.9k tokens
    Frontend & DesignAuto-check passed
  • Frontend Development

    OpenHands/OpenHands

    This skill should be used when the user asks to "add UI copy", "add a translation", "optimize the frontend bundle", "change onboarding", "change conversation UI", "add a query key", "change MSW…

    90k GitHub stars~324 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Lingui Best Practices

    B0und/WikiSpeedrun

    Implement internationalization with Lingui in React and JavaScript applications.

    133 GitHub starsUsed in 2 repos~4.2k tokens
    Frontend & DesignAuto-check passed

More from actionbook/actionbook

All 13 skills in this repo
  • Extract

    actionbook/actionbook

    Extract structured data from websites and produce an executable Playwright script plus extracted data.

    1.6k GitHub starsUsed in 2 repos~3.4k tokens
    Auto-check passed
  • Actionbook

    actionbook/actionbook

    Activate when the user needs to interact with any website — browser automation, web scraping, screenshots, form filling, UI testing, monitoring, or building AI agents.

    1.6k GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Actionbook Web Test

    actionbook/actionbook

    Run browser-based web tests against websites using Actionbook CLI.

    1.6k GitHub stars~9.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Actionbook

    actionbook/actionbook

    Browser action engine. An agent skill from actionbook/actionbook.

    1.6k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Arxiv Viewer

    actionbook/actionbook

    View, search, and download academic papers from arXiv. An agent skill from actionbook/actionbook.

    1.6k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Active Research

    actionbook/actionbook

    Deep research and analysis tool. An agent skill from actionbook/actionbook.

    1.6k GitHub starsUsed in 1 repo~8.2k tokens
    Auto-check passed

Works with

Questions about JSON UI

What does JSON UI do?

CRITICAL: Use for json-ui component rendering and development. JSON UI is an agent skill from actionbook/actionbook. CRITICAL: Use for json-ui component rendering and development.

When should I use JSON UI?

JSON UI fits situations like: json-ui component rendering and development; component catalog; language switch; components/index.tsx.

How do I install JSON UI in Claude Code?

Run `npx skills add actionbook/actionbook --skill json-ui -a claude-code`. Or copy the skill folder (playground/json-ui-skill in actionbook/actionbook) into .claude/skills/json-ui in your project. Claude Code loads it when a task matches its description.

How do I install JSON UI in Codex?

Run `npx skills add actionbook/actionbook --skill json-ui -a codex`. Or copy the skill folder (playground/json-ui-skill in actionbook/actionbook) into .agents/skills/json-ui in your project. Codex loads it when a task matches its description.

Can I use JSON UI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add actionbook/actionbook --skill json-ui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/json-ui, .gemini/skills/json-ui, .github/skills/json-ui and .opencode/skills/json-ui in your project.

What does JSON UI need to run?

Going by SKILL.md and its folder, JSON UI needs the command-line tools its instructions call (pnpm and node).

Does JSON UI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is JSON UI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does JSON UI use?

JSON UI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does JSON UI use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to JSON UI?

Skills that share tags, products or a category with JSON UI: Kibana I18n (elastic/kibana, 21k stars), Taro UI Guide (jd-opensource/taro-ui, 4.7k stars), Frontend I18n (langflow-ai/langflow, 156k stars) and Readme I18n (Y80/bmm, 344 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains JSON UI?

actionbook (a GitHub organization) maintains it in actionbook/actionbook, which has 1,611 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 8, 2026.

Source: actionbook/actionbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.