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.
npx skills add YuYY2004/excel-skills --skill excel-regex-cleangit clone --depth 1 https://github.com/YuYY2004/excel-skillsWrote 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.
[](https://agentmods.dev/skills/yuyy2004/excel-skills/excel-regex-clean)<a href="https://agentmods.dev/skills/yuyy2004/excel-skills/excel-regex-clean"><img src="https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-regex-clean/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.
<a href="https://agentmods.dev/skills/yuyy2004/excel-skills/excel-regex-clean"><img src="https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-regex-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00178 | $0.02733 |
| Opus 5 | $0.00089 | $0.01367 |
| Sonnet 5 | $0.00036 | $0.00547 |
| Haiku 4.5 | $0.00018 | $0.00273 |
Grade A, and why
excel-regex-clean 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 258 lines — stays where its author put it; the contents beside it link to each section on GitHub.
This skill follows [[excel-safe-workflow]]. Regex processing uses Python
remodule. Large files (>10MB) use XML direct ops on sheet XML (4x faster), small files use openpyxl. 本技能遵循 [[excel-safe-workflow]]。正则处理用 Pythonre模块。大文件(>10MB)用 XML 直接操作 sheet XML(快 4 倍),小文件用 openpyxl。
Excel Regex Clean / Excel 正则清理
Three Modes / 三种模式
| 模式 | 用户说 | 正则怎么写 | 效果 |
|---|---|---|---|
| extract | "只保留括号里的""提取中文部分" | 用捕获组 () 圈出要保留的 |
1.1 (新一代) → 新一代 |
| remove | "删掉所有数字和点""去掉空格" | 匹配要删除的部分 | 1.1 新一代 → 新一代 |
| replace | "把空格换成下划线""把CN改成中国" | 匹配→替换 | 新一代 产业 → 新一代_产业 |
第零步:需求解析
| 用户说 | 解析 |
|---|---|
| "删掉新兴产业列的数字、点和括号,只留中文" | extract模式, 提取括号内中文 |
| "把申请日里的横线去掉" | remove模式, 删掉 - |
| "把空格全部换成下划线" | replace模式, → _ |
| "去掉所有数字" | remove模式, \d+ |
| "只保留英文字母" | extract模式, [A-Za-z]+ |
常用正则速查 / Common Regex Quick Reference
| 要匹配 | 正则 |
|---|---|
| 数字 | \d+ |
| 英文点 | \. |
| 括号及内容 | \([^)]*\) |
| 括号里的内容(提取用) | \((.+)\) |
| 中文 | [一-龥]+ |
| 空格 | \s+ |
| 英文字母 | [A-Za-z]+ |
第一步:勘察
import pandas as pd, re
FILE = '目标文件.xlsx'
TARGET_COL = '列名'
df = pd.read_excel(FILE)
vc = df[TARGET_COL].value_counts()
print(f'列 [{TARGET_COL}] 唯一值: {len(vc)}')
# 展示前20行 + 变换预览
MODE = 'extract' # extract / remove / replace
PATTERN = r'\((.+)\)' # 正则
REPLACE = '' # replace 模式时的替换文本
print('\n变换预览:')
count = 0
for idx, val in df[TARGET_COL].items():
if pd.notna(val) and count < 20:
old = str(val)
if MODE == 'extract':
m = re.search(PATTERN, old)
new = m.group(1) if m else old
elif MODE == 'remove':
new = re.sub(PATTERN, '', old)
else: # replace
new = re.sub(PATTERN, REPLACE, old)
if new != old:
print(f' {old[:60]} → {new[:60]}')
count += 1
第二步:规划
- 确认模式和正则,预览无误后执行
- 正则不会的让用户直接描述需求,自动推断
第三步:执行
⚠️ XML 方案必须在 sheet 层 + 列号限定,不碰 sharedStrings。
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.
- 11d ago First seen · 258 lines · 178 tokens per session scan A 4a15b1a37920
excel-regex-clean is a skill published in the GitHub repository YuYY2004/excel-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 178 tokens to every session and 2,733 once invoked, about $0.0009 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.
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.
Excel工具
A guide for using Excel tools to read, write, and recalculate spreadsheet files. It includes a rule for treating the first row as data when a spreadsheet has no column headings.
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.…
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…
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.) …
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"…