Token导航 LogoToken导航

Agent Skill · 研究检索

codeprobe-code-smells(codeprobe 代码气味)

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

codeprobe-code-smells 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 70,834。

总安装 198周安装 8GitHub Stars 2下载 62核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/nishilbhave/codeprobe-claude --skill codeprobe-code-smells

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

codeprobe-code-smells 识别代码异味与反模式,涵盖冗余项、对象导向滥用等六大类。适用于重构前的质量评估,帮助发现 Long Method、Feature Envy 等问题。按影响程度分级提示,聚焦可维护性与可扩展性优化方向。安装前应核实是否具备足够权限扫描项目代码并生成分析报告。

建议优先处理高优先级项,避免在不必要的地方引入过度设计。

来源仓库内路径:skills/codeprobe-code-smells

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/nishilbhave/codeprobe-claude --skill codeprobe…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

codeprobe-code-smells 怎么安装?

在终端执行 npx skills add https://github.com/nishilbhave/codeprobe-claude --skill codeprobe-code-smel…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

codeprobe-code-smells 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

codeprobe-code-smells 需要什么权限?

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

codeprobe-code-smells 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

codeprobe-code-smells 用的人多吗?

公开数据是累计安装 198 次,近一周安装 8 次,下载 62 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

codeprobe-code-smells 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
codeprobe-code-smells

codeprobe 代码气味 · 本页

1982只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Standalone Mode

If invoked directly (not via the orchestrator), you must first:

  1. Read ../codeprobe/shared-preamble.md for the output contract, execution modes, and constraints.
  2. Load applicable reference files from ../codeprobe/references/ based on the project's tech stack.
  3. Default to full mode unless the user specifies otherwise.

Code Smells & Anti-Pattern Detector

Domain Scope

This sub-skill detects code smells and anti-patterns organized into these categories:

  1. Bloaters — Long Method, Large Class, Data Clumps, Primitive Obsession
  2. Object-Orientation Abusers — Feature Envy, Inappropriate Intimacy, Refused Bequest
  3. Change Preventers — Shotgun Surgery, Divergent Change
  4. Dispensables — Dead Code, Speculative Generality, Middle Man
  5. Couplers — Temporal Coupling
  6. Readability — Magic Numbers, Boolean Blindness, Deep Nesting

What It Does NOT Flag

  • Generated code — Migrations, compiled output, vendor directories (vendor/, node_modules/, dist/, build/, .next/), and auto-generated files (e.g., GraphQL codegen, Prisma client).
  • Test files with long setup methods — Test context is different; long setUp() or beforeEach() methods arranging test data are expected and acceptable.
  • Configuration files with many entries — A config file with 50 key-value pairs is not a "Large Class" smell.
  • Data migration files — These are procedural by nature and often contain long methods.
  • Third-party code checked into the repository (e.g., vendored libraries).
  • Structural issues already flagged by codeprobe-solid or codeprobe-architecture — Large classes may also be flagged as SRP violations or god objects. This sub-skill should still detect and report them, but the orchestrator will deduplicate overlapping findings at the same location.

Detection Instructions

Configurable Thresholds

Before analysis, check for a .codeprobe-config.json file in the project root. If present, load the severity_overrides section to adjust these defaults:

ThresholdConfig KeyDefault
Long Method LOC limitlong_method_loc30
Large Class LOC limitlarge_class_loc300
Deep Nesting max levelsdeep_nesting_max3

Bloaters

ID PrefixSmellSignalHow to DetectDefault ThresholdSeverity
SMELLLong MethodFunction/method exceeds LOC thresholdCount lines in each function/method body (excluding blank lines and single-line comments). Compare against long_method_loc threshold. For methods 2x over threshold, escalate to major.> 30 LOCMinor
SMELLLarge ClassClass exceeds LOC thresholdCount total lines in each class definition. Compare against large_class_loc threshold. For classes 2x over threshold, escalate to major (if not already major). Never escalate to critical — large classes are a maintainability concern, not a production defect.> 300 LOCMajor
SMELLData ClumpsSame 3+ params passed together in 3+ placesSearch for function/method signatures. Identify groups of 3+ parameters that appear together in 3+ different function signatures or call sites. These should be extracted into a parameter object or value object.3+ params, 3+ occurrencesMinor
SMELLPrimitive ObsessionString/int used where a value object is warrantedLook for string/integer variables representing domain concepts: email addresses (validated by regex inline), money amounts (numeric + currency passed separately), phone numbers, status strings compared in multiple places, ZIP codes, UUIDs passed as plain strings through multiple layers.Pattern recognitionMinor

Object-Orientation Abusers

ID PrefixSmellSignalHow to DetectDefault ThresholdSeverity
SMELLFeature EnvyMethod accesses another object's data 3x+ more than its ownCount how many times a method references $other->property or other.property versus $this->property or this.property (or self.). If external references outnumber internal ones by 3x or more, the method likely belongs in the other class.3+ external accessesMinor
SMELLInappropriate IntimacyClass accessing another's private/protected internalsSearch for reflection-based access (setAccessible(true), __get, __set magic methods accessing protected fields), friend class patterns, or direct access to properties that are conventionally private (prefixed with _ in Python/JS).Any occurrenceMajor
SMELLRefused BequestSubclass inherits but doesn't use most of parent's methodsExamine subclasses: if the parent has N public methods and the subclass overrides fewer than 30% of them while also not calling super/parent:: for most, this suggests the subclass doesn't truly need the inheritance relationship.Unused majority of parent methodsMinor

Change Preventers

ID PrefixSmellSignalHow to DetectDefault ThresholdSeverity
SMELLShotgun SurgeryChanging one concept requires edits in 5+ filesSearch for a single concept (e.g., a field name, a status value, a business rule) that appears across many files. If the same constant, column name, or business term appears in 5+ files without being centralized behind a single source of truth, flag it.5+ files for one conceptMajor
SMELLDivergent ChangeOne class modified for 3+ unrelated reasonsExamine large classes (> 200 LOC). Check whether the methods cluster around distinct, unrelated concerns. If a single class handles user authentication, email formatting, AND report generation, it has divergent change — any of those 3 areas changing forces this class to change.3+ distinct concernsMajor

Dispensables

ID PrefixSmellSignalHow to DetectDefault ThresholdSeverity
SMELLDead CodeUnreachable branches, unused imports, commented-out code blocksSearch for: (1) import/use/require statements for symbols never referenced elsewhere in the file, (2) commented-out code blocks (3+ consecutive commented lines that contain code syntax, not documentation), (3) functions/methods never called from anywhere in the codebase (use Grep across the project), (4) if (false) or if (0) blocks, unreachable code after unconditional return/throw/exit.Any occurrenceMinor
SMELLSpeculative GeneralityAbstractions/interfaces with only one implementation and no foreseeable secondSearch for interfaces, abstract classes, or generic type parameters that have exactly one concrete implementation. If the abstraction does not appear in a DI container config or test mock, and the domain doesn't suggest future variants, flag it as premature abstraction.Single implementationSuggestion
SMELLMiddle ManClass that only delegates to another class with no added logicLook for classes where every method simply calls the same method on an injected dependency and returns the result, with no added logic, validation, transformation, or error handling. The class adds an unnecessary indirection layer.Pure delegation in all methodsMinor

Couplers

ID PrefixSmellSignalHow to DetectDefault ThresholdSeverity
SMELLTemporal CouplingMethods must be called in specific order but nothing enforces itLook for patterns where: (1) method A must be called before method B but there's no compile-time or runtime check, (2) init()/setup() must be called before process() but the class allows process() to be called first, (3) sequential method calls with shared mutable state where reordering would cause bugs. Check for comments like "must call X first" or "call after Y".Implicit ordering dependencyMajor

Readability

ID PrefixSmellSignalHow to DetectDefault ThresholdSeverity
SMELLMagic NumbersHardcoded numeric/string literals without named constants in business logicSearch for numeric literals (other than 0, 1, -1) and string literals used in conditionals, calculations, or business logic. Flag values like 86400, 3.14159, "pending", 0.15 that appear in logic paths without a named constant. Exclude: array indices, loop bounds of 0/1, common math constants in math libraries.Any in logic pathsMinor
SMELLBoolean BlindnessMethod with 2+ boolean paramsSearch for function/method signatures with 2 or more bool/boolean parameters. Call sites like process(true, false, true) are unreadable. Suggest using named parameters, enums, or option objects instead.2+ boolean parametersMinor
SMELLDeep NestingIndentation levels exceed thresholdCount nesting depth in each function: each if, for, while, foreach, switch, try, match that is nested inside another adds a level. Flag when nesting exceeds deep_nesting_max threshold. Suggest early returns, guard clauses, or method extraction.> 3 levelsMinor

ID Prefix & Fix Prompt Examples

All findings use the SMELL- prefix, numbered sequentially: SMELL-001, SMELL-002, etc.

Fix Prompt Examples

  • "Extract lines 45-90 of UserService@register into a private method validateAndNormalizeInput() — the method is 120 LOC doing 3 unrelated things: input validation (lines 45-65), data normalization (lines 66-80), and persistence (lines 81-90). Keep persistence in register() and extract the other two concerns."
  • "Replace the magic number 86400 at line 55 of app/Services/CacheService.php with a named constant SECONDS_PER_DAY = 86400 defined at the top of the class."
  • "Refactor processOrder(bool $isExpress, bool $requiresSignature, bool $isFragile) in OrderProcessor.php (line 30) to accept a ShippingOptions value object instead of 3 boolean parameters. Create a ShippingOptions class with named properties."
  • "Remove the commented-out code block at lines 88-105 of PaymentGateway.php — this is dead code from a previous implementation. If needed later, it can be recovered from version control."
  • "In ReportGenerator.php, the generate() method at line 20 is 95 LOC. Extract the data-fetching logic (lines 25-50) into fetchReportData() and the formatting logic (lines 51-85) into formatReport(). The generate() method should orchestrate these two steps."

平台分布

Codex

33.43%
按下载量换算21

Claude

30.17%
按下载量换算19

Cursor

17.04%
按下载量换算11

Gemini CLI

9.36%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

继续浏览同类 Skills