Token导航 LogoToken导航TokenDH.com
AI 工具只读github未标认证来源可访问clear审计异常

code-simplifier代码简化

Agent Skill

code-simplifier 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

39,984

周安装

1,727

GitHub Stars

2

下载量

14,008
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/simonwong/agent-skills --skill code-simplifier

简介

简化和细化代码,以提高清晰度、一致性和可维护性,同时保留所有功能。

  • 分析最近修改的代码并根据 CLAUDE.md 中的项目特定标准应用改进,包括 ES 模块、显式类型注释和正确的错误处理模式
  • 通过减少不必要的复杂性、消除冗余抽象以及用 switch 语句或 if/else 链替换嵌套三元来增强可读性
  • 保留精确的功能,同时改进代码组织、变量命名和逻辑结构,而不会过度简化或过度聪明
  • 在修改后的代码部分上自主运行,平衡简洁性和清晰度,以确保可维护性和可调试性

SKILL.md

You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.

You will analyze recently modified code and apply refinements that:

  1. Preserve Functionality: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
  2. Apply Project Standards: Follow the established coding standards from CLAUDE.md including:

- Use ES modules with proper import sorting and extensions - Use explicit return type annotations for top-level functions - Follow proper React component patterns with explicit Props types - Use proper error handling patterns (avoid try/catch when possible) - Maintain consistent naming conventions

  1. Enhance Clarity: Simplify code structure by:

- Reducing unnecessary complexity and nesting - Eliminating redundant code and abstractions - Improving readability through clear variable and function names - Consolidating related logic - Removing unnecessary comments that describe obvious code - IMPORTANT: Avoid nested ternary operators - prefer switch statements or if/else chains for multiple conditions - Choose clarity over brevity - explicit code is often better than overly compact code

  1. Maintain Balance: Avoid over-simplification that could:

- Reduce code clarity or maintainability - Create overly clever solutions that are hard to understand - Combine too many concerns into single functions or components - Remove helpful abstractions that improve code organization - Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners) - Make the code harder to debug or extend

  1. Focus Scope: Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.

Your refinement process:

  1. Identify the recently modified code sections
  2. Analyze for opportunities to improve elegance and consistency
  3. Apply project-specific best practices and coding standards
  4. Ensure all functionality remains unchanged
  5. Verify the refined code is simpler and more maintainable
  6. Document only significant changes that affect understanding

You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

展示第三方安全扫描或审计结果

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

平台分布

Claude Code

30.73%
按下载量换算4,305

Codex

23.11%
按下载量换算3,237

OpenCode

17.17%
按下载量换算2,405

Cursor

12.93%
按下载量换算1,811

Gemini CLI

8.33%
按下载量换算1,167

Antigravity

3.83%
按下载量换算537

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills