Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

simplify-code简化代码

Agent Skill

simplify-code 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

766

周安装

31

GitHub Stars

35,669

下载量

241
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill simplify-code

简介

simplify-code 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 它属于研究检索类技能,适用于多种宿主环境。
  • 当前暂无更多功能细节,需参考原始文档进一步了解。

SKILL.md

Simplify Code

Review changed code for reuse, quality, efficiency, and clarity issues. Use Codex sub-agents to review in parallel, then optionally apply only high-confidence, behavior-preserving fixes.

When to Use

  • When the user asks to simplify, clean up, refactor, or review changed code.
  • When you want high-confidence, behavior-preserving improvements on a scoped diff.

Modes

Choose the mode from the user's request:

  • review-only: user asks to review, audit, or check the changes
  • safe-fixes: user asks to simplify, clean up, or refactor the changes
  • fix-and-validate: same as safe-fixes, but also run the smallest relevant validation after edits

If the user does not specify, default to:

  • review-only for "review", "audit", or "check"
  • safe-fixes for "simplify", "clean up", or "refactor"

Step 1: Determine the Scope and Diff Command

Prefer this scope order:

  1. Files or paths explicitly named by the user
  2. Current git changes
  3. Files edited earlier in the current Codex turn
  4. Most recently modified tracked files, only if the user asked for a review but there is no diff

If there is no clear scope, stop and say so briefly.

When using git changes, determine the smallest correct diff command based on the repo state:

  • unstaged work: git diff
  • staged work: git diff --cached
  • branch or commit comparison explicitly requested by the user: use that exact diff target
  • mixed staged and unstaged work: review both

Do not assume git diff HEAD is the right default when a smaller diff is available.

Before reviewing standards or applying fixes, read the repo's local instruction files and relevant project docs for the touched area. Prefer the closest applicable guidance, such as:

  • AGENTS.md
  • repo workflow docs
  • architecture or style docs for the touched module

Use those instructions to distinguish real issues from intentional local patterns.

Step 2: Launch Four Review Sub-Agents in Parallel

Use Codex sub-agents when the scope is large enough for parallel review to help. For a tiny diff or one very small file, it is acceptable to review locally instead.

When spawning sub-agents:

  • give each sub-agent the same scope
  • tell each sub-agent to inspect only its assigned review role
  • ask for concise, structured findings only
  • ask each sub-agent to report file, line or symbol, problem, recommended fix, and confidence

Use four review roles.

Sub-Agent 1: Code Reuse Review

Review the changes for reuse opportunities:

  1. Search for existing helpers, utilities, or shared abstractions that already solve the same problem.
  2. Flag duplicated functions or near-duplicate logic introduced in the change.
  3. Flag inline logic that should call an existing helper instead of re-implementing it.

Recommended sub-agent role: explorer for broad codebase lookup, or reviewer if a stronger review pass is more useful than wide search.

Sub-Agent 2: Code Quality Review

Review the same changes for code quality issues:

  1. Redundant state, cached values, or derived values stored unnecessarily
  2. Parameter sprawl caused by threading new arguments through existing call chains
  3. Copy-paste with slight variation that should become a shared abstraction
  4. Leaky abstractions or ownership violations across module boundaries
  5. Stringly-typed values where existing typed contracts, enums, or constants already exist

Recommended sub-agent role: reviewer

Sub-Agent 3: Efficiency Review

Review the same changes for efficiency issues:

  1. Repeated work, duplicate reads, duplicate API calls, or unnecessary recomputation
  2. Sequential work that could safely run concurrently
  3. New work added to startup, render, request, or other hot paths without clear need
  4. Pre-checks for existence when the operation itself can be attempted directly and errors handled
  5. Memory growth, missing cleanup, or listener/subscription leaks
  6. Overly broad reads or scans when the code only needs a subset

Recommended sub-agent role: reviewer

Sub-Agent 4: Clarity and Standards Review

Review the same changes for clarity, local standards, and balance:

  1. Violations of local project conventions or module patterns
  2. Unnecessary complexity, deep nesting, weak names, or redundant comments
  3. Overly compact or clever code that reduces readability
  4. Over-simplification that collapses separate concerns into one unclear unit
  5. Dead code, dead abstractions, or indirection without value

Recommended sub-agent role: reviewer

Only report issues that materially improve maintainability, correctness, or cost. Do not churn code just to make it look different.

Step 3: Aggregate Findings

Wait for all review sub-agents to complete, then merge their findings.

Normalize findings into this shape:

  1. File and line or nearest symbol
  2. Category: reuse, quality, efficiency, or clarity
  3. Why it is a problem
  4. Recommended fix
  5. Confidence: high, medium, or low

Discard weak, duplicative, or instruction-conflicting findings before editing.

Step 4: Fix Issues Carefully

In review-only mode, stop after reporting findings.

In safe-fixes or fix-and-validate mode:

  • Apply only high-confidence, behavior-preserving fixes
  • Skip subjective refactors that need product or architectural judgment
  • Preserve local patterns when they are intentional or instruction-backed
  • Keep edits scoped to the reviewed files unless a small adjacent change is required to complete the fix correctly

Prefer fixes like:

  • replacing duplicated code with an existing helper
  • removing redundant state or dead code
  • simplifying control flow without changing behavior
  • narrowing overly broad operations
  • renaming unclear locals when the scope is contained

Do not stage, commit, or push changes as part of this skill.

Step 5: Validate When Required

In fix-and-validate mode, run the smallest relevant validation for the touched scope after edits.

Examples:

  • targeted tests for the touched module
  • typecheck or compile for the touched target
  • formatter or lint check if that is the project's real safety gate

Prefer fast, scoped validation over full-suite runs unless the change breadth justifies more.

If validation is skipped because the user asked not to run it, say so explicitly.

Step 6: Summarize Outcome

Close with a brief result:

  • what was reviewed
  • what was fixed, if anything
  • what was intentionally left alone
  • whether validation ran

If the code is already clean for this rubric, say that directly instead of manufacturing edits.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.12%
按下载量换算87

Claude

28.58%
按下载量换算69

Cursor

18.53%
按下载量换算45

Gemini CLI

8.7%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills