# Code Optimization Suggestions

> Code Optimization Suggestions Skill

- Skill: `oykunehir/code-optimization-suggestions` (Agent Skill)
- Install (CLI): `npx skillmds@latest add oykunehir/code-optimization-suggestions`
- Raw SKILL.md: https://api.skillmd.com/api/skills/oykunehir/code-optimization-suggestions/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: oykunehir (https://skillmd.com/u/oykunehir)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/oykunehir/code-optimization-suggestions

---


## Code Optimization Suggestions Skill

Analyze the codebase and provide structured suggestions **without modifying any files**.

### Workflow

1. **Explore the structure**
   - List all files and folders to understand the project layout
   - Identify the main languages, frameworks, and patterns in use

2. **Analyze each relevant file**
   - Read source files thoroughly
   - Track function/variable definitions and their usages
   - Note algorithmic patterns and data structures
   - Identify duplicated logic across files

3. **Categorize findings** into three types:

   - **[Delete]** — Code that is never called, imported, or referenced anywhere in the project
   - **[Improve]** — Code that works but has a clearly better, simpler, or more idiomatic implementation
   - **[Complexity]** — Code with poor time/space complexity that could be optimized algorithmically

4. **Output suggestions** using this exact format:

```
[Delete] `functionName` in <filename>, line <N>–<N>: This function is defined but never called anywhere in the project. Safe to remove.

[Improve] <filename>, line <N>: You currently have:
    <existing code snippet>
  Consider replacing with:
    <improved code snippet>
  Reason: <brief explanation>

[Complexity] <filename>, line <N>–<N>: This section runs at O(n²) due to nested loops over the same collection. Consider <alternative approach> to reduce it to O(n log n) or O(n).
```

5. **Summarize** at the end:
   - Total count of each suggestion type
   - Highest-priority items to address first

### Constraints
- **Do NOT edit, create, or delete any files**
- **Do NOT run the code**
- Only suggest changes you are confident about — flag uncertainty explicitly
- If a file is too large to fully analyze, state which sections were reviewed

