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

simplify-code简化代码

Agent Skill

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

总安装

546

周安装

23

GitHub Stars

292

下载量

191
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/tobihagemann/turbo --skill simplify-code

简介

simplify-code 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Simplify Code

Review code for reuse, quality, efficiency, and clarity issues, then fix them.

Step 1: Determine the Scope

Determine what to review:

  • If a specific diff command was provided (e.g., git diff --cached), use that.
  • If a file list or directory was provided, review those files directly (read the full files, not a diff).
  • If neither was provided, determine the appropriate diff command (e.g., git diff, git diff --cached, git diff HEAD) based on the current git state. If there are no git changes, review the most recently modified files mentioned in the conversation.

Step 2: Launch Four Review Agents in Parallel

Use the Agent tool to launch all four agents below in a single assistant message so they run concurrently. Each Agent call uses model: "opus" and does not set run_in_background. Pass the scope from Step 1 to each agent.

Agent 1: Code Reuse Review

For each change:

  1. Search for existing utilities and helpers that could replace newly written code. Look for similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
  2. Flag any new function that duplicates existing functionality. Suggest the existing function to use instead.
  3. Flag any inline logic that could use an existing utility — hand-rolled string manipulation, manual path handling, custom environment checks, and similar patterns are common candidates.

Agent 2: Code Quality Review

Review the same changes for hacky patterns:

  1. Redundant state: state that duplicates existing state, cached values that could be derived, reactive subscriptions that could be direct calls
  2. Parameter sprawl: adding new parameters to a function instead of generalizing or restructuring existing ones
  3. Copy-paste with slight variation: near-duplicate code blocks that should be unified with a shared abstraction
  4. Leaky abstractions: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
  5. Stringly-typed code: using raw strings where constants, enums, or dedicated types already exist in the codebase
  6. Unnecessary wrapper nesting: container elements or wrapper layers that add no structural or layout value

Agent 3: Efficiency Review

Review the same changes for efficiency:

  1. Unnecessary work: redundant computations, repeated file reads, duplicate network/API calls, N+1 patterns
  2. Algorithmic complexity: nested iterations, repeated linear searches replaceable by sets/maps, missing early exits
  3. Missed concurrency: independent operations run sequentially when they could run in parallel
  4. Hot-path bloat: new blocking work added to startup or per-request hot paths
  5. Unnecessary existence checks: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
  6. Memory: unbounded data structures, missing cleanup, resource leaks
  7. Overly broad operations: reading entire files when only a portion is needed, loading all items when filtering for one

Agent 4: Clarity and Standards Review

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

  1. Project standards: coding conventions from CLAUDE.md not followed — import sorting, naming conventions, component patterns, error handling patterns, module style
  2. Unnecessary complexity: deep nesting, redundant abstractions, unclear variable or function names, comments that describe obvious code, nested ternary operators (prefer switch/if-else chains), redundant boolean comparisons (e.g., x == true instead of x)
  3. Unclear code: choose clarity over brevity — explicit code is better than overly compact code. Consolidate related logic, but not at the cost of readability
  4. Over-simplification: overly clever solutions that are hard to understand, too many concerns combined into single functions or components, "fewer lines" prioritized over readability (dense one-liners, nested ternaries), helpful abstractions removed that were aiding code organization
  5. Dead weight: unnecessary comments, redundant code, abstractions that add indirection without value

Step 3: Fix Issues

Wait for all four agents to complete. Aggregate their findings, then apply each fix directly, skipping false positives.

When done, briefly summarize what was fixed (or confirm the code was already clean).

Then use the TaskList tool and proceed to any remaining task.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.25%
按下载量换算69

Claude

29.76%
按下载量换算57

Cursor

19.27%
按下载量换算37

Gemini CLI

10.19%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills