Skip to content

About

An adaptive Codex coach that helps learners derive, debug, and explain LeetCode solutions—not just receive answers.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn LeetCode

Validate Skill

Learn LeetCode is an adaptive algorithm coach for Codex. Its goal is not merely to produce accepted solutions, but to help learners derive, verify, and explain solutions well enough to solve similar problems independently.

The coach enters wherever the learner currently is: reading a new problem, testing an idea, asking for a hint, debugging code, or reviewing a completed solution. It then chooses the next teaching action that removes the most important blocker without restarting a fixed lesson sequence.

How the Coaching Adapts

Learner input Coaching behavior
A new problem Clarifies only meaningful ambiguity, then asks for the learner's initial intuition.
A proposed approach Tests correctness, complexity, and likely bottlenecks before suggesting a replacement.
Existing code Reviews the algorithm first, then locates the most important implementation defect.
A learner who is stuck Reduces abstraction, traces a smaller example, and increases hint strength gradually.
A limited request Respects boundaries such as "one hint," "pseudocode only," or "no code."
A direct request for the answer Provides the requested solution immediately and explains its key logic.
A completed solution Checks the invariant, boundary cases, correctness, complexity, and transferable pattern.

By default, the coach asks one focused question at a time, identifies correct reasoning specifically, and exposes mistakes with concrete inputs or execution traces. It avoids revealing the standard pattern too early, but never hides information the learner explicitly requests. A brute-force baseline is used only when it helps establish correctness or reveal repeated work.

The Skill replies in the learner's language while keeping its source Markdown and configuration in English.

Install

From a Codex task

Paste the following prompt into Codex:

$skill-installer Install https://github.com/Zzz23hao/Leetcode-Coach/tree/main/learn-leetcode

The installer places the Skill in ~/.codex/skills/learn-leetcode. Start a new Codex task after installation if the Skill is not immediately available.

From a terminal

Run Codex with the same installation request:

codex '$skill-installer Install https://github.com/Zzz23hao/Leetcode-Coach/tree/main/learn-leetcode'

The single quotes are important in shells such as Bash and Zsh because they prevent $skill-installer from being treated as a shell variable.

Use

Invoke the Skill explicitly with $learn-leetcode:

$learn-leetcode Coach me through Two Sum. Give me one hint at a time and do not write code yet.

It can also enter at a later stage:

$learn-leetcode I think a hash map gives O(n), but I am not sure what invariant to maintain.
$learn-leetcode Review this solution for correctness and edge cases:

class Solution:
    def twoSum(self, nums, target):
        seen = {}
        for i, value in enumerate(nums):
            if target - value in seen:
                return [seen[target - value], i]
            seen[value] = i
$learn-leetcode Give me the complete Python solution and a concise complexity explanation.

The Skill may also activate automatically when a request clearly concerns a LeetCode problem, algorithm hint, solution review, debugging session, or complexity analysis.

Validate Locally

The repository includes release checks for structure, metadata, language policy, required coaching rules, internal links, installation parity, and acceptance-case schema.

python3 tests/validate_skill.py learn-leetcode \
  --cases tests/acceptance_cases.json

To compare the source with an installed copy:

python3 tests/validate_skill.py learn-leetcode \
  --installed-dir ~/.codex/skills/learn-leetcode \
  --cases tests/acceptance_cases.json

Repository Layout

learn-leetcode/
├── SKILL.md
├── agents/
│   └── openai.yaml
└── references/
    ├── coaching-flow.md
    ├── code-review.md
    ├── correctness-testing.md
    └── recap-notes.md
tests/
├── acceptance_cases.json
└── validate_skill.py

SKILL.md contains the routing and teaching contract. The reference files provide detailed guidance that Codex loads only when needed. The test suite protects the release contract but does not replace behavioral evaluation with fresh agent conversations.

Contributing

Issues and pull requests are welcome. A contribution should preserve the adaptive teaching model, avoid unnecessary answer leakage, keep all source Markdown and comments in English, and pass the local validation command.

When changing coaching behavior, add or update an acceptance case that describes the expected and forbidden behavior.

About

An adaptive Codex coach that helps learners derive, debug, and explain LeetCode solutions—not just receive answers.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages