Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

review-clean-code审查干净的代码

Agent Skill

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

总安装

1,248

周安装

50

GitHub Stars

338

下载量

404
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/heyvhuang/ship-faster --skill review-clean-code

简介

review-clean-code 用于处理 GitHub 仓库、Issue 和代码协作信息。

  • 适合在代码审查、前端设计协作等场景中使用。review-clean-code 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 通过 npx 命令从 GitHub 仓库安装并使用该技能。
  • 安装前应确认仓库权限、维护状态及是否涉及敏感操作。
  • 当前无详细功能描述,需查阅原始文档了解具体用途。

SKILL.md

Clean Code Review

Focused on 7 high-impact review dimensions based on "Clean Code" principles.

Review Workflow

Review Progress:
- [ ] 1. Scan codebase: identify files to review
- [ ] 2. Check each dimension (naming, functions, DRY, YAGNI, magic numbers, clarity, conventions)
- [ ] 3. Rate severity (High/Medium/Low) for each issue
- [ ] 4. Generate report sorted by severity

Core Principle: Preserve Functionality

All suggestions target implementation approach only—never suggest changing the code's functionality, output, or behavior.

Check Dimensions

1. Naming Issues【Meaningful Names】

Check for:

  • Meaningless names like data1, temp, result, info, obj
  • Inconsistent naming for same concepts (get/fetch/retrieve mixed)
// ❌
const d = new Date();
const data1 = fetchUser();

// ✅
const currentDate = new Date();
const userProfile = fetchUser();

2. Function Issues【Small Functions + SRP】

Check for:

  • Functions exceeding 100 lines
  • More than 3 parameters
  • Functions doing multiple things
// ❌ 7 parameters
function processOrder(user, items, address, payment, discount, coupon, notes)

// ✅ Use parameter object
interface OrderParams { user: User; items: Item[]; shipping: Address; payment: Payment }
function processOrder(params: OrderParams)

3. Duplication Issues【DRY】

Check for:

  • Similar if-else structures
  • Similar data transformation/error handling logic
  • Copy-paste traces

4. Over-Engineering【YAGNI】

Check for:

  • if (config.legacyMode) branches that are never true
  • Interfaces with only one implementation
  • Useless try-catch or if-else
// ❌ YAGNI violation: unused compatibility code
if (config.legacyMode) {
  // 100 lines of compatibility code
}

5. Magic Numbers【Avoid Hardcoding】

Check for:

  • Bare numbers without explanation
  • Hardcoded strings
// ❌
if (retryCount > 3) // What is 3?
setTimeout(fn, 86400000) // How long is this?

// ✅
const MAX_RETRY_COUNT = 3;
const ONE_DAY_MS = 24 * 60 * 60 * 1000;

6. Structural Clarity【Readability First】

Check for:

  • Nested ternary operators
  • Overly compact one-liners
  • Deep conditional nesting (> 3 levels)
// ❌ Nested ternary
const status = a ? (b ? 'x' : 'y') : (c ? 'z' : 'w');

// ✅ Use switch or if/else
function getStatus(a, b, c) {
  if (a) return b ? 'x' : 'y';
  return c ? 'z' : 'w';
}

7. Project Conventions【Consistency】

Check for:

  • Mixed import order (external libs vs internal modules)
  • Inconsistent function declaration styles
  • Mixed naming conventions (camelCase vs snake_case)
// ❌ Inconsistent style
import { api } from './api'
import axios from 'axios'  // External lib should come first
const handle_click = () => { ... }  // Mixed naming style

// ✅ Unified style
import axios from 'axios'
import { api } from './api'
function handleClick(): void { ... }
[!TIP] Project conventions should refer to CLAUDE.md, AGENTS.md, or project-defined coding standards.

Severity Levels

LevelCriteria
HighAffects maintainability/readability, should fix immediately
MediumRoom for improvement, recommended fix
LowCode smell, optional optimization

Output Format

### [Issue Type]: [Brief Description]

- **Principle**: [Clean Code principle]
- **Location**: `file:line`
- **Severity**: High/Medium/Low
- **Issue**: [Specific description]
- **Suggestion**: [Fix direction]

Artifacts (Pipeline Mode)

  • Output: clean-code-review.md (human-readable report)
  • Output: clean-code-review.json (structured issue list for aggregation/deduplication/statistics)

References

Detailed examples: See detailed-examples.md

  • Complete cases for each dimension (naming, functions, DRY, YAGNI, magic numbers)

Language patterns: See language-patterns.md

  • TypeScript/JavaScript common issues
  • Python common issues
  • Go common issues

Multi-Agent Parallel

Split by the following dimensions for parallel multi-agent execution:

  1. By check dimension - One agent per dimension (7 total)
  2. By module/directory - One agent per module
  3. By language - One agent each for TypeScript, Python, Go
  4. By file type - Components, hooks, utilities, type definitions

Example: /review-clean-code --scope=components or --dimension=naming

Deduplication and unified severity rating needed when aggregating.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.02%
按下载量换算146

Claude

32.04%
按下载量换算129

Cursor

19.25%
按下载量换算78

Gemini CLI

10.28%
按下载量换算42

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills