← 返回 Skills 市场
OpenClaw Refactoring
作者
michealxie001
· GitHub ↗
· v1.0.0
· MIT-0
102
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install openclaw-refactoring
功能描述
Automated refactoring assistant. Performs safe code transformations including rename, extract method, inline variable, and move code. Provides refactoring su...
安全使用建议
What to consider before installing/running:
- The implementation appears to provide a Python rename engine and a suggestion engine only. SKILL.md advertises many more features (extract, inline, move, batch-move, JS support) and references files (extract.py, utils.py) that are not present. Do not assume those extra features exist.
- Test on a disposable/git branch first. Always run with --dry-run (preview) and ensure Git is used (stash/commit) before executing destructive operations.
- The tool writes backups under .refactoring/backup — verify backups are created and that undo works before relying on it for large changes.
- The rename implementation uses AST plus fallback text-search and performs column-offset text substitutions; this can be brittle for edge cases (strings, generated code, complex formatting). Run your test suite after refactors.
- If you require extract/inline/move or JavaScript support, inspect the repository or contact the publisher — these features are documented but not implemented in the provided code.
- If anything in the output looks unexpected (modifications outside your intended scope), stop and restore from backup/Git. If you want higher assurance, manually review the code in scripts/rename.py and scripts/suggest.py before running.
功能分析
Type: OpenClaw Skill
Name: openclaw-refactoring
Version: 1.0.0
The 'openclaw-refactoring' skill bundle is a legitimate tool for automated code refactoring. It uses Python's AST module and regex to identify and rename symbols, provide code smell suggestions, and manage backups for undo operations. The code (main.py, rename.py, suggest.py) relies exclusively on the Python standard library, contains no network activity, and includes safety features like dry-run modes and file backups.
能力评估
Purpose & Capability
The skill claims multiple refactoring features (rename, extract method, inline, move, batch operations, multi-language support) in SKILL.md, but the shipped code implements primarily a Python rename engine and a suggestion engine. The SKILL.md mentions additional scripts (extract.py, utils.py) and commands (extract, inline, move, batch-move) that are not present or not implemented in scripts/main.py. This is a mismtach between advertised capability and actual implementation.
Instruction Scope
Runtime instructions are local (run python scripts against your repo), create backups under .refactoring/backup, and recommend Git integration and dry-run. Those instructions are within scope for a refactoring tool. However the docs show CLI flags and commands (e.g. --symbol/--to, extract, inline) that differ from the actual main.py interface (which uses --old-name/-o and --new-name/-n and does not implement extract/inline/move subcommands). The mismatch could lead a user to run commands that don't exist or to expect behavior not implemented.
Install Mechanism
There is no install specification (instruction-only skill with bundled scripts). Nothing is downloaded or written by an installer step beyond the included files, so install mechanism risk is low.
Credentials
The skill requires no environment variables, no credentials, and no special config paths. Its file I/O is limited to scanning and modifying files under the provided root and writing backups under .refactoring/backup, which is proportionate to a refactoring tool.
Persistence & Privilege
The skill is not always-included and doesn't request system-level privileges. It creates backups in a local .refactoring directory and can undo changes; this is expected behavior for an on-disk refactoring tool and does not modify other skills or system-wide config.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install openclaw-refactoring - 安装完成后,直接呼叫该 Skill 的名称或使用
/openclaw-refactoring触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Automated refactoring with rename, suggestions, and undo support. Python AST-based analysis.
元数据
常见问题
OpenClaw Refactoring 是什么?
Automated refactoring assistant. Performs safe code transformations including rename, extract method, inline variable, and move code. Provides refactoring su... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 102 次。
如何安装 OpenClaw Refactoring?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install openclaw-refactoring」即可一键安装,无需额外配置。
OpenClaw Refactoring 是免费的吗?
是的,OpenClaw Refactoring 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
OpenClaw Refactoring 支持哪些平台?
OpenClaw Refactoring 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 OpenClaw Refactoring?
由 michealxie001(@michealxie001)开发并维护,当前版本 v1.0.0。
推荐 Skills