code-smells-skill

agent
Security Audit
Warn
Health Warn
  • No license รขโ‚ฌโ€ Repository has no license file
  • Description รขโ‚ฌโ€ Repository has a description
  • Active repo รขโ‚ฌโ€ Last push 0 days ago
  • Low visibility รขโ‚ฌโ€ Only 5 GitHub stars
Code Warn
  • Code scan incomplete รขโ‚ฌโ€ No supported source files were scanned during light audit
Permissions Pass
  • Permissions รขโ‚ฌโ€ No dangerous permissions requested
Purpose
This tool acts as an AI agent skill designed to improve code quality during development and code reviews. It identifies over 120 named code smells and provides before/after examples across a wide variety of popular programming languages.

Security Assessment
Because the automated code scan was unable to detect supported source files, a direct inspection of the underlying logic could not be completed. However, no dangerous permissions are requested, and typical agents of this type operate strictly on text processing rather than executing shell commands or making external network requests. The overall risk is rated as Low. There are no hardcoded secrets detected, but you should still manually verify what data the agent sends to your specific AI model provider.

Quality Assessment
The project appears to be actively maintained, with its most recent update pushed today. Despite this fresh activity, it suffers from extremely low community visibility, evidenced by only 5 GitHub stars and the absence of a README file. Additionally, there is no license file included. This means there are no formal legal terms granting usage rights, which poses a potential compliance issue for commercial environments.

Verdict
Use with caution due to the lack of a software license and incomplete code transparency.
SUMMARY

๐Ÿฆจ Stop shipping smelly code. 120+ named code smells with before/after examples across C, C++, C#, Java, Python, Go, Rust, JavaScript, TypeScript & SQL โ€” an AI agent skill that improves code quality during both development and code review.

README.md

๐Ÿฆจ code-smells

Stop shipping smelly code. 120+ named code smells with before/after examples across C, C++, C#, Java, Python, Go, Rust, JavaScript, TypeScript & SQL โ€” an AI agent skill that improves code quality during both development and code review.


What It Does

Drop this skill into your AI coding agent and get an expert code reviewer that:

  • Identifies code smells by name โ€” not just "this looks bad"
  • Explains why each smell is harmful and what it costs you
  • Shows concrete before/after refactoring examples
  • Prioritizes findings by severity so you fix the right things first
  • Covers 10 languages in one skill โ€” no separate tools to configure

Languages

C ยท C++ ยท C# ยท Java ยท Python ยท Go ยท Rust ยท JavaScript ยท TypeScript ยท SQL


Smell Categories

Category Examples
Naming & Linguistic Abstract Names, Linguistic Confusion, Comedian Methods, Spelling Mistakes
Structure & Complexity Arrow Code, Long Parameter List, Boolean Trap, Cyclomatic Complexity
OOP God Objects, Shotgun Surgery, Primitive Obsession, Middle Man
Functional Pure Functions, Side Effects, Hidden Assumptions, Premature Memoization
Testing Float Assertions, Over-Mocking, Test Without Assertion, Tests Depending on Dates
Error Handling Crowdstrike Null, Not Sanitized Input, Invalid Id = 9999
Data & Types Magic Numbers, Mutable Constants, Stringly Typed, Yoda Conditions
Security Hardcoded Credentials, Insecure Random, Open Redirect
Concurrency Race Condition, Global State, New Date() in Business Logic
SQL N+1 Query, SELECT *, God Query, Missing Index
Language-Specific Mutable Default Args (Python), .unwrap() (Rust), async void (C#), == vs === (JS)

Severity System

Severity Action
๐Ÿ”ด Critical Fix before merge โ€” bugs, crashes, security holes
๐ŸŸ  Major Fix this sprint โ€” maintainability and design debt
๐ŸŸก Minor Fix when you're in the area
๐Ÿ”ต Style Automate with a linter

Installation

This skill uses the Agent Skills open standard โ€” compatible with Claude Code, OpenAI Codex CLI, and any agent that supports SKILL.md.

# Claude Code โ€” install from marketplace
/plugin marketplace add barlevysh/code-smells-skill

# Any agent โ€” clone and copy to your skills directory
git clone https://github.com/barlevysh/code-smells-skill.git
cp -r code-smells ~/.claude/skills/      # Claude Code
cp -r code-smells ~/.codex/skills/       # OpenAI Codex CLI

Usage

Just ask naturally โ€” the agent loads the skill automatically when code review is relevant:

Review this function for code smells.
What's wrong with this Python class?
Find all the testing smells in this file.
Explain what Shotgun Surgery is and show me an example in Go.

Output Format

Each finding is reported as:

### ๐Ÿ”ด Crowdstrike Null
**What it is:** Dereferencing a pointer without checking for null first.
**Why it's harmful:** Causes crashes in production โ€” responsible for the 2024 CrowdStrike outage.
**Where found:** Line 42, processData()

Before:
  int value = data->value; // CRASH if data is NULL

After:
  if (data == NULL) { log_error("null data"); return; }
  int value = data->value;

Skill Structure

code-smells/
โ”œโ”€โ”€ SKILL.md                          # Master index + workflow
โ””โ”€โ”€ references/
    โ”œโ”€โ”€ smells-naming.md              # 13 naming & linguistic smells
    โ”œโ”€โ”€ smells-structure.md           # 17 structural & complexity smells
    โ”œโ”€โ”€ smells-oop.md                 # 29 OOP smells
    โ”œโ”€โ”€ smells-functional.md          # 9 functional & pure-code smells
    โ”œโ”€โ”€ smells-testing.md             # 15 testing smells
    โ”œโ”€โ”€ smells-error-handling.md      # 15 error handling & data smells
    โ”œโ”€โ”€ smells-data.md                # Dead code, duplication & paradigm smells
    โ”œโ”€โ”€ smells-security.md            # 8 security + 4 concurrency smells
    โ”œโ”€โ”€ smells-concurrency.md         # concurrency & state smells
    โ”œโ”€โ”€ smells-sql.md                 # 11 SQL smells
    โ””โ”€โ”€ smells-language-specific.md   # Per-language gotchas

Uses progressive disclosure โ€” only relevant reference files are loaded per review, keeping context lean.


Why Not Just Use a Linter?

Linters catch formatting and syntax. This skill catches design problems:

  • A linter can't tell you your class has Feature Envy
  • A linter won't explain why Shotgun Surgery makes your codebase fragile
  • A linter won't show you a before/after refactoring in your own language
  • A linter won't prioritize findings by business impact

Contributing

Found a smell that's missing? PRs welcome.

  1. Fork the repo
  2. Add your smell to the appropriate references/smells-*.md file
  3. Follow the existing format: name, severity, languages, definition, harm, before/after
  4. Update the index in SKILL.md
  5. Open a PR

License

MIT

Reviews (0)

No results found