← 返回 Skills 市场
78
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install skylv-smart-renamer
功能描述
Batch rename files using pattern matching and AI suggestions
安全使用建议
This skill runs locally and does not contact external endpoints or request credentials, but there are important concerns before you use it on real data:
- Mismatch: The README/metadata claims "AI suggestions" but the provided code contains no AI integration — it only applies fixed rename rules.
- Data-loss risk: The implementation has bugs that can overwrite files. Notably, the sequence rule returns the same filename for every file (so multiple files may be overwritten), and the code does not check for or avoid destination name collisions when renaming. Node's fs.renameSync may replace existing files on many systems, causing irreversible data loss.
- Limited preview and weak validation: Preview only shows up to 20 files; replace uses a user-supplied regex directly (may throw or behave unexpectedly); extension and other args are not validated.
- Local history: A .rename-history.json file is written into the target directory; this is local but may contain filenames you may not want recorded.
Recommendations before installing/using:
- Do not run this on irreplaceable files. Back up the directory first or test in a disposable copy.
- Inspect and/or patch the code: fix the sequence rule so it increments per-file, add collision checks (skip/auto-increment/abort on conflict), validate or escape user-supplied regexes, and surface clear warnings in the UI/docs.
- Run preview and manually review the full set of proposed changes (the preview currently shows only the first 20 files).
- If you expect AI-driven suggestions, request or implement AI integration — currently it's a deterministic renamer only.
Given these mismatches and risky behaviors, the skill is coherent enough to be useful after fixes, but it's not safe to run on important files in its current form.
功能分析
Type: OpenClaw Skill
Name: skylv-smart-renamer
Version: 1.0.1
The skill provides batch file renaming functionality but contains multiple security vulnerabilities in `smart_renamer.js`. The `prefix`, `suffix`, `replace`, and `extension` rules fail to sanitize input arguments, allowing for path traversal attacks where files could be moved or renamed outside the intended directory. Additionally, the `replace` rule uses unsanitized input to construct a `new RegExp()`, making it vulnerable to Regular Expression Denial of Service (ReDoS), and the `sequence` rule is logically flawed, which could lead to accidental file overwrites.
能力评估
Purpose & Capability
The skill is advertised as providing "AI suggestions" and intelligent renaming; the included code implements 12 deterministic rename rules, preview, apply, and undo, but contains no AI integration or suggestion logic. The stated purpose (AI suggestions) is not implemented by the shipped code.
Instruction Scope
SKILL.md gives high-level usage only (install, configure, run). The runtime JS operates only on files in a provided directory and writes a local .rename-history.json file, but the code lacks safeguards: preview is limited to first 20 files, sequence rule as implemented will assign identical names (causing collisions/overwrites), there is no collision handling or confirmation before overwriting, replace uses user-provided regex without escaping/validation, and there is no explicit warning in the docs about data-loss risk.
Install Mechanism
Instruction-only skill with no install spec; code is included as a local Node script and uses only fs/path. No network downloads or package installs are requested.
Credentials
The skill requests no environment variables, no credentials, and no config paths. All access is local to the target directory specified by the user.
Persistence & Privilege
always is false and the skill does not request persistent or platform-level privileges. It writes only a per-directory .rename-history.json file to record recent operations.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install skylv-smart-renamer - 安装完成后,直接呼叫该 Skill 的名称或使用
/skylv-smart-renamer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added frontmatter to SKILL.md with description, keywords, name, and triggers for improved metadata and compatibility.
- Included a new "Usage" section with install, configure, and run instructions.
- No changes to core functionality or rules; documentation-only update.
v1.0.0
Initial release of skylv-smart-renamer.
- Introduces intelligent batch file renaming with 12 customizable rules (e.g., lowercase, uppercase, date prefix, sequence, replace).
- Provides a preview feature before renaming files.
- Includes undo capability for easy reversal of changes.
- Supports file organization through trigger keywords like "rename" and "batch rename."
元数据
常见问题
Skylv Smart Renamer 是什么?
Batch rename files using pattern matching and AI suggestions. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 78 次。
如何安装 Skylv Smart Renamer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install skylv-smart-renamer」即可一键安装,无需额外配置。
Skylv Smart Renamer 是免费的吗?
是的,Skylv Smart Renamer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Skylv Smart Renamer 支持哪些平台?
Skylv Smart Renamer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Skylv Smart Renamer?
由 SKY-lv(@sky-lv)开发并维护,当前版本 v1.0.1。
推荐 Skills