dynamic-programming
Dynamic Programming
Overview
Use this skill to design correct and efficient DP solutions with explicit state modeling and complexity reasoning.
Scope Boundaries
- Use this skill when the task matches the trigger condition described in
description. - Do not use this skill when the primary task falls outside this skill's domain.
Inputs To Gather
- Problem objective and correctness constraints.
- State variables needed to represent subproblems.
- Transition rules and dependency ordering.
- Input size limits and memory constraints.
Deliverables
- DP formulation (state, transition, base cases).
- Complexity analysis (time/space) and optimization options.
- Chosen implementation strategy (top-down/bottom-up).
- Edge-case and correctness verification plan.
Quick Example
- Problem: minimum cost path.
- State:
dp[i][j]= min cost to reach cell(i,j). - Transition:
dp[i][j] = cost[i][j] + min(dp[i-1][j], dp[i][j-1]). - Base: first row/column initialization.
Quality Standard
- State definition is complete and non-redundant.
- Transition uses only valid predecessor states.
- Base cases cover minimal subproblems correctly.
- Complexity fits constraints or includes optimization plan.
Workflow
- Define subproblem state and objective function.
- Derive transitions and base cases.
- Choose memoization or tabulation strategy.
- Optimize memory if full table is unnecessary.
- Validate against edge cases and known examples.
Failure Conditions
- Stop when state does not capture required decision context.
- Stop when transition introduces cyclic/invalid dependencies.
- Escalate when complexity exceeds target constraints without viable optimization.
More from kentoshimizu/sw-agent-skills
graph-algorithms
Graph algorithm workflow for modeling entities/relations and selecting traversal, path, ordering, or flow strategies. Use when correctness or performance depends on graph representation and algorithm choice; do not use for schema-only modeling or deployment topology planning.
14bash-style-guide
Style, review, and refactoring standards for Bash shell scripting. Trigger when `.sh` files, files with `#!/usr/bin/env bash` or `#!/bin/bash`, or CI workflow blocks with `shell: bash` are created, modified, or reviewed and Bash-specific quality controls (quoting safety, error handling, portability, readability) must be enforced. Do not use for generic POSIX `sh`, PowerShell, or language-specific application style rules. In multi-language pull requests, run together with other applicable `*-style-guide` skills.
11architecture-clean-architecture
Clean Architecture workflow for enforcing dependency direction, stable domain boundaries, and use-case-centered application design. Use when teams must separate business rules from frameworks and delivery mechanisms; do not use for isolated module cleanup without boundary implications.
11powershell-style-guide
Style, review, and refactoring standards for PowerShell scripting. Trigger when `.ps1`, `.psm1`, `.psd1` files, or CI workflow blocks with `shell: pwsh` or `shell: powershell` are created, modified, or reviewed and PowerShell-specific quality controls (error handling, parameter validation, readability, operational safety) must be enforced. Do not use for Bash, generic POSIX `sh`, or language-specific application style rules. In multi-language pull requests, run together with other applicable `*-style-guide` skills.
10github-codeowners-management
Govern CODEOWNERS rules so review routing reflects real ownership and risk boundaries on GitHub. Use when repository ownership mapping or mandatory reviewer rules must be defined, updated, or audited; do not use for non-GitHub runtime architecture or data-layer design.
9security-authentication
Security workflow for authentication architecture, credential lifecycle, and session/token assurance. Use when login, identity proofing, MFA, or session security decisions are required; do not use for authorization policy design or non-security quality tuning.
9