Skip to content
Back to skills

Dp Optimizer

ASecurity

Apply advanced DP optimizations automatically

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
ai-agentsgobackend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill dp-optimizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dp Optimizer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dp Optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-dp-optimizer-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-dp-optimizer-babysitter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dp-optimizer
description: Apply advanced DP optimizations automatically
allowed-tools:
  - Read
  - Write
  - Grep
  - Glob
  - Edit
graph:
  domains: [domain:computer-science]
  specializations: [specialization:algorithms-optimization]
  skillAreas: [skill-area:dynamic-programming]
  roles: [role:backend-engineer, role:computational-scientist]
---

# DP Optimizer Skill

## Purpose

Apply advanced dynamic programming optimizations to improve time and space complexity of DP solutions.

## Capabilities

- Convex hull trick detection and application
- Divide and conquer optimization
- Knuth optimization
- Monotonic queue/deque optimization
- Alien's trick / WQS binary search
- Rolling array optimization
- Bitmask compression

## Target Processes

- dp-state-optimization
- advanced-dp-techniques
- complexity-optimization

## Optimization Techniques

### Time Optimizations
1. **Convex Hull Trick**: O(n^2) -> O(n log n) for certain recurrences
2. **Divide & Conquer**: O(n^2 k) -> O(n k log n) when optimal j is monotonic
3. **Knuth Optimization**: O(n^3) -> O(n^2) for certain interval DP
4. **Monotonic Queue**: O(n*k) -> O(n) for sliding window DP

### Space Optimizations
1. **Rolling Array**: O(n*m) -> O(m) when only previous row needed
2. **Bitmask Compression**: Reduce state space with bit manipulation

## Input Schema

```json
{
  "type": "object",
  "properties": {
    "dpCode": { "type": "string" },
    "stateDefinition": { "type": "string" },
    "transitions": { "type": "string" },
    "currentComplexity": { "type": "string" },
    "targetComplexity": { "type": "string" },
    "optimizationType": {
      "type": "string",
      "enum": ["auto", "convexHull", "divideConquer", "knuth", "monotonic", "space"]
    }
  },
  "required": ["dpCode", "optimizationType"]
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "optimizedCode": { "type": "string" },
    "optimizationApplied": { "type": "string" },
    "newComplexity": { "type": "string" },
    "explanation": { "type": "string" }
  },
  "required": ["success"]
}
```

Files in this skill

  • README.md780 B
  • SKILL.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.