deodorizing-code

Detect and refactor AI-generated code smells in Python, JavaScript, and TypeScript files.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/inakam/dotfiles-raspberry --skill deodorizing-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deodorizing-code
Source: https://github.com/inakam/dotfiles-raspberry/tree/main/dot_claude/skills/deodorizing-code
Command: npx skills add https://github.com/inakam/dotfiles-raspberry --skill deodorizing-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

AI-generated code often contains verbose patterns, unnecessary nesting, duplicated logic, hallucinated imports, insecure hard-coded secrets, and missing type information that increase maintenance cost and introduce risks. This Skill helps teams and developers identify these "code smells", prioritize critical problems, and transform generated snippets into concise, idiomatic, and safer code without changing intended behavior.

Core Features & Use Cases

  • Detection: Classifies smells such as high cognitive complexity, redundancy, hallucinated dependencies, hard-coded secrets, DRY violations, and zombie code.
  • Refactoring patterns: Suggests and documents targeted fixes including guard clauses, method extraction, map lookups, language idiom conversions, and async parallelization for JS/TS.
  • Verification & tool guidance: Produces a remediation plan, Before/After metrics, and optional recommendations for static tools (ruff, eslint) and test validation.
  • Use cases: Clean up AI-generated PR diffs, harden pasted snippets before production use, and standardize generated helpers across a codebase.

Quick Start

Analyze the changed Python and TypeScript files in my current branch and produce a prioritized refactoring plan that removes code smells, adds necessary type hints, and flags any security risks.

Frequently Asked Questions about deodorizing-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove code smells from AI-generated Python and TypeScript files?

To remove code smells from AI-generated code, you can analyze branch diffs or pasted snippets to detect redundancy, hallucinated imports, and hard-coded secrets, then apply targeted refactorings like guard clauses and method extraction to simplify logic without changing behavior.

What are common code smells in AI-generated JavaScript and how do I fix them?

Common AI code smells in JavaScript include high cognitive complexity, duplicated logic, and zombie code. You can fix them by applying refactoring patterns such as method extraction, map lookups, and async parallelization to reduce complexity and convert code to idiomatic patterns.

How do I detect hallucinated imports and hard-coded secrets in a pull request?

Detecting hallucinated imports and hard-coded secrets in a pull request involves analyzing the source file structure to classify security risks and missing dependencies, producing a prioritized remediation plan and before/after metrics to guide fixes.

Can I use static analysis to add type hints and refactor AI code snippets?

Yes, you can use static analysis tools like ruff and eslint to validate refactored AI code snippets. The process generates a classified analysis report, applies optional static tool fixes, and adds necessary type hints to standardize generated helpers across a codebase.

Does this refactoring approach preserve the original behavior of my code?

Yes, the refactoring approach preserves the intended behavior of your code by focusing on structural improvements. It transforms verbose patterns and unnecessary nesting into concise, idiomatic code while surfacing security risks and generating concrete refactoring steps.