conditional-formatting

conditional-formatting is a skill for Claude Code from claude-office-skills/claude-office-plugin. It costs 26 tokens per session (1,128 once invoked), scanned A, original, MIT.

A guide to conditional formatting in WPS spreadsheets, which changes a cell’s appearance when its value meets a rule. It covers colored cells, data bars, color scales, alternating rows, and highlighting whole rows.

In plain words
What is it for?
Use it to mark high or low numbers, distinguish statuses such as completed or overdue, add zebra-striping, and highlight records based on spreadsheet formulas.
Why use it?
It makes important values and statuses visible without manually checking every row or coloring cells one by one.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-wps-excel plugin — 26 skills, 14 commands, 8 agents, 2 MCP servers shipped together

Good fit Use it to mark high or low numbers, distinguish statuses such as completed or overdue, add zebra-striping, and highlight records based on spreadsheet formulas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/claude-office-skills/claude-office-plugin/conditional-formatting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add claude-office-skills/claude-office-plugin --skill conditional-formatting
Clone the repo
git clone --depth 1 https://github.com/claude-office-skills/claude-office-plugin

Made for: Claude Code.

Or install claude-wps-excel, the plugin that ships this one along with the rest of its 26 skills, 14 commands, 8 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for conditional-formatting

README.md
[![agentmods](https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/conditional-formatting/github.svg)](https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/conditional-formatting)
Your own site
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/conditional-formatting"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/conditional-formatting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for conditional-formatting

Your own site · 80×15
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/conditional-formatting"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/conditional-formatting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01128
Opus 5 $0.00013 $0.00564
Sonnet 5 $0.00005 $0.00226
Haiku 4.5 $0.00003 $0.00113

Measured 10d ago against content hash 836ac7ee6b1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

conditional-formatting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bundled/conditional-formatting/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

条件格式 API

FormatConditions.Add 基本用法

// 参数: Type, Operator, Formula1, Formula2
// Type: 1=xlCellValue, 2=xlExpression
// Operator: 1=Between, 3=Equal, 5=Greater, 6=Less, 7=GreaterEqual, 8=LessEqual

// 示例: 大于 90 的单元格标绿
var rng = ws.Range("B2:B100");
var fc = rng.FormatConditions.Add(1, 5, "90");
fc.Interior.Color = 0x00AA00;
fc.Font.Color = 0xFFFFFF;

// 示例: 等于"已完成"标绿,等于"逾期"标红
var rng = ws.Range("E2:E100");
var fc1 = rng.FormatConditions.Add(1, 3, '"已完成"');
fc1.Interior.Color = 0x00AA00;
fc1.Font.Color = 0xFFFFFF;
var fc2 = rng.FormatConditions.Add(1, 3, '"逾期"');
fc2.Interior.Color = 0x0000FF;
fc2.Font.Color = 0xFFFFFF;
var fc3 = rng.FormatConditions.Add(1, 3, '"进行中"');
fc3.Interior.Color = 0xFF8800;
fc3.Font.Color = 0xFFFFFF;

基于公式的条件格式

// 交替行斑马纹(用 xlExpression)
var fc = rng.FormatConditions.Add(2, 0, "=MOD(ROW(),2)=0");
fc.Interior.Color = 0xFFF0E0;

// 整行高亮(当 E 列="逾期" 时整行变红)
var fc = ws.Range("A2:Z100").FormatConditions.Add(2, 0, '=$E2="逾期"');
fc.Interior.Color = 0xCCCCFF;

清除条件格式

ws.Range("A1:Z1000").FormatConditions.Delete();

一键美化方案

当用户要求"美化表格"时,按以下标准执行:

function CL(c){var s="";while(c>0){c--;s=String.fromCharCode(65+(c%26))+s;c=Math.floor(c/26);}return s;}
var ws = Application.ActiveSheet;
var ur = ws.UsedRange;
var r1 = ur.Row, c1 = ur.Column;
var rEnd = r1 + ur.Rows.Count - 1;
var cEnd = c1 + ur.Columns.Count - 1;

// 1. 表头样式(首行)
var hdr = ws.Range(CL(c1) + r1 + ":" + CL(cEnd) + r1);
hdr.Font.Bold = true;
hdr.Font.Color = 0xFFFFFF;
hdr.Interior.Color = 0x8B4513;
hdr.HorizontalAlignment = -4108;
ws.Range(r1 + ":" + r1).RowHeight = 32;

// 2. 数据区域
var data = ws.Range(CL(c1) + (r1 + 1) + ":" + CL(cEnd) + rEnd);
data.Font.Size = 11;
data.VerticalAlignment = -4108;

// 3. 交替行背景色
for (var r = r1 + 1; r <= rEnd; r++) {
  if ((r - r1) % 2 === 0) {
    ws.Range(CL(c1) + r + ":" + CL(cEnd) + r).Interior.Color = 0xFFF0E0;
  }
}

// 4. 自动列宽
for (var c = c1; c <= cEnd; c++) {
  ws.Range(CL(c) + ":" + CL(c)).ColumnWidth = 15;
}

// 5. 数字列自动格式化
// 检测列内容类型,设置合适的 NumberFormat

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 106 lines · 26 tokens per session scan A 836ac7ee6b1d

Subscribe to this mod's changes

conditional-formatting is a skill published in the GitHub repository claude-office-skills/claude-office-plugin (9 stars, last pushed 5mo ago), licensed MIT. It adds 26 tokens to every session and 1,128 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.