Preface¶
When organizing assets, exporting reports, or syncing directories, you often encounter a batch of files that need a unified prefix, renumbering, or filename replacement according to specific rules. While scripts can handle this in one go, writing rules repeatedly is tedious, and there is always the risk of mistakenly altering extensions or subdirectories, with errors being difficult to roll back. Below, we introduce the SkillHub community skill @user_bb79990a/batch-rename2, which encapsulates common renaming capabilities into an Agent-executable workflow, emphasizing “Preview First, Execute Second” and automatic backups.
What is This¶
Batch Rename Files or Folders is an Agent Skill aimed at Office Efficiency (category office-efficiency), with coordinates @user_bb79990a/batch-rename2. It is version 1.0.0, sourced from the community, and maintained by the publisher user_bb79990a. The tags indicate requires_api_key=false, meaning no additional API Key is needed.
The Skill’s positioning is: to batch process file or folder names within a conversation based on your rules, supporting multiple modification methods, providing a preview before formal renaming, and automatically backing up during execution to reduce the risk of operational errors.
Official Access:
- API:
https://api.skillhub.cn/user_bb79990a/batch-rename2 - SkillHub Page:
https://www.skillhub.cn/skills/user_bb79990a/batch-rename2
Core Features¶
The following capabilities are derived from the official description and have been verified against the page:
- Prefix / Suffix: Append fixed text before or after filenames.
- Text Replacement: Replace specified fragments in names with new content.
- Regex Replacement: Match and replace using regular expressions.
- Sequence Increment: Generate continuous numbering (e.g.,
001,002) for a batch of files. - Case Conversion: Unify to uppercase, lowercase, or other common formats.
- Remove Specific Characters: Delete unwanted characters or fragments.
- Extension Filtering: Apply changes only to files with specific extensions to avoid accidental modification of unrelated types.
- Subdirectory Recursion: Process subdirectories under the target path simultaneously.
Two workflow characteristics are also noted in the official documentation: Execute only after preview confirmation; and Automatic Backup, facilitating recovery in case of errors.
In clients like Cursor and Claude Code, tasks can be triggered via natural language. The trigger words listed by the official source include: batch rename, batch rename files, file rename, folder rename, rename batch, batch modify filename, batch replace filename, batch add prefix, batch add suffix, batch sequence, batch rename.
Installation and Activation¶
SkillHub provides two common installation methods: using the CLI to install to the current Agent’s skills directory, or sending the installation prompt to an AI to perform the operations according to the documentation.
Method 1: SkillHub CLI¶
If the CLI is not yet installed, you can check the version first:
command -v skillhub && skillhub --version
If not installed, you can perform a full installation (CLI + Default Skills) following the SkillHub installation documentation:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
To install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
When installing this skill, you must use --dir to point to the skills directory recognized by the current Agent; otherwise, it defaults to installing to ./skills/, which the Agent may not be able to load. Paths vary by client, with examples from the installation documentation as follows:
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
Installation command format (replace <skills directory> with the actual path in your environment):
skillhub install user_bb79990a/batch-rename2 --dir <skills directory>
If the coordinate format matches the page, you can also use @user_bb79990a/batch-rename2 as the installation identifier; refer to the package name supported by your current skillhub CLI.
After installation, restart or refresh the Agent according to your client’s requirements to enable the new Skill.
Method 2: Install via AI Documentation¶
The prompt provided by the SkillHub page is: Please install @user_bb79990a/batch-rename2 based on https://skillhub.cn/install/skillhub.md. Send this sentence to an AI that supports Skill installation, and it will complete the CLI and --dir configuration following the same installation documentation.
Differences between Cursor / Codex CLI / Claude Code mainly lie in the skills directory path; the installation steps themselves follow the general SkillHub documentation. Differences not separately explained in official materials are not elaborated here.
Typical Usage¶
The official page does not include step-by-step screenshots or script examples; usage is primarily based on “stating the goal and rules within the Agent conversation.” A reproducible interaction pattern is as follows:
- Define Scope: Provide the directory path to be processed, and specify whether to include subdirectories and whether to process only specific extensions (corresponding to extension filtering and recursion capabilities).
- Define Rules: Describe the requirement using natural language or trigger words, e.g., “Batch add prefix
2026-”, “Replace spaces in filenames with underscores”, “Use regex to remove trailing(1)”, “Increment from 001 using three-digit sequence”, “Convert all to lowercase”, etc., corresponding one-to-one with the capabilities in the introduction. - Request Preview: Explicitly request a list of “Old Name → New Name” previews first, and execute only after confirming there are no errors (corresponding to “Execute only after preview confirmation”).
- Confirm Execution: Agree to execute after the preview is satisfactory; rely on the Skill’s automatic backup for rollback if needed.
Example prompt (can be modified based on actual path):
Please use the batch rename skill to process the ~/Downloads/exports directory (including subdirectories), modifying only .csv files:
Add the prefix report- before the filename and increment numbering as 001, 002. Preview all changes first, and I will confirm before execution. Please keep a backup.
Use Cases and Notes¶
Who it is for: Developers, operations staff, or office users who frequently need to organize large numbers of filenames locally or within projects; those who prefer describing rules via conversation rather than writing one-off scripts every time.
What it is good for: Unifying naming conventions, batch removing noise characters, adding sequence numbers by batch, renaming after filtering by extension, etc., especially when you want to see a complete preview before renaming.
Notes on use:
- When processing subdirectories recursively, the scope of impact increases; be sure to check paths item by item during the preview stage.
- Regex replacement is powerful; incorrect rules may modify multiple batches of files at once. It is safer to test on a small directory first.
- Automatic backups reduce risk, but for important data, it is still recommended to make additional copies or include them in version control before execution.
- Installation statistics are based on SkillHub data: Rating 100000, Downloads 1127 times (page data is subject to update; refer to the official website).
Conclusion¶
@user_bb79990a/batch-rename2 consolidates common renaming needs—such as prefixes/suffixes, replacement, regex, sequencing, case conversion, character removal, extension filtering, and subdirectory recursion—into a single Skill, while constraining the execution process with preview confirmation and automatic backups. If you are using environments like Cursor or Claude Code that support Skills, you can install it to the corresponding skills directory as described above and directly describe renaming tasks using official trigger words.
For skill details and installation prompts, see: SkillHub - Batch Rename Files or Folders.