agentsclimarketplace

Batch renamer

Skill publisher-skill/claude-skill/skills/batch_renamer

claude-skill skills

Install
npx -y skills add publisher-skill/claude-skill --skill batch_renamer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 28 days oldThe repository was created 28 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

批量重命名器 - 支持正则、序号、前缀后缀、替换文本等多种重命名方式

SKILL.md

1.7 KB, as published. Nobody here has run it

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()

获取操作摘要

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.