/smell
Detect software architecture bad smells, algorithmic complexity hotspots, and anti-patterns in a codebase. Produces a detailed markdown report identifying violations of architectural principles, design patterns, code quality, and performance complexity. Triggers on: smell, code
$ npx -y skills add smallnest/goal-workflow --skill smell --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/smell
Context preview
The summary Claude sees to decide when to auto-load this skill.
Detect software architecture bad smells, algorithmic complexity hotspots, and anti-patterns in a codebase. Produces a detailed markdown report identifying violations of architectural principles, design patterns, code quality, and performance complexity. Triggers on: smell, code
SKILL.md
smell.SKILL.mdname: smell
description: "Detect software architecture bad smells, algorithmic complexity hotspots, and anti-patterns in a codebase. Produces a detailed markdown report identifying violations of architectural principles, design patterns, code quality, and performance complexity. Triggers on: smell, code smell, architecture smell, find anti-patterns, detect bad smells, complexity analysis, 代码坏味道, 架构坏味道, 反模式, 找出坏味道, 复杂度分析."
user-invocable: true
Smell — Architecture Bad Smell Detector
Analyze a codebase to find violations of software architecture principles, anti-patterns, code "bad smells," and algorithmic complexity hotspots. Produce a comprehensive, actionable markdown report.
**Knowledge base:** This skill encodes architectural patterns, anti-patterns, code smells, and algorithmic complexity heuristics drawn from industry research and practice, including the classic code smells catalog by Martin Fowler / Kent Beck (as organized on refactoring.guru: Bloaters, Object-Orientation Abusers, Change Preventers, Dispensables, Couplers).
---
The Job
1. Understand the scope — ask what part of the project to analyze (full project, specific module, or recent changes) 2. Scan the codebase using `find`, `grep`, and `Agent` (Explore subagent) to gather evidence 3. Identify architectural smells and anti-patterns 4. Generate a detailed markdown report saved to `tasks/smell-report-[timestamp].md` 5. Present a summary of findings to the user
---
Step 1: Scope Clarification
Ask the user:
What scope should I analyze?
A. Entire project (thorough, may take time)
B. Specific module/directory: [please specify]
C. Only recently changed files (git diff)
D. Only architectural-level issues (skip low-level code smells)
If the user doesn't specify, default to option A for small projects (< 100 files) or C for large projects.
---
Step 2: Evidence Gathering
**Use the Explore subagent** (`Agent` with `subagent_type: "Explore"`) to scan the codebase for architectural patterns and anti-patterns. Run multiple parallel explorations:
Exploration Commands
Run these in parallel to gather evidence efficiently:
1. **Project Structure Scan:** Map the directory tree, identify the architectural style (layered, modular monolith, microservices, etc.) 2. **Dependency Analysis:** Find import/include patterns, check for circular dependencies, identify coupling hotspots 3. **Module/Component Scan:** Identify God Objects (files > 500 lines), check cohesion, check single responsibility violations 4. **Pattern Detection:** Look for known anti-pattern signatures (static cling, service locator abuse, leaky abstractions) 5. **Testing Scan:** Check test coverage patterns, test file locations, test-to-code ratios 6. **Naming & Clarity Scan:** Flag misleading names, overly generic names (Manager, Helper, Util), inconsistent naming conventions 7. **Complexity Scan:** Detect algorithmic complexity hotspots — nested loops, N+1 queries, repeated scans, sort-in-loop, expensive recomputation in render paths
Key Heuristics
| Category | Smell | Detection Heuristic | |----------|-------|-------------------| | **Architecture** | Big Ball of Mud | No clear directory structure; everything in root or one flat folder; no separation of concerns | | **Architecture** | Violated Layer Boundaries | Inner layers importing outer layers; infrastructure code in domain/core layer | | **Architecture** | Missing Architecture | No `src/`, `lib/`, `core/` separation; SQL inline with UI code; HTTP handlers mixed with business logic | | **Architecture** | Distributed Monolith | Microservices sharing a database; services that can't deploy independently | | **Architecture** | Anemic Domain Model | Model/entity classes with only getters/setters and no behavior; all logic in services | | **Architecture** | CQRS Without Need | Separate read/write models for simple CRUD; unnecessary complexity | | **Architecture** | Over-Layered Architecture | Excessive layers/tiers that add pass-through code with no real value | | **Architecture** | Over-Abstraction | So many indirections/interfaces/generics that you get lost following the code | | **Architecture** | Futuristic Architecture | Speculative flexibility for requirements that may never come (predicting the future) | | **Architecture** | Technology-Enthusiast Architecture | Shiny/unproven tech adopted in production because it's new, not because it fits | | **Architecture** | Overkill Architecture | Heavyweight architecture/tech thrown at a simple problem | | **Architecture** | Cloud/Visio Architecture | Diagrams disconnected from the actual code and runtime reality | | **Coupling** | Circular Dependencies | Module A imports B, B imports A; detected via import graph analysis | | **Coupling** | Content Coupling | One module directly accesses another's internal/private members | | **Coupling** | Common Coupling | Excessive global variables/shared mutable state; singleton abuse | | **Coupling** | Stamp Coupling | Passing large data structures when only a few fields are needed | | **Cohesion** | God Object | Single class/module > 500 lines; > 20 public methods; handles unrelated concerns | | **Cohesion** | Shotgun Surgery | A single change requires touching 5+ files across unrelated modules | | **Cohesion** | Feature Envy | Method calls foreign class methods more than its own class methods | | **Cohesion** | Data Clumps | Same group of 3+ parameters appearing together in multiple method signatures | | **Design** | Leaky Abstractions | Implementation details (DB queries, HTTP calls) exposed through interfaces | | **Design** | Static Cling | Excessive use of static methods; static state that prevents testability | | **Design** | Service Locator Abuse | DI container passed around instead of proper constructor injection | | **Design** | Violated SOLID | SRP violations, OCP violations (switch/if-else chains on types), ISP violations (fat interfaces) | | **Design** | Switch Statements |
Read more
name: smell description: "Detect software architecture bad smells, algorithmic complexity hotspots, and anti-patterns in a codebase. Produces a detailed markdown report identifying violations of architectural principles, design patterns, code quality, and performance complexity. Triggers on: smell, code smell, architecture smell, find anti-patterns, detect bad smells, complexity analysis, 代码坏味道, 架构坏味道, 反模式, 找出坏味道, 复杂度分析." user-invocable: true
Smell — Architecture Bad Smell Detector
Analyze a codebase to find violations of software architecture principles, anti-patterns, code "bad smells," and algorithmic complexity hotspots. Produce a comprehensive, actionable markdown report.
**Knowledge base:** This skill encodes architectural patterns, anti-patterns, code smells, and algorithmic complexity heuristics drawn from industry research and practice, including the classic code smells catalog by Martin Fowler / Kent Beck (as organized on refactoring.guru: Bloaters, Object-Orientation Abusers, Change Preventers, Dispensables, Couplers).
---
The Job
1. Understand the scope — ask what part of the project to analyze (full project, specific module, or recent changes) 2. Scan the codebase using `find`, `grep`, and `Agent` (Explore subagent) to gather evidence 3. Identify architectural smells and anti-patterns 4. Generate a detailed markdown report saved to `tasks/smell-report-[timestamp].md` 5. Present a summary of findings to the user
---
Step 1: Scope Clarification
Ask the user:
What scope should I analyze? A. Entire project (thorough, may take time) B. Specific module/directory: [please specify] C. Only recently changed files (git diff) D. Only architectural-level issues (skip low-level code smells)
If the user doesn't specify, default to option A for small projects (< 100 files) or C for large projects.
---
Step 2: Evidence Gathering
**Use the Explore subagent** (`Agent` with `subagent_type: "Explore"`) to scan the codebase for architectural patterns and anti-patterns. Run multiple parallel explorations:
Exploration Commands
Run these in parallel to gather evidence efficiently:
1. **Project Structure Scan:** Map the directory tree, identify the architectural style (layered, modular monolith, microservices, etc.) 2. **Dependency Analysis:** Find import/include patterns, check for circular dependencies, identify coupling hotspots 3. **Module/Component Scan:** Identify God Objects (files > 500 lines), check cohesion, check single responsibility violations 4. **Pattern Detection:** Look for known anti-pattern signatures (static cling, service locator abuse, leaky abstractions) 5. **Testing Scan:** Check test coverage patterns, test file locations, test-to-code ratios 6. **Naming & Clarity Scan:** Flag misleading names, overly generic names (Manager, Helper, Util), inconsistent naming conventions 7. **Complexity Scan:** Detect algorithmic complexity hotspots — nested loops, N+1 queries, repeated scans, sort-in-loop, expensive recomputation in render paths
Key Heuristics
| Category | Smell | Detection Heuristic | |----------|-------|-------------------| | **Architecture** | Big Ball of Mud | No clear directory structure; everything in root or one flat folder; no separation of concerns | | **Architecture** | Violated Layer Boundaries | Inner layers importing outer layers; infrastructure code in domain/core layer | | **Architecture** | Missing Architecture | No `src/`, `lib/`, `core/` separation; SQL inline with UI code; HTTP handlers mixed with business logic | | **Architecture** | Distributed Monolith | Microservices sharing a database; services that can't deploy independently | | **Architecture** | Anemic Domain Model | Model/entity classes with only getters/setters and no behavior; all logic in services | | **Architecture** | CQRS Without Need | Separate read/write models for simple CRUD; unnecessary complexity | | **Architecture** | Over-Layered Architecture | Excessive layers/tiers that add pass-through code with no real value | | **Architecture** | Over-Abstraction | So many indirections/interfaces/generics that you get lost following the code | | **Architecture** | Futuristic Architecture | Speculative flexibility for requirements that may never come (predicting the future) | | **Architecture** | Technology-Enthusiast Architecture | Shiny/unproven tech adopted in production because it's new, not because it fits | | **Architecture** | Overkill Architecture | Heavyweight architecture/tech thrown at a simple problem | | **Architecture** | Cloud/Visio Architecture | Diagrams disconnected from the actual code and runtime reality | | **Coupling** | Circular Dependencies | Module A imports B, B imports A; detected via import graph analysis | | **Coupling** | Content Coupling | One module directly accesses another's internal/private members | | **Coupling** | Common Coupling | Excessive global variables/shared mutable state; singleton abuse | | **Coupling** | Stamp Coupling | Passing large data structures when only a few fields are needed | | **Cohesion** | God Object | Single class/module > 500 lines; > 20 public methods; handles unrelated concerns | | **Cohesion** | Shotgun Surgery | A single change requires touching 5+ files across unrelated modules | | **Cohesion** | Feature Envy | Method calls foreign class methods more than its own class methods | | **Cohesion** | Data Clumps | Same group of 3+ parameters appearing together in multiple method signatures | | **Design** | Leaky Abstractions | Implementation details (DB queries, HTTP calls) exposed through interfaces | | **Design** | Static Cling | Excessive use of static methods; static state that prevents testability | | **Design** | Service Locator Abuse | DI container passed around instead of proper constructor injection | | **Design** | Violated SOLID | SRP violations, OCP violations (switch/if-else chains on types), ISP violations (fat interfaces) | | **Design** | Switch Statements |
An AI-driven development workflow — from PRD to shipped code, all within Claude Code.
Other skills on goal-workflow-skills.
- /article-icons
Illustrate an article (Markdown, HTML, etc.) with animated-style icons from itshover.com/icons. Fetches icons as clean inline SVG and places them at section headings, key concepts, lists, and callouts. Triggers on: /article-icons, 配图, 给文章配图标, add icons to article, illustrate
Open skill - /code-to-spec
Reverse-engineer a SPEC document from an existing project. Analyzes code, config, tests, and structure to produce a comprehensive specification. Triggers on: code-to-spec, reverse spec, generate spec, 逆向规格, 生成规格文档, 生成设计文档, 生成设计方案, extract spec, document this project, what does
Open skill - /graph
Graph engineering for parallel task execution: convert a task, PRD, SPEC, or issue set into a dependency graph (DAG), layer it into supersteps, then implement each independent node concurrently with subagents — each node runs /goal → /review-it → /ship-it in an isolated git
Open skill - /humanize-it
对指定文档进行去 AI 味的改写。自动选择最合适的人性化策略(humanizer-zh / humanize-chinese / technical-writing), 迭代改写直到效果达标或迭代 42 次为止。适用于中文文本的去 AI 化处理,包括通用文章、技术文档、学术论文等。 Use when user says: "humanize this", "去AI味", "降AIGC", "人性化改写", "改成人话", "去除AI痕迹", "humanize document", "make text human-like", "去机器味",
Open skill - /insight-diagram
为任意项目生成 UML 图、架构图和流程图。分析代码库后让用户选择要生成的图表类型,使用 architecture-diagram skill 渲染为 HTML+SVG,保存到 docs/ 目录。适用于任何软件项目的文档可视化。
Open skill - /listenhub-tts
使用 ListenHub API 将文本转换为语音(TTS)。支持三种模式:快速合成(/v1/tts)、 多角色脚本(/v1/speech)、长文本流式合成(/v1/flow-speech/episodes)。 音色未指定时自动获取音色列表供用户选择,默认使用 chat-girl-105-cn(晓曼)。 Use when user says: "tts", "text to speech", "语音合成", "文字转语音", "朗读", "生成语音", "生成音频", "转音频", "text to audio"
Open skill

