agentsclimarketplace

Dp optimizer

Skill a5c-ai/babysitter/library/specializations/algorithms-optimization/skills/dp-optimizer

Apply advanced DP optimizations automaticallyFrom its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill dp-optimizer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.1 KB, 498 tokens by cl100k_base, as published. Nobody here has run it

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

{
  "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

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

What ships with it: 1 file

780 B alongside SKILL.md

Keep looking

Skills are one crate of 326,059. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.