python-office is a Python library that provides ready-to-use modules for automating office and media tasks such as PDF, Word, Excel, PowerPoint, email, WeChat, images, video, and OCR. It is for people who want to automate common work activities with short Python calls, including users with little Python experience. Its catalogue skills expose the library's individual automation areas to coding agents.
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 CoderWanFeng/python-office --skill batch_rename_by_excelgit clone --depth 1 https://github.com/CoderWanFeng/python-officeWrote 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/coderwanfeng/python-office/batch_rename_by_excel)<a href="https://agentmods.dev/skills/coderwanfeng/python-office/batch_rename_by_excel"><img src="https://agentmods.dev/badge/skills/coderwanfeng/python-office/batch_rename_by_excel/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/coderwanfeng/python-office/batch_rename_by_excel"><img src="https://agentmods.dev/badge/skills/coderwanfeng/python-office/batch_rename_by_excel.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.00065 | $0.00930 |
| Opus 5.5 | $0.00026 | $0.00372 |
| Sonnet 5.5 | $0.00013 | $0.00186 |
| Haiku 4.5 | $0.00006 | $0.00093 |
Grade A, and why
batch_rename_by_excel 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 2d 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
batch_rename_by_excel Skill
按 Excel 映射批量重命名文件
功能描述
用户手里有一批需要改名的文件,改名前后的对应关系已经整理在 Excel 里。本 Skill 读取 Excel 中的「原文件名 → 新文件名」映射,批量重命名指定目录下的文件。
和 replace4filename 的区别:replace4filename 是「按规则批量替换文件名中的字符」,
本 Skill 是「按 Excel 中逐行指定的映射改名」,适合改名规则不统一、只能逐个列出的场景。
所属分类
skills/file/batch_rename_by_excel/
调用方式
from skills.file.batch_rename_by_excel import batch_rename_by_excel
实现代码位于贡献者目录,也可以直接引用:
from contributors.my12yyds.batch_rename_by_excel import batch_rename_by_excel
注意:
contributors/不随pip install python-office一起发布,安装包环境中请直接 复制contributors/my12yyds/batch_rename_by_excel.py到自己的项目里使用。
参数说明
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
excel_path |
str | 是 | - | 记录新旧文件名映射的 Excel 文件路径,支持 .xlsx |
folder_path |
str | 是 | - | 需要重命名文件所在的目录路径,只处理该目录第一层的文件 |
old_name_column |
str | 否 | '原文件名' |
Excel 中存放原文件名的列名 |
new_name_column |
str | 否 | '新文件名' |
Excel 中存放新文件名的列名 |
sheet_name |
str | 否 | None |
工作表名称,默认使用第一个工作表 |
dry_run |
bool | 否 | False |
为 True 时只返回重命名计划,不真正修改文件 |
返回值
dict,包含 4 个键:
| 键 | 类型 | 说明 |
|---|---|---|
renamed |
list | 已重命名的记录,元素为 (原文件名, 新文件名) 元组;dry_run=True 时为计划重命名的记录 |
skipped |
list | 未执行重命名的记录,元素为 (文件名, 原因) 元组,例如新旧文件名相同、原文件名或新文件名为空 |
missing |
list | Excel 中有记录、但目录下找不到的原文件名 |
conflicts |
list | 目标文件名已存在,为避免覆盖而跳过的原文件名 |
使用示例
Excel 内容(表头必须是这两列):
| 原文件名 | 新文件名 |
|---|---|
| a.txt | 2026年1月报表.txt |
| b.txt | 2026年2月报表.txt |
from skills.file.batch_rename_by_excel import batch_rename_by_excel
# 先预览,确认映射没问题
result = batch_rename_by_excel(
excel_path='./rename_list.xlsx',
folder_path='./files',
dry_run=True,
)
print(result['renamed'])
# 确认无误后再真正执行
result = batch_rename_by_excel(
excel_path='./rename_list.xlsx',
folder_path='./files',
)
print('成功', len(result['renamed']), '个')
print('找不到', result['missing'])
print('目标已存在', result['conflicts'])
原始函数
contributors/my12yyds/batch_rename_by_excel.py::batch_rename_by_excel
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 92 lines · 65 tokens per session scan A 0ceabc1ec02a
batch_rename_by_excel is a skill published in the GitHub repository CoderWanFeng/python-office (1,368 stars, last pushed yesterday), licensed Apache-2.0. It adds 65 tokens to every session and 930 once invoked, about $0.0003 per session on Opus 5.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-10-26.
Other skills, from other repositories
xlsx
Read, create, or edit Excel spreadsheets (.xlsx/.xlsm) — sheet data, formulas, styles, charts, multi-sheet workbooks — and bulk .csv/.tsv tables; use whenever a spreadsheet is the input or the deliverable (extract/analyze data, add columns/formulas/formatting/charts, clean messy tables, build from scratch), but not…
officecli-financial-model
Use this skill when the user wants to build a financial model — 3-statement model, DCF valuation, LBO, SaaS unit economics, sensitivity / scenario analysis, debt schedule, or fundraising projections — in Excel. Trigger on: 'financial model', '3-statement model', 'P&L + BS + CF', 'DCF', 'WACC', 'NPV', 'terminal value'…
officecli
Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents.
xberg-extracting-tables
Use when extracting tabular data from PDFs, spreadsheets, or images. Covers layout-aware table detection, table model selection, output formats (markdown / JSON cells), and known limits.
cli-anything-wps
A command-line tool that controls WPS Office on Windows, including Writer, Calc, and Impress. It can also build presentations from structured JSON data and export them as PowerPoint and PDF files.
officecli-data-dashboard
Use this skill to build a multi-element Excel dashboard — Dashboard sheet on open, multiple formula-driven KPI cards, multiple charts, sparklines, and conditional formatting — from CSV or tabular input. Trigger on: 'dashboard', 'KPI dashboard', 'analytics dashboard', 'executive dashboard', 'metrics dashboard', 'CSV to…