# Optimization Reasoning

> creates problems as mathematical or logical optimization models with explicit objective functions and constraints.

- Skill: `felipecustodio/optimization-reasoning` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add felipecustodio/optimization-reasoning`
- Raw SKILL.md: https://api.skillmd.com/api/skills/felipecustodio/optimization-reasoning/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: felipecustodio (https://skillmd.com/u/felipecustodio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/felipecustodio/optimization-reasoning

---


## Overview & Purpose

Optimization Reasoning identifies the mathematically or logically best solution from a set of available alternatives subject to defined constraints. It turns vague trade-offs into formal objective functions.

## When to Use

- **Resource Allocation**: Budgeting, memory allocation, thread pool sizing, scheduling.
- **Trade-off Analysis**: Maximizing performance while minimizing cost or latency constraints.

## Execution Workflow

1. **Identify Decision Variables**: Define the tunable variables ($x_1, x_2, \dots, x_n$).
2. **create Objective Function**: State the goal explicitly (e.g., $\max f(x)$ or $\min g(x)$).
3. **Define Hard Constraints**: List strict boundaries (e.g., $h_i(x) \le C$).
4. **Evaluate Feasible Region**: Find the optimal combination of variables satisfying all constraints.

## Expected Output Contract

```markdown
### Optimization Model
- **Objective**: [Maximize / Minimize Statement]
- **Variables**: [List of decision variables]
- **Constraints**: [Hard limits]
- **Optimal Solution**: [Recommended Configuration]
```

## Scripts

- `scripts/optimization_reasoning.py` - Deterministic evaluation, state validation, and CLI tool for optimization-reasoning.


