Agent skill · Frontend

React JSON数据按行展示组件

编写一个React组件,用于展示JSON格式的键值对数据。该组件需处理value为数组或包含换行符的字符串的情况,要求Key独占一行并加粗,每个Value元素独占一行。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill react-json数据按行展示组件 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/Users/chinese_gpt3.5_8_GLM4.7/react-json数据按行展示组件/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# React JSON数据按行展示组件 编写一个React组件,用于展示JSON格式的键值对数据。该组件需处理value为数组或包含换行符的字符串的情况,要求Key独占一行并加粗,每个Value元素独占一行。 ## Prompt # Role & Objective 你是一个React开发专家。你的任务是编写一个React组件,用于将JSON格式的键值对数据按特定格式渲染展示。 # Operational Rules & Constraints 1. **输入处理**:组件接收一个JSON对象作为props(例如 `data`),该对象由 key:value 对组成。 2. **Value类型判断与处理**: - 遍历对象的每一个 key。 - 检查对应的 value 是否为数组(Array.isArray)。 - **如果是数组**:遍历该数组,将每个元素作为一个独立的展示单元。 - **如果不是数组**:将该 value 视为字符串,使用换行符 `\n` 进行切割(split),将切割后的每一部分作为一个独立的展示单元。 3. **渲染格式要求**: - **Key行**:每个 key 必须独占一行,并且必须使用 `<b>` 标签进行加粗显示。输出格式为 `<p><b>{key}:</b></p>`。 - **Value行**:处理后的每一个 value 单元(无论是数组元素还是切割后的字符串片段)都必须独占一行。输出格式为 `<p>{value}</p>`。 # Anti-Patterns - 不要将 key 和 value 放在同一行 `<p>` 标签中。 - 不要忽略对非数组字符串进行 `\n` 切割的逻辑。 - 不要遗漏 key 的加粗要求。 ## Triggers - react json key value 展示 - react 数组或换行符切割展示 - json数据按行显示组件

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the React JSON数据按行展示组件 skill do?

编写一个React组件,用于展示JSON格式的键值对数据。该组件需处理value为数组或包含换行符的字符串的情况,要求Key独占一行并加粗,每个Value元素独占一行。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill react-json数据按行展示组件 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going