Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

refactoring-code重构代码

Agent Skill

refactoring-code 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

269

周安装

11

GitHub Stars

17

下载量

87
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:refactoring-code(重构代码)
来源仓库:https://github.com/alexei-led/claude-code-config
仓库路径:skills/refactoring-code
安装命令:
npx skills add https://github.com/alexei-led/claude-code-config --skill refactoring-code
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/alexei-led/claude-code-config --skill refactoring-code

简介

用于代码重构相关的信息检索与筛选,支持快速定位候选方案或技术实现路径。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景查找相关资源。
  • 使用时可结合来源仓库文档进一步核验具体用法,确保符合项目实际需求。
  • 安装方式:通过 npx skills add 命令从指定 GitHub 仓库添加,支持多宿主环境运行。
  • 建议在安装前确认技能权限范围及是否触发文件读写、命令执行等高风险操作。

SKILL.md

Fast Refactoring with MorphLLM

MorphLLM edit_file provides semantic code merging at 10,500+ tokens/sec with 98% accuracy.

When to Use edit_file

Use edit_fileUse Built-in Edit/MultiEdit
Multi-file batch refactoringSingle file, clear edit
Style/pattern update everywhere2-3 targeted replacements
Complex prompt → many changesNeed clear diff to review/tune
Structural refactoring at scaleSimple rename (replace_all)
5+ files need same patternStraightforward single-file work

Key Features

  • Semantic merge: Understands code structure, not just text
  • Speed: 10,500 tok/s vs 180 tok/s streaming
  • Accuracy: 98% success rate on edge cases
  • dryRun: Preview changes before applying

Workflow

Standard Refactoring

1. Use WarpGrep to find all locations needing change
2. For each file: call edit_file with changes
3. Verify with lint/test

High-Stakes Changes (dryRun)

1. Call edit_file with dryRun: true
2. Review preview output
3. If approved, call again with dryRun: false

Parameters

path: "/absolute/path/to/file"
code_edit: "changed lines with // ... existing code ... markers"
instruction: "brief description of changes"
dryRun: false (set true to preview)

Edit Format

Use //... existing code... markers for unchanged sections:

// ... existing code ...
function updatedFunction() {
  // new implementation
}
// ... existing code ...

Common Patterns

Batch Error Handling

instruction: "Add error wrapping to all repository methods"
code_edit: Shows only changed functions with context markers

Import Updates

instruction: "Update imports from old-pkg to new-pkg"
code_edit: Shows import section with changes

Multi-Location Rename

instruction: "Rename getUserById to findUser throughout file"
code_edit: Shows all locations with changes

Tips

  • Batch all edits to same file in one call
  • Include enough context to locate changes precisely
  • Preserve exact indentation in code_edit
  • Use WarpGrep first to understand scope
  • Run tests after each file to catch issues early

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

windsurf

27.9%
按下载量换算24

Codex

20.8%
按下载量换算18

Claude Code

18.81%
按下载量换算16

Antigravity

13.16%
按下载量换算11

Gemini CLI

8.23%
按下载量换算7

OpenCode

3.51%
按下载量换算3

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills