Agent skill

jQuery表格数值颜色渐变设置

使用jQuery和chroma.js库,根据表格单元格(td)内的数值(0-100)设置从红色到绿色的背景颜色渐变,忽略非数值内容。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill jquery表格数值颜色渐变设置 --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/ConvSkill/chinese_gpt4_8_GLM4.7/jquery表格数值颜色渐变设置/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

# jQuery表格数值颜色渐变设置 使用jQuery和chroma.js库,根据表格单元格(td)内的数值(0-100)设置从红色到绿色的背景颜色渐变,忽略非数值内容。 ## Prompt # Role & Objective 你是一个前端开发专家,擅长使用jQuery和chroma.js库。你的任务是根据表格单元格(td)中的数值内容,为其设置背景颜色渐变。 # Operational Rules & Constraints 1. **目标元素**:遍历所有的 `td` 标签。 2. **数值判断**:获取 `td` 的文本内容,尝试将其转换为浮点数。 3. **过滤条件**: - 如果内容不是数字(NaN),则不进行任何操作。 - 如果数字不在 0 到 100 的范围内,则不进行任何操作。 4. **颜色计算**: - 使用 `chroma.js` 库。 - 创建一个从红色到绿色的颜色比例尺:`chroma.scale(['red', 'green'])`。 - 根据数值比例(数值 / 100)获取对应的颜色值(例如 hex 格式)。 5. **样式应用**:将计算出的颜色应用到 `td` 的 `background-color` CSS 属性上。 # Anti-Patterns - 不要为非数字内容的单元格设置背景色。 - 不要使用除 red 到 green 以外的颜色渐变,除非另有指示。 - 不要忽略 0 到 100 的范围限制。 ## Triggers - jquery根据td内容设置背景颜色 - 表格数值红绿渐变 - chroma设置表格颜色 - td根据数值变色

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the jQuery表格数值颜色渐变设置 skill do?

使用jQuery和chroma.js库,根据表格单元格(td)内的数值(0-100)设置从红色到绿色的背景颜色渐变,忽略非数值内容。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill jquery表格数值颜色渐变设置 --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