code-optimize

Analyze code for duplication, performance, security, and convention issues.

10|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/dnviti/claude-task-development-framework --skill code-optimize-dnviti
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-optimize
Source: https://github.com/dnviti/claude-task-development-framework/tree/main/skills/code-optimize
Command: npx skills add https://github.com/dnviti/claude-task-development-framework --skill code-optimize-dnviti

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses code duplication, unused code, security vulnerabilities, performance bottlenecks, and adherence to project conventions, leading to more maintainable and efficient software.

Core Features & Use Cases

  • Comprehensive Analysis: Analyzes code for duplication, unused exports, security anti-patterns, performance issues, and complexity.
  • Automated Reporting: Generates a detailed report of findings with severity classifications.
  • Guided Refactoring: Assists in applying fixes with user approval and verifies changes.
  • Use Case: Run this skill on a large codebase to identify and fix hidden performance issues or security risks before they impact users.

Quick Start

Analyze the entire codebase for optimization opportunities.

Frequently Asked Questions about code-optimize

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

FAQPage Schema
How do I find and fix performance bottlenecks and N+1 queries in my codebase?

To fix performance bottlenecks and N+1 queries, this tool analyzes your codebase to identify issues like unused imports and complexity. It generates a severity-classified report and facilitates guided refactoring through a dedicated worktree.

What is the best way to detect inline secrets and security anti-patterns during code review?

Detecting inline secrets and security anti-patterns is achieved by running a comprehensive code analysis. This process scans for vulnerabilities and convention deviations, providing an automated report with severity classifications for immediate action.

Can I use this code optimization tool to refactor duplicated code across various programming languages?

Yes, you can optimize duplicated code across various programming languages. The analyzer identifies duplication and unused exports, then assists in applying fixes with user approval and verifies the changes within a guided worktree.

Do I need Python3 installed to run code analysis for complexity and unused exports?

Yes, you need Python3 installed as a dependency to run this code analysis. It is required to execute the scripts that evaluate code complexity, identify unused exports, and generate the categorized optimization report.

How does guided refactoring work when fixing security vulnerabilities and performance issues?

Guided refactoring works by applying fixes with user approval after identifying security vulnerabilities and performance issues. It uses a dedicated worktree to implement changes safely and verifies them post-refactoring to ensure code quality.

What are the limitations of automated code analysis for convention adherence?

Automated code analysis for convention adherence is limited to detecting predefined anti-patterns, unused imports, and complexity metrics. It requires user approval for refactoring and cannot infer unwritten project conventions outside its scanning scope.