360 Secure SkillHub
360 安全技能中心

Code Simplifier

核心功能:针对变更后的代码,检查可复用工具、代码异味(如重复逻辑、冗余注释等)及效率问题(如重复操作、性能损耗),输出具体修复方案与优化摘要。典型场景为代码修改完成、交付前的代码清理。输入为相关代码差异/变更文件,可指定聚焦领域;输出为具体修复改动及优化总结,严格限定仅处理变更代码,避免无意义风格改写。

wimi321
wimi321
热度 60.00
最近更新 2026-05-11 17:39:12
分类:开发依赖:纯提示词应用场景:代码审查

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add claude-code-code-simplifier
Metadata
name
code_simplifier
description
Use when changed code should be reviewed for reuse, code quality, and efficiency, then cleaned up before finalizing.

Code Simplifier

Use this skill after making changes and before wrapping up.

Workflow

  1. Inspect the relevant diff or latest modified files.
  2. Review for existing utilities that should be reused.
  3. Review for code smell: parameter sprawl, copy-paste, leaky abstractions, or unnecessary comments.
  4. Review for efficiency problems: repeated work, unnecessary reads, event churn, and hot-path bloat.
  5. Fix confirmed issues and summarize what changed.

Guardrails

  • Prefer concrete fixes over broad stylistic churn.
  • Keep attention on changed code, not the whole codebase.
  • If no issue exists, say so explicitly.

Example Requests

  • Review my diff for duplicate logic and unnecessary complexity.
  • Clean up this changed code before I ship it.

Inputs

  • Relevant diff or changed files
  • Optional focus area

Outputs

  • Concrete cleanup changes
  • Short summary of improvements

Success Criteria

  • Duplication or awkward abstractions were reduced.
  • Performance regressions were checked.
  • No unnecessary churn was introduced.

Non-Goals

  • Massive style-only rewrites
  • Review of untouched code with no link to the change

Source Provenance

Derived from src/skills/bundled/simplify.ts.