Source profileQuality 91/100Review permissions

actionbook/actionbook/playground/json-ui-skill/SKILL.md

json-ui

Use it for documentation and engineering tasks; the detail page covers purpose, installation, and practical steps.

Source repository stars
1,583
Declared platforms
0
Static risk flags
2
Last source update
2026-08-12
Source checked
2026-08-25

Decision brief

What it does: where it fits

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

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/actionbook/actionbook --skill "playground/json-ui-skill"
    Safe inspection promptEditorial

    Inspect the Agent Skill "json-ui" from https://github.com/actionbook/actionbook/blob/5a3eb05ec18fcebc09ef771008d6dda649295765/playground/json-ui-skill/SKILL.md at commit 5a3eb05ec18fcebc09ef771008d6dda649295765. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      JSON Usage

      Review the “JSON Usage” section in the pinned source before continuing.

      Review and apply the “JSON Usage” source section.
    2. 02

      Quick Reference

      Review the “Quick Reference” section in the pinned source before continuing.

      Review and apply the “Quick Reference” source section.
    3. 03

      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

      packages/json-ui/src/catalog.ts - All Zod schemas and type definitionspackages/json-ui/src/cli.ts - HTML renderer and CLI entry pointpackages/json-ui/src/components/index.tsx - React component implementations
    4. 04

      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

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

      Architecture

      Reports are trees of nodes:

      Reports are trees of nodes:

    Permission review

    Static risk signals and limitations

    Reads files

    low · line 32

    The documentation asks the agent to read local files, directories, or repositories.

    Read the relevant source file(s) listed above

    Runs scripts

    medium · line 308

    The documentation asks the agent to run terminal commands or scripts.

    node dist/cli.js render example-report-rich.json

    Runs scripts

    medium · line 311

    The documentation asks the agent to run terminal commands or scripts.

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

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars1,583SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    actionbook/actionbook
    Skill path
    playground/json-ui-skill/SKILL.md
    Commit
    5a3eb05ec18fcebc09ef771008d6dda649295765
    License
    Apache-2.0
    Collected
    2026-08-25
    Default branch
    main
    View the original SKILL.md

    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:

    {
      "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:

    // catalog.ts
    export const I18nString = z.union([
      z.string(),
      z.object({ en: z.string(), zh: z.string() }),
    ]);
    

    JSON Usage

    // 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:

    // 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:

    // resolveI18n() picks one language:
    const alt = resolveI18n(props.alt, 'en'); // returns plain string
    

    React Rendering (components/index.tsx)

    // 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:
    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:
    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:
    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):

    // 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.

    <!-- 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

    # 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

    Frequently asked questions

    What to verify before installation and use

    What does the json-ui source document cover?

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

    How do I install json-ui?

    The source record exposes this install command: npx skills add https://github.com/actionbook/actionbook --skill "playground/json-ui-skill". Inspect the command and pinned source before running it.

    Which permission-related actions were detected?

    Static rules flagged read-files, exec-script in the source; the page lists the matching lines and excerpts.

    Alternatives

    Compare before choosing

    Computed 901,186

    modu-ai/moai-adk

    moai-design-tools

    Design tool integration specialist covering Figma MCP, Pencil renderer, and Pencil-to-code export. Use when fetching design context from Figma, rendering Pencil designs, or exporting to React/Tailwind code.

    Computed 9916

    NintendaDev/unikit-ai

    unikit-docs

    Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th

    Computed 9817

    eugenelim/agent-ready-repo

    work-loop

    Use when implementing or resuming a non-trivial repository change: a feature, behavior-changing fix, refactor, migration, framework or dependency upgrade, schema or API change, performance work, infrastructure or build-system change, reversion, or an existing build spec under `docs/specs/`. Also use for bare continuation commands ('resume', 'continue', 'keep going', 'pick up where I left off', 'let's get going') when conversation or workspace context identifies active build work. Do not use for

    Computed 976

    mgiovani/cc-arsenal

    team-review

    Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r