excel-replace

excel-replace is a skill for Claude Code, Codex from YuYY2004/excel-skills. It costs 160 tokens per session (3,684 once invoked), scanned A, original, MIT.

A controlled way to replace values in Excel workbooks, including whole columns, rows, selected cells, formulas, or Python-based transformations. It first identifies the requested range and requires confirmation before overwriting content.

In plain words
What is it for?
Use it to replace a column or row, change cells matching a condition, fill empty cells, set formulas, or transform selected spreadsheet values.
Why use it?
Bulk spreadsheet edits can change the wrong cells or destroy existing data. The workflow checks the target and verifies the result after the replacement.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

agentmods
npx agentmods add skills/yuyy2004/excel-skills/excel-replace
Any agent
npx skills add YuYY2004/excel-skills --skill excel-replace
Clone the repo
git clone --depth 1 https://github.com/YuYY2004/excel-skills

Made for: Claude Code, Codex.

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 excel-replace

README.md
[![agentmods](https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-replace.svg)](https://agentmods.dev/skills/yuyy2004/excel-skills/excel-replace)
Your own site
<a href="https://agentmods.dev/skills/yuyy2004/excel-skills/excel-replace"><img src="https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-replace.svg" alt="Measured on agentmods" height="20"></a>
Per session 160 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00160 $0.03684
Opus 5 $0.00080 $0.01842
Sonnet 5 $0.00032 $0.00737
Haiku 4.5 $0.00016 $0.00368

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

Security

Grade A, and why

excel-replace 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 5d 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.

claude/skills/excel-replace/SKILL.md · 337 lines

How it starts

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

This skill follows [[excel-safe-workflow]] four-step method. Must complete Requirement Parsing→Scout→Plan before execution, and Verify after. Must confirm before overwriting. 本技能遵循 [[excel-safe-workflow]] 四步法。执行前必须完成 需求解析→勘察→规划,执行后必须验证。替换覆盖前必须确认。

Excel Safe Replace (Column/Row/Cell) / Excel 安全替换(列/行/单元格)

第零步:需求解析

自动识别替换范围 / Auto-detect Replace Scope

用户说 判定
"这列全改成""E列替换为""整列" → 整列模式
"这行全改成""第5行替换为""整行" → 整行模式
"把所有空值改成""xxxx的替换为""条件替换" → 条件单元格模式
"B5改成""这个单元格" → 单单元格模式

解析要素

要素 说明 默认值
范围 整列/整行/条件/单格 从用户话中判定
目标 列号/列名/行号/单元格坐标 必须明确
新内容 固定值 / =开头的公式 / 自定义转换 必须明确
条件 (仅条件模式)"等于xx的""包含xx的""为空的" 必须明确

解析示例

用户说 提取
"把E列全部替换成'已确认'" 整列, E, 值='已确认'
"第3行整行清空" 整行, 3, 值=None
"状态列里所有'待审'改成'已审'" 条件, 状态列, 匹配='待审'→'已审'
"把空单元格全填上0" 条件(全局), 匹配=None→0
"B5改成'总计'" 单格, B5, 值='总计'
"金额列换成公式 =C2*D2" 整列, 金额列, 公式='=C2*D2'

第一步:勘察

import os, sys
sys.stdout.reconfigure(encoding='utf-8')
from openpyxl import load_workbook
from datetime import datetime

FILE = '目标文件.xlsx'
size_mb = os.path.getsize(FILE) / 1024 / 1024
print(f'文件大小: {size_mb:.1f} MB')

wb = load_workbook(FILE)
ws = wb.active
print(f'工作表: {ws.title}, 行: {ws.max_row}, 列: {ws.max_column}')

# 定位目标
target_col = None  # 整列模式
target_row = None  # 整行模式
target_cell = None # 单格模式

# 整列模式:定位列号
if SCOPE == 'column':
    if isinstance(target_spec, str):
        for col_idx in range(1, ws.max_column + 1):
            if ws.cell(row=1, column=col_idx).value == target_spec:
                target_col = col_idx
                break
    else:
        target_col = int(target_spec)

    print(f'\n目标列: 列{target_col} "{ws.cell(row=1, column=target_col).value}"')
    # 抽样展示
    for row in range(2, min(10, ws.max_row + 1)):
        v = ws.cell(row=row, column=target_col).value
        print(f'  行{row}: {repr(v)[:50]}')

# 条件模式:统计匹配数
if SCOPE == 'condition':
    match_count = 0
    for row in range(2, ws.max_row + 1):
        for col in range(1, ws.max_column + 1):
            v = ws.cell(row=row, column=col).value
            if CONDITION(v):  # 用户定义的条件
                match_count += 1
    print(f'\n条件匹配: {match_count} 个单元格(共 {ws.max_row * ws.max_column} 个)')

# 双重扫描
print('\n=== 双重扫描 ===')
wb2 = load_workbook(FILE, data_only=True)
ws2 = wb2.active
# ... 对比 target 区域
wb2.close()

Read the full file on GitHub · 337 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. 5d ago First seen · 337 lines · 160 tokens per session scan A b814f3c20929

Subscribe to this mod's changes

excel-replace is a skill published in the GitHub repository YuYY2004/excel-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 160 tokens to every session and 3,684 once invoked, about $0.0008 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.

Related

Other skills, from other repositories

spreadsheets

Use when creating, reading, or fixing spreadsheets (.xlsx, .csv). Covers formulas, formatting, charts, data cleaning, and handling the messy real-world files that are not actually tabular.

nimadorostkar/Claude-Skills-collection · 43 tokens

Excel工具

Skill "Excel工具" from XiaoMaColtAI/math-modeling-skill, covering excel 工具, 原则, 读取与写入, 第一行就是数据时必须显式使用 header=none。 and 公式重算.

XiaoMaColtAI/math-modeling-skill · 25 tokens

huashu-data-pro

All-in-one data analysis and productivity assistant. Covers end-to-end workflows for data processing, analytical insights, report writing, PPT creation, and data visualisation. Always approaches tasks from an expert perspective — thinks one step ahead for the user. Proactively confirms with the user when uncertain.…

Biraj2004/huashu-skills-english · 153 tokens

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or…

lingxling/awesome-skills-cn · 201 tokens

thinkcell

Generate, update, and automate think-cell charts and elements in PowerPoint and Excel. Use ANY time the user mentions think-cell, thinkcell, or .ppttc files, or asks to create/update PowerPoint charts following think-cell conventions (waterfall, Mekko, stacked column, Gantt, Harvey ball, scatter/bubble, etc.) …

zmazz/thinkcell · 213 tokens

bug-report-writer

Converts rough notes, casual descriptions, console errors, or quick observations into professional, complete bug reports — exported as a formatted Excel (.xlsx) file ready for Excel, Google Sheets, Jira, or Azure DevOps. Use this skill whenever the user mentions: "write a bug report", "log a bug", "report this issue"…

ShreyasBh02/AI-Skills-Collection · 186 tokens