String algorithm matcher

From a5c-ai/babysitter · View interactive version

String algorithm matcher is an AI agent skill from the GitHub repository a5c-ai/babysitter. Match string problems to appropriate algorithms

How to use this skill

Skill file

String Algorithm Matcher Skill

Purpose

Match string processing problems to the most appropriate algorithms based on requirements and constraints.

Capabilities

Target Processes

Algorithm Selection Guide

Single Pattern Matching

| Scenario | Algorithm | Complexity |

|----------|-----------|------------|

| Single pattern | KMP | O(n+m) |

| Multiple patterns | Aho-Corasick | O(n+m+z) |

| Approximate match | Rolling Hash | O(n*m) average |

Suffix Structures

| Need | Structure | Build Time |

|------|-----------|------------|

| Substring search | Suffix Array | O(n log n) |

| Multiple queries | Suffix Tree | O(n) |

| Subsequence counting | Suffix Automaton | O(n) |

Palindromes

| Problem | Algorithm |

|---------|-----------|

| Longest palindromic substring | Manacher |

| Palindrome partitioning | DP + Manacher |

| Palindrome queries | Hashing |

Input Schema

{
  "type": "object",
  "properties": {
    "problemDescription": { "type": "string" },
    "problemType": {
      "type": "string",
      "enum": ["patternMatch", "suffixQueries", "palindrome", "subsequence", "dp"]
    },
    "constraints": { "type": "object" }
  },
  "required": ["problemDescription"]
}

Output Schema

{
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "algorithm": { "type": "string" },
    "complexity": { "type": "string" },
    "alternatives": { "type": "array" },
    "implementation": { "type": "string" }
  },
  "required": ["success", "algorithm"]
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.