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

code-simplifier代码简化

Agent Skill

code-simplifier 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,932

周安装

83

GitHub Stars

11

下载量

677
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

提供代码简化与重构的指导原则与最佳实践。

  • 适用于清理复杂 PR、提升可读性与维护性。
  • 核心原则包括保留功能、应用项目标准与渐进改进。
  • 修改前必须验证无回归,必要时请先咨询用户。
  • 支持多种语言与框架的格式化规则集成。code-simplifier 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Code Simplifier

A guide for simplifying and refining code while preserving functionality.

When to Use

  • Refactor, simplify code, clean up, code review
  • After completing a coding task or writing a logical chunk of code
  • Cleaning up complex PRs before review
  • Refactoring code for better readability and maintainability

Core Principles

1. Preserve Functionality

Never change what the code does - only how it does it.

  • All original features, outputs, and behaviors must remain intact
  • Test before and after to verify no regressions
  • If unsure, ask before refactoring

2. Apply Project Standards

Follow established coding standards from project configuration (CLAUDE.md,.editorconfig, ESLint, etc.):

  • Consistent import sorting and organization
  • Preferred function styles (arrow vs function keyword)
  • Explicit type annotations where required
  • Component patterns and naming conventions

3. 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

Critical Rules:

  • Avoid nested ternary operators - prefer switch statements or if/else chains
  • Avoid overly compact one-liners - explicit code is often better
  • Choose clarity over brevity

4. 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
  • Remove helpful abstractions that improve organization
  • Make the code harder to debug or extend

5. Focus Scope

Only refine code that has been recently modified or touched, unless explicitly instructed to review a broader scope.

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

Refactoring Patterns

See references/refactoring-patterns.md for common patterns.

Quick Checklist

Before submitting refactored code:

  • All tests pass
  • No functionality changed
  • Code follows project standards
  • No nested ternaries introduced
  • Variable names are clear and descriptive
  • No unnecessary abstractions added
  • Comments updated if logic changed
  • Import statements organized

Example Usage

Trigger phrases:

  • "Simplify this code"
  • "Make this clearer"
  • "Refine this implementation"
  • "Clean up this function"
  • "Review this PR for readability"

Workflow:

  1. Write code → Complete feature
  2. Run tests → Verify functionality
  3. Apply code-simplifier → Improve clarity
  4. Run tests again → Confirm no regressions
  5. Submit PR → Ready for review

Done Criteria

  • All tests pass after refactoring
  • No functionality changed
  • Code follows project standards
  • No nested ternaries or overly complex one-liners

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

30.82%
按下载量换算209

windsurf

23.9%
按下载量换算162

trae

18.1%
按下载量换算123

OpenCode

13.77%
按下载量换算93

Codex

8.36%
按下载量换算57

Antigravity

3.44%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills