code-optimizer

Analyze Python, Swift, Rust, and TypeScript code for optimization suggestions with snippets.

1|Updated Jul 14, 2026
One-click install
npx skills add https://github.com/TzJ2006/gadget --skill code-optimizer-tzj2006
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-optimizer
Source: https://github.com/TzJ2006/gadget/tree/main/skills/optimize
Command: npx skills add https://github.com/TzJ2006/gadget --skill code-optimizer-tzj2006

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill analyzes code and provides concrete optimization suggestions with ready-to-use code snippets to improve readability, safety, performance, and maintainability across Python, Swift, Rust, and TypeScript.

Core Features & Use Cases

  • Actionable optimization suggestions with ready-to-use snippets for multiple languages.
  • Audit-aware mode with optional --with-audit to target existing audit recommendations.
  • Language-specific checks provided in companion files (python.md, swift.md, rust.md, typescript.md) to tailor guidance.

Quick Start

Feed your code snippet to the optimizer and receive a prioritized list of ready-to-use improvements.

Frequently Asked Questions about code-optimizer

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

FAQPage Schema
How do I optimize Python code for readability, safety, and performance?

To optimize Python code, this Skill analyzes your snippets against language-specific rules and proposes concrete improvements with ready-to-use code snippets. It targets readability, safety, and performance enhancements in common scenarios.

Can I refactor Swift and Rust code to improve performance and maintainability?

Yes, you can refactor Swift and Rust code to improve performance and maintainability. The Skill identifies concrete optimization suggestions tailored to each language using companion rule files and provides ready-to-use code snippets.

What is the best way to refactor TypeScript code for safety and readability?

The best way to refactor TypeScript code for safety and readability is using language-specific checks that propose concrete optimizations with ready-to-use snippets. The workflow ensures consistent output guided by metadata and TypeScript-specific rules.

Does this code optimization workflow support small projects or only single files?

This code optimization workflow supports both single-file snippets and small projects. It analyzes your code across multiple languages to provide actionable optimization suggestions without requiring external dependencies.

How do I target existing audit recommendations when refactoring code?

To target existing audit recommendations when refactoring code, use the optional --with-audit mode. This audit-aware mode adjusts the optimization workflow to specifically address and resolve prior audit findings.

What are the limitations of using language-specific rules for code optimization?

Limitations of using language-specific rules include checks being guided by predefined companion files for Python, Swift, Rust, and TypeScript only. Optimization focuses on common coding scenarios rather than complex architectural refactoring.