DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Refactor Insight — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
R

dsh-refactor-insight

Refactor Insight

DSH refactor-insight skill plugin:将代码库异味转化为可执行、按优先级排序的重构计划(文件长度、超长函数、深层嵌套、上帝对象、高耦合和 TODO 密度启发式规则,以及分阶段运行手册)。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:duyanta123/dsh-refactor-insight#5a7fe95477b454d70d3a54334003d021bd87af66
README兼容性版本

兼容性与来源证明

Refactor Insight 以 dsh-refactor-insight 发布,当前版本为 0.1.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/11

版本

0.1.3stable
2026/9/11
0.1.2stable
2026/9/5
0.1.1stable
2026/9/1
查看其余 1 个版本收起版本
0.1.0stable
2026/8/22

相关插件

正在加载相关插件…

最新版
0.1.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 1
周下载
0
最近提交
2026/9/11
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

dsh-refactor-insight

DSH 技能插件:把代码库的坏味道转成带定位、优先级和依赖顺序的可执行重构计划——结构健康体检,而非 diff 审查。

Turn codebase smells into an executable, priority-ordered refactoring plan.

能力(v0)

六条确定性坏味道规则(阈值均可参数覆盖,零依赖启发式):

  • 超长文件(默认 > 400 行)
  • 深嵌套(默认最大缩进 / 花括号深度 > 5)
  • TODO/FIXME 密度(噪音指标,输出每千行计数)
  • 长函数(Python 缩进块 / JS-TS 花括号配对 / Go 函数声明,函数体 > 80 行)
  • 上帝对象(类方法数 > 10 或类体行数 > 300 / Go 接收者方法数)
  • 高耦合模块(复用 arch-profile --deps 输出,按入度/出度识别 hub 模块 + Tarjan 环检测)
  • 只输出计划、不自动改代码;高风险重构项由 LLM 标注、须人工确认。

脚本只给硬事实(确定性扫描),严重度 / 成本 / 建议动作由 LLM 精修真误报后标注推断。

快速开始

在 DSH 中使用

  1. 安装插件:dsh plugin --profile web add github:duyanta123/dsh-refactor-insight
    • 发布 v0.1.0 tag 后,可改为 github:duyanta123/dsh-refactor-insight#v0.1.0 锁定版本。
  2. 使用:对 Agent 说「用 refactor-insight 体检 /path/to/repo」
  3. 输出:按 docs/refactor-plan-template.md 生成 REFACTOR-PLAN.md。

只跑诊断 CLI(零依赖,不经过 DSH 也能跑)

独立 refactor-smell.mjs 与 arch-profile.mjs 继续支持 Node.js >= 18;作为 DSH 0.1.5-rc.2 bundle 运行时要求 Node.js >= 22.19。兼容门禁可用 npm run test:compat。

# 六条规则诊断
node scripts/refactor-smell.mjs <repo_path>

# 复用 arch-profile 的依赖输出做高耦合/环检测
node scripts/arch-profile.mjs <repo_path> --deps > deps.json
node scripts/refactor-smell.mjs <repo_path> --deps-json deps.json

主要参数:--max-lines、--max-func-lines、--max-nesting、--max-methods、--max-class-lines、--max-coupling、--max-depth、--include-dirs、--exclude-dirs。

示例输出(节选):

{
  "language": "javascript/typescript",
  "smells": [
    {
      "rule": "god-object",
      "type": "god_object",
      "path": "src/lib/GodService.js",
      "name": "GodService",
      "methods": 12,
      "threshold": 10,
      "severity": 2,
      "cost": "M"
    }
  ]
}

目录结构

dsh-refactor-insight/
├── package.json                  # npm 包 + dsh.bundle.patch
├── cordis.patch.yml              # DSH bundle patch
├── plugin/index.js               # ESM 入口,注册 skills/ 为技能根
├── skills/refactor-runbook/SKILL.md  # 技能 frontmatter + 阶段执行 runbook
├── docs/refactor-plan-template.md    # 输出报告骨架
├── scripts/arch-profile.mjs      # 复用:probe/scan/deps/entry(零依赖)
├── scripts/refactor-smell.mjs    # 坏味道诊断器(六条规则,--deps-json 复用 arch-profile deps)
└── test/                         # node --test 测试 + fixtures

本地开发

  1. profile 的 package.json 加 "dsh-refactor-insight": "file:<本地路径>/dsh-refactor-insight",bundles 加 "dsh-refactor-insight"。
  2. 测试:npm test
  3. 打包检查:npm pack --dry-run

输出

  • REFACTOR-PLAN.md:结构化重构计划(按 docs/refactor-plan-template.md 骨架)