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

code-quality-expert代码质量专家

Agent Skill

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

总安装

2,052

周安装

83

GitHub Stars

25

下载量

644
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill code-quality-expert

简介

code-quality-expert 提供 Clean Code 实战指南,涵盖命名、注释、常量与函数设计的黄金法则。

  • 适用于代码评审、新人培训与重构指导,强调自文档化与魔法数字消除。
  • 提倡“三法则”抽象时机判断,反对过早优化与过度工程。
  • 可作为日常编码 Checklist,持续改善代码可读性与团队协作效率。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Code Quality Expert

clean code

When reviewing or writing code, apply these guidelines:

Clean Code Guidelines

Constants Over Magic Numbers

  • Replace hard-coded values with named constants
  • Use descriptive constant names that explain the value's purpose
  • Keep constants at the top of the file or in a dedicated constants file

Meaningful Names

  • Variables, functions, and classes should reveal their purpose
  • Names should explain why something exists and how it's used
  • Avoid abbreviations unless they're universally understood

Smart Comments

  • Don't comment on what the code does - make the code self-documenting
  • Use comments to explain why something is done a certain way
  • Document APIs, complex algorithms, and non-obvious side effects

Single Responsibility

  • Each function should do exactly one thing
  • Functions should be small and focused
  • If a function needs a comment to explain what it does, it should be split

DRY (Don't Repeat Yourself)

  • Extract repeated code into reusable functions
  • Share common logic through proper abstraction
  • Maintain single sources of truth

Clean Structure

  • Keep related code together
  • Organize code in a logical hierarchy
  • Use consistent file and folder naming conventions

Encapsulation

  • Hide implementation details
  • Expose clear interfaces
  • Move nested conditionals into well-named functions

Code Quality Maintenance

  • Refactor continuously
  • Fix technical debt early
  • Leave code cleaner than you found it

Testing

  • Write tests before fixing bugs
  • Keep tests readable and maintainable
  • Test edge cases and error conditions

Version Control

  • Write clear commit messages
  • Make small, focused commits
  • Use meaningful branch names

code quality and best practices

When reviewing or writing code, apply these guidelines:

  • Adhere to code quality and best practices.
  • Apply relevant paradigms and principles.
  • Use semantic naming and abstractions.

code quality standards

When reviewing or writing code, apply the principles above consistently. Focus on:

  • Readability over cleverness
  • Consistency within the codebase
  • Progressive improvement (leave code better than you found it)

Consolidated Skills

This expert skill consolidates 1 individual skills:

  • code-quality-expert

Iron Laws

  1. ALWAYS leave code cleaner than you found it — every change is an opportunity for progressive improvement; accumulating small improvements prevents large-scale refactors from becoming necessary.
  2. NEVER use magic numbers — hard-coded values without context make code unreadable and unmaintainable; always extract to named constants with descriptive names that explain the purpose.
  3. ALWAYS write self-documenting code first, then add comments only for "why" — comments explaining "what" the code does are redundant and become stale; reserve comments for non-obvious design decisions.
  4. NEVER allow functions to do more than one thing — single responsibility is the strongest predictor of testability and maintainability; a function needing a "and" in its name should be split.
  5. NEVER optimize prematurely — write clear, correct code first; profile to identify actual bottlenecks before optimizing; premature optimization produces complex code with unmeasured benefit.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Magic numbers in logicif (status === 200) is opaque; value could changeExtract to const HTTP_OK = 200 with clear name
Comments explaining "what" not "why"Code changes make comments stale and misleadingWrite self-documenting code; comment only design rationale
God functions (>50 lines, multiple concerns)Hard to test, debug, and modify independentlyExtract single-purpose functions with clear names
Premature optimizationAdds complexity before proving a bottleneck existsProfile first; only optimize measured hot paths
Duplicated code blocksBug fixes must be applied in N placesExtract to reusable function; DRY principle

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.15%
按下载量换算239

Claude

30.01%
按下载量换算193

Cursor

17.19%
按下载量换算111

Gemini CLI

8.5%
按下载量换算55

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills