본문으로 건너뛰기
cccskills
무료GitHub에 공개

solve

Solve competitive programming and LeetCode-style problems with educational explanations. Use when asked to "solve this problem", "help with this leetcode", "competitive programming solution", "solve this algorithm problem", "coding challenge solution", "how to solve this coding problem", or any algorithmic problem-solving request.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Competitive Programming Problem Solver

Solve competitive programming and LeetCode-style problems with clear educational explanations, step-by-step walkthroughs, and verified Python solutions.

CRITICAL: Complete ALL 4 phases. Do not stop after classification or skip the agent.

Phase 1: Parse Input

Goal: Extract and understand the problem statement.

If $ARGUMENTS is provided, parse the problem statement from it. Extract:

  • Problem description and objective
  • Input/output format
  • Constraints (N, M, value ranges)
  • Example test cases with expected outputs
  • Any special conditions (modular arithmetic, multiple test cases, interactive)

If $ARGUMENTS is empty or unclear, use AskUserQuestion to request the problem:

AskUserQuestion:
  question: "Please provide the problem statement. You can paste the full text, describe it in your own words, or provide a link."
  options:
    - label: "Paste problem text"
      description: "Paste the full problem statement including constraints and examples"
    - label: "Describe the problem"
      description: "Describe what the problem asks in your own words"

If the problem statement is ambiguous or missing key information (constraints, examples), ask for clarification before proceeding.

Phase 2: Classify Problem

Goal: Determine the algorithmic category, technique, and difficulty.

Analyze the problem to determine:

2.1 Primary Category

Match to one of:

  • Dynamic Programming — optimization over subsequences, counting ways, overlapping subproblems
  • Graph Algorithms — connectivity, shortest paths, traversal, network problems
  • Search and Optimization — binary search, two pointers, greedy, interval problems
  • Data Structures — specialized structures needed (heap, trie, segment tree)
  • Math and Combinatorics — number theory, counting, modular arithmetic, game theory
  • String Algorithms — pattern matching, palindromes, hashing

2.2 Sub-pattern

Identify the specific technique within the category (e.g., "0/1 Knapsack", "Dijkstra", "Sliding Window").

2.3 Difficulty Estimate

  • Easy — single technique, straightforward application
  • Medium — requires insight or combining 2 techniques
  • Hard — non-obvious technique, complex implementation, or 3+ techniques
  • Competition — advanced techniques, mathematical reasoning, or creative construction

2.4 Constraint Analysis

Map input size to required time complexity:

Input SizeViable ComplexityTypical Approach
N ≤ 15O(2^N), O(N!)Bitmask DP, backtracking
N ≤ 20O(2^N × N)Bitmask DP
N ≤ 100O(N^3)Floyd-Warshall, interval DP
N ≤ 500O(N^3)Matrix DP, dense graph algorithms
N ≤ 3,000O(N^2)Standard DP (LCS, edit distance)
N ≤ 10,000O(N^2) or O(N√N)Careful O(N^2), sqrt decomposition
N ≤ 100,000O(N log N)Sorting, binary search, segment tree
N ≤ 1,000,000O(N) or O(N log N)Linear scan, prefix sums, two pointers
N ≤ 10^8O(N)Simple linear pass
N ≤ 10^9+O(log N) or O(√N)Binary search, math formula

2.5 Secondary Categories

Note if the problem combines techniques (e.g., "Binary Search + DP", "Graph + Greedy").

Present the classification summary to the user before proceeding.

Phase 3: Load References and Spawn Agent

Goal: Provide the solver agent with domain-specific algorithmic knowledge.

3.1 Load Reference Skills

Based on the primary category, load the corresponding reference skill:

  • Dynamic Programming → Read ${CLAUDE_PLUGIN_ROOT}/skills/dp-patterns/SKILL.md
  • Graph Algorithms → Read ${CLAUDE_PLUGIN_ROOT}/skills/graph-algorithms/SKILL.md
  • Search and Optimization → Read ${CLAUDE_PLUGIN_ROOT}/skills/search-and-optimization/SKILL.md
  • Data Structures → Read ${CLAUDE_PLUGIN_ROOT}/skills/data-structures/SKILL.md
  • Math and Combinatorics → Read ${CLAUDE_PLUGIN_ROOT}/skills/math-and-combinatorics/SKILL.md
  • String Algorithms → Read ${CLAUDE_PLUGIN_ROOT}/skills/string-algorithms/SKILL.md

If a secondary category was identified, load that reference skill as well (maximum 2 reference skills).

3.2 Spawn Problem Solver Agent

Use the Task tool to spawn the problem-solver agent:

Task:
  subagent_type: "agent-alchemy-cs-tools:problem-solver"
  prompt: |
    ## Problem Statement
    [full problem text with all constraints, I/O format, and examples]

    ## Classification
    - **Category:** [primary category]
    - **Sub-pattern:** [specific technique]
    - **Difficulty:** [level]
    - **Complexity Target:** [required time complexity based on constraints]
    - **Secondary Category:** [if applicable]

    ## Reference Material
    [paste the content from the loaded reference skill(s)]

    Produce a complete solution following your structured output format.

Phase 4: Present Solution

Goal: Format and present the solution with follow-up options.

Take the agent's structured output and present it to the user. The output includes:

  • Classification summary
  • Key insight (the "aha" moment)
  • Step-by-step approach
  • Verified Python solution code
  • Time and space complexity analysis with derivation
  • Walkthrough tracing through an example
  • Edge cases
  • Common mistakes
  • Alternative approaches

After presenting the solution, offer follow-up actions:

AskUserQuestion:
  question: "What would you like to do next?"
  options:
    - label: "Verify with test cases"
      description: "Run the solution through comprehensive test cases including edge cases and stress tests"
    - label: "Explain in more detail"
      description: "Get a deeper explanation of the approach, technique, or a specific part of the solution"
    - label: "Show alternative approach"
      description: "See a different way to solve this problem with trade-off analysis"
    - label: "Done"
      description: "Solution is satisfactory, no further action needed"

If the user selects "Verify with test cases", suggest they use /verify with the problem and solution. If "Explain in more detail", provide additional explanation of the requested aspect. If "Show alternative approach", re-spawn the agent with instructions to use a different technique.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Analyze test coverage and identify gaps with actionable recommendations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sequenzia/agent-alchemy452026년 6월 1일 업데이트

Analyze an existing spec for inconsistencies, missing information, ambiguities, and structure issues. Use when user says "analyze spec", "review spec", "spec quality check", "validate requirements", "audit spec", or "check spec quality".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sequenzia/agent-alchemy452026년 6월 1일 업데이트

Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sequenzia/agent-alchemy452026년 6월 1일 업데이트

Executes diagnostic investigation tasks to test debugging hypotheses. Runs tests, traces execution, checks git history, and reports evidence. (converted from agent)

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sequenzia/agent-alchemy452026년 6월 1일 업데이트

Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use when asked to "fix this bug", "debug this", "why is this failing", "this is broken", "investigate this error", "track down this issue", or any debugging situation. Supports --deep flag to force full investigation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sequenzia/agent-alchemy452026년 6월 1일 업데이트

Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use for debugging, fixing bugs, and investigating errors.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sequenzia/agent-alchemy452026년 6월 1일 업데이트

sequenzia의 스킬 모두 보기

이 스킬의 문제 신고