360 Secure SkillHub
360 安全技能中心

Refactoring Catalog

该 Skill 提供重构目录索引、按症状选择指南和组合指南,帮助在已知结构证据与行为契约后,比较候选重构、检查前置条件并确定最小、可逆的执行顺序;不自动修改代码,也不包含各技术族的完整细节。

bovinphang
bovinphang
热度 7.65
最近更新 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