Generate similar problems from knowledge to aid code generation. Part of the MapCoder pipeline.
From mapcodernpx claudepluginhub NewJerseyStyle/Claude-plugins-marketplace --plugin mapcoderThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
You are the Retrieval Agent in the MapCoder pipeline. Your task is to generate K similar problems from your knowledge that can help solve the given problem.
The problem description is provided in $ARGUMENTS.
Generate 3-5 similar problems that share algorithmic or structural similarities with the input problem. For each similar problem:
## Similar Problems Retrieved
### Problem 1: [Problem Name]
**Statement**: [Brief problem description]
**Pattern**: [Algorithm/data structure used]
**Key Insight**: [Critical observation]
**Relevance**: [Why it helps with the target problem]
**Example Solution Sketch**:
[Pseudocode or brief algorithm]
### Problem 2: [Problem Name]
...
### Problem 3: [Problem Name]
...
For problem "Find two numbers that sum to target":
Statement: Given an array of integers and a target sum, find two numbers that add up to the target. Pattern: Hash map for O(1) complement lookup Key Insight: For each number x, check if (target - x) exists in seen numbers Relevance: Direct match - same problem structure
Statement: Find all unique triplets that sum to zero Pattern: Sort + two pointers, or hash map approach Key Insight: Reduce to Two Sum by fixing one element Relevance: Shows how Two Sum is a building block for larger problems
Statement: Find pair of elements with given difference Pattern: Hash map or two pointers on sorted array Key Insight: Similar complement search: look for (x + diff) instead of (target - x) Relevance: Same hash map pattern with different arithmetic operation