360 Secure SkillHub
360 安全技能中心

Refactoring Catalog

该技能提供 61 种行为保持重构技术的目录索引、按症状/原因选择指南和组合排序指南。适用于已知结构证据后,需要比较多个候选重构、检查前置条件与执行顺序的场景。输入为坏味/症状、结构证据和行为契约;输出为最小适用技术、可逆局部变换方案及必要的前置/组合关系,避免强制流水线。

bovinphang
bovinphang
热度 7.62
最近更新 2026-09-27 11:32:24
分类:开发依赖:读写文件应用场景:代码审查

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add fec-refactoring-catalog
Metadata
name
fec-refactoring-catalog
description
Use when selecting or composing behavior-preserving refactoring techniques after structural evidence is known, especially when multiple candidate transformations, preconditions, or ordering choices must be compared.

Refactoring Catalog Selection

Overview

Use the complete catalog as a decision aid, not as a list of automatic recipes. Select the smallest technique whose preconditions fit the evidence and behavior contract.

Workflow

  1. Locate the standard technique in the catalog index.
  2. If starting from a smell or symptom, use the selection guide to compare causes and alternatives.
  3. If several transformations are needed, use the composition guide to order only the prerequisites that fit the current code.
  4. Load the referenced family detail only when the technique is selected.

Selection Rules

  • A smell can have several valid candidates; determine the actual cause first.
  • Prefer reversible, local transformations over broad redesign.
  • Check public API, routing, state ownership, async/lifecycle, persistence, and SSR boundaries before execution.
  • Treat composition edges as conditional relationships, never mandatory pipelines.

Quick Reference

Need Reference
All 61 techniques Catalog index
Choose by symptom/cause Selection guide
Order related techniques Composition guide