batch_renamer
Skill1 starsChanged 5 months agoMITView on GitHub
批量重命名器 - 支持正则、序号、前缀后缀、替换文本等多种重命名方式
In this repository13 other files it gives its agents.
- data_processorSkill
- directory_treeSkill
- ffmpeg_processorSkill
- file_comparatorSkill
- file_organizerSkill
- image_downloaderSkill
- image_processorSkill
- password_generatorSkill
- pdf_toolSkill
- pdf-word-converterSkill
- sftp_toolSkill
- web-crawlerSkill
- wechat_image_downloaderSkill
The file
Files
Batch Renamer Skill
批量重命名器,支持多种重命名方式。
功能特性
- 正则表达式重命名 - 强大的模式匹配
- 序号重命名 - 自动生成有序文件名
- 添加前缀/后缀 - 批量添加前缀或后缀
- 替换文本 - 批量替换文件名中的文本
- 改变大小写 - 批量修改大小写
- 预览模式 - 支持 dry-run 预览结果
使用方法
Python API
from skills.batch_renamer import BatchRenamer
renamer = BatchRenamer()
# 序号重命名
renamer.rename_with_sequence('/path/to/folder', prefix='photo', start=1)
# 添加前缀
renamer.add_prefix('/path/to/folder', '2024_')
# 替换文本
renamer.replace_text('/path/to/folder', 'old', 'new')
# 正则重命名
renamer.rename_with_pattern('/path/to/folder', r'IMG_(\d+)', r'photo_\1')
# 预览模式
renamer.rename_with_sequence('/path/to/folder', dry_run=True)API 参考
BatchRenamer 类
rename_with_pattern(directory, pattern, replacement, dry_run=False)
使用正则表达式重命名
rename_with_sequence(directory, prefix='file', start=1, padding=3, dry_run=False)
使用序号重命名
add_prefix(directory, prefix, dry_run=False)
添加前缀
add_suffix(directory, suffix, before_ext=True, dry_run=False)
添加后缀
replace_text(directory, old_text, new_text, case_sensitive=True, dry_run=False)
替换文本
change_case(directory, case_type='lower', dry_run=False)
改变大小写(lower/upper/title)
get_summary()
获取操作摘要
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

