Token导航 LogoToken导航TokenDH.com
效率可写文件clawhub未标认证来源可访问clear审计提醒

rename-fill重命名填充

Agent Skill

rename-fill 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,541

周安装

222

GitHub Stars

公开资料未说明

下载量

1,794
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:rename-fill(重命名填充)
来源仓库:https://github.com/git-xyz/rename-fill
安装命令:
openclaw skills install rename-fill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install rename-fill

简介

rename-fill 功能与 rename-file 类似,用于批量添加文件前缀并重命名目录内容。

  • 同样提供更改预览和用户确认步骤保证操作安全。
  • 使用 openclaw skills install 命令安装,操作方式一致。
  • 使用前应检查目标目录是否包含重要文件避免意外覆盖。
  • 适用于日志归档、版本管理等需要有序命名的场景。

SKILL.md

name
rename-file
description
Rename files in a specified directory with a given prefix. This skill prompts the user for a prefix and directory path, shows a preview of changes, and asks for confirmation before executing. Uses Node.js script for cross-platform compatibility.

Rename File Skill

This skill renames all files in a specified directory by adding a prefix to each filename. It shows a preview of changes and asks for user confirmation before executing the rename operation.

When to use this skill

Use this skill when:

  • User wants to batch rename files in a directory
  • User needs to add a consistent prefix to multiple files
  • User wants to preview changes before applying them
  • User wants a safe, interactive file renaming tool

Prerequisites

The skill uses a JavaScript script for file operations, which requires Node.js to be installed.

Implementation steps

1. Ask for user inputs

Use AskUserQuestion to get:

  1. Prefix: What prefix should be added to the filenames?
  2. Directory path: Which directory contains the files to rename? (Enter absolute or relative path)
  3. Confirmation: Show preview and ask for confirmation before proceeding

Example AskUserQuestion call for prefix and directory:

{
  "questions": [{
    "question": "What prefix should be added to the filenames?",
    "header": "Prefix",
    "options": [
      {"label": "Enter custom prefix", "description": "I'll type a prefix (e.g., 'photo_', 'backup_')"}
    ],
    "multiSelect": false
  }, {
    "question": "Which directory contains the files to rename?",
    "header": "Directory",
    "options": [
      {"label": "Current directory", "description": "Use current working directory"},
      {"label": "Custom path", "description": "I'll specify a different directory"}
    ],
    "multiSelect": false
  }]
}

2. Process user inputs

After getting answers:

  • Prefix: Use the user-provided prefix (sanitize if needed)
  • Directory path:

- If "Current directory" selected, use current working directory - If "Custom path" selected, ask user to enter the path via a follow-up question - Validate that the directory exists and is readable

3. Generate preview

Read the directory contents and generate a preview of rename operations:

  • List all files (excluding directories) in the target directory
  • Show current filename → new filename mapping
  • Count total files to be renamed

Display the preview to the user and ask for confirmation:

{
  "questions": [{
    "question": "Preview: ${count} files will be renamed with prefix '${prefix}'. Proceed?",
    "header": "Confirmation",
    "options": [
      {"label": "Yes, rename files", "description": "Execute the rename operation"},
      {"label": "No, cancel", "description": "Cancel without making changes"}
    ],
    "multiSelect": false
  }]
}

4. Execute rename operation

If user confirms, run the JavaScript rename script:

# Get the path to this skill directory
SKILL_DIR="$(dirname "$0")/rename-file"

# Run the JavaScript rename script
node "$SKILL_DIR/scripts/rename-files.js" "<prefix>" "<directory-path>"

5. Display results

Show the user:

  • Number of files successfully renamed
  • Any errors encountered
  • Summary of changes made

Script details

The JavaScript script (scripts/rename-files.js):

  1. Validates the directory exists and is accessible
  2. Reads all files in the directory (excluding subdirectories)
  3. For each file, constructs new filename by prepending the prefix
  4. Performs the rename operation using fs.renameSync
  5. Handles errors gracefully (e.g., permission issues, duplicate names)
  6. Returns success/failure status

Error handling

  • If directory doesn't exist or is not accessible, show error and abort
  • If no files found in directory, inform user and exit
  • If a file with the new name already exists, skip that file and report
  • If permission denied for any file, skip and report error
  • Rollback on critical errors (optional, can be implemented)

Safety features

  • Always shows preview before making changes
  • Asks for explicit confirmation
  • Skips directories (only renames files)
  • Preserves file extensions
  • Reports all operations for transparency

Usage example

User: /rename-file
Assistant: Asks for prefix and directory
User: Prefix: "vacation_", Directory: "./photos"
Assistant: Shows preview: "photo1.jpg" → "vacation_photo1.jpg", etc.
User: Confirms
Assistant: Renames files and shows summary

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.95%
按下载量换算1,542

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills