leetcode-coach

Runs, reviews, and records LeetCode practice attempts across code and notes repositories.

4|Updated May 20, 2024
One-click install
npx skills add https://github.com/SpreadZhao/spreadconfig --skill leetcode-coach-spreadzhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: leetcode-coach
Source: https://github.com/SpreadZhao/spreadconfig/tree/main/skills/local/leetcode-coach
Command: npx skills add https://github.com/SpreadZhao/spreadconfig --skill leetcode-coach-spreadzhao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Practicing LeetCode across multiple languages often leaves run results, mistakes, and notes scattered and inconsistent. This Skill structures the whole loop: pick a problem, run the configured command, review the attempt with minimal hints, and merge the learning into one SecondBrain note per problem. ## Core Features & Use Cases - Run-then-review workflow: Executes configured per-language run commands (C++, Java, Kotlin), captures exit codes, stdout/stderr summaries, and classifies failures as compile errors, runtime errors, wrong answers, or timeouts. - Minimal-hint coaching: Reviews code against a rubric with verdicts like accepted, needs_revision, or cannot_prove_correctness, giving direction without full solutions unless requested. - Note patch generation: Produces note patches that merge multi-language attempts into a single problem note while preserving existing front matter, TODOs, and Obsidian links, applying changes only with explicit user confirmation. - Durable mistake memory: Records reusable mistakes, language pitfalls, and spaced-review cues as JSONL under the runtime state directory. - Use Case: After writing a C++ solution for 3Sum, ask the coach to run the configured test command; it captures the wrong-answer failure, identifies duplicate-handling as the root cause, suggests a minimal fix, and drafts a note patch for your SecondBrain. ## Quick Start Ask the coach to run and review my current LeetCode attempt and generate a note patch for the problem.

Frequently Asked Questions about leetcode-coach

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run and review a LeetCode attempt with this workflow?

Configure languages.<language>.run_command and cwd in the runtime config.yaml, then ask the coach to run and review your attempt. It executes the command, captures exit code and output summaries, classifies any failure, and produces a review result with a verdict and minimal hints.

How does the coach handle LeetCode notes in multiple languages?

It keeps one note per problem and merges C++, Java, and Kotlin attempts into that same note. New languages get their own dated section plus a cross-language comparison, while existing front matter, TODOs, and Obsidian links are preserved.

What happens when no run command is configured for a language?

The coach stops the run action and falls back to static review only, using the verdict cannot_prove_correctness. It never generates a runner, test harness, or build script on its own; you must fill the config field or provide a one-time command.

Does the coach modify my SecondBrain notes automatically?

No. It generates a note-patch.md file in the session directory by default. Applying the patch to the notes repository requires an explicit user request, enforced by a confirmation flag in the merge script.

Why does the coach report a missing config field error?

Required fields like repos.code.local_path or a language run_command are blank in the runtime config.yaml. The coach stops with the exact missing field and file path rather than guessing paths or scanning your home directory.

What are the limitations of the failure classification?

Failure types are inferred from keyword patterns in stdout and stderr, such as compile errors, segmentation faults, or wrong answers. Unusual build output may be classified as test_command_failed or unknown_failure, requiring manual interpretation of the captured logs.