安全扫描
OpenClaw
安全
high confidenceThis is an instruction-only refactoring skill whose requests and instructions are coherent with its stated purpose — it asks the agent to read and modify the local codebase and verify behavior, which is expected for a refactorer.
评估建议
This skill is internally consistent and appears to do what it says: read your project, propose and apply refactors, and verify behavior. Before using it: (1) ensure the agent has explicit permission to read and modify your repository; (2) keep a VCS commit or backup so you can review and revert changes; (3) confirm how the agent will verify correctness (e.g., will it run your test suite or rely on static checks), and restrict execution if you don't want tests run automatically; (4) require the a...详细分析 ▾
✓ 用途与能力
Name and description (code refactor) match the SKILL.md instructions: identify duplication, simplify flow, rename, reorganize without changing behavior. No unrelated env vars, binaries, or installs are requested.
ℹ 指令范围
Instructions correctly focus on refactoring and include guidance to verify behavior remains unchanged. This necessarily implies reading and modifying the user's local codebase and running whatever tests or verification the user has — expected for a refactoring skill, but it means the agent may access project files and test harnesses. The SKILL.md does not prescribe how to run verification (e.g., run test suite, use sandbox), so the agent's actions for verification depend on agent implementation and must be authorized by the user.
✓ 安装机制
No install spec or code files are present (instruction-only), so nothing will be written to disk by an installer. Lowest-risk install profile.
✓ 凭证需求
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets or system access.
✓ 持久化与权限
Defaults are used (not always:true). The skill is user-invocable and can be invoked autonomously by the agent per platform defaults; this is normal and not excessive for this skill.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv0.1.02026/4/6
initial release
● 无害
安装命令 点击复制
官方npx clawhub@latest install code-refactor
镜像加速npx clawhub@latest install code-refactor --registry https://cn.clawhub-mirror.com
技能文档
只整理结构,不改变原有行为。
工作流
- 先确认当前行为,再保证重构后行为保持一致。
- 先指出具体问题:重复代码、命名差、函数过长、条件分支纠缠、职责不清。
- 除非用户明确允许,否则不要破坏公共接口和调用方预期。
- 只有在能明显降低复杂度或重复时才抽取公共逻辑或重组模块。
- 重构时不顺手加入新业务逻辑。
- 保留原有注释风格,除非注释已经失真。
- 重构后验证行为未变。
输出
- 重构前的问题
- 重构思路
- 如何保证行为不变
- 已做验证
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制