Leetcode Coach logo

Leetcode Coach

OrganizationPopular
tinyfish-io
leetcode-coach

Find and set up coding practice problems tailored to your weak areas, then create local files so you can solve them right away. Use this skill when a user wants to practice coding, asks for a LeetCode problem, says "give me a coding challenge", "I want to practice DSA", "help me prep for coding interviews", "find me a problem to solve", "I'm weak at dynamic programming", "quiz me on algorithms", or any request to practice coding with a specific language or topic focus.

Overview

Publishertinyfish-io
Repositorytinyfish-cookbook
Skill nameleetcode-coach
Stars
2.2K
Forks
333
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by tinyfish-io on GitHub. Read the source before you install it.

Installation

Install the Leetcode Coach AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tinyfish-io/tinyfish-cookbook.git /tmp/tinyfish-cookbook
mkdir -p .claude/skills
cp -r /tmp/tinyfish-cookbook/skills/leetcode-coach .claude/skills/leetcode-coach
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Leetcode Coach in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Leetcode Coach on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Leetcode Coach is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

LeetCode Coach

Find coding problems matched to your weak areas from LeetCode, HackerRank, and Codeforces — then set up local files so you can start solving immediately.

Pre-flight Check (REQUIRED)

Before making any TinyFish call, always run BOTH checks:

1. CLI installed?

bash
which tinyfish && tinyfish --version || echo "TINYFISH_CLI_NOT_INSTALLED"

If not installed, stop and tell the user:

Install the TinyFish CLI: npm install -g @tiny-fish/cli

2. Authenticated?

bash
tinyfish auth status

If not authenticated, stop and tell the user:

You need a TinyFish API key. Get one at: https://agent.tinyfish.ai/api-keys

Then authenticate:

tinyfish auth login

Do NOT proceed until both checks pass.


Step 1 — Gather inputs

Ask for the following if not already provided:

Required:

  • Preferred language — e.g. Python, JavaScript, Java, C++, Go, Rust

Optional (but improves results):

  • Weak areas / topics to focus on — e.g. "dynamic programming", "graphs", "sliding window", "binary search", "recursion", "trees"
  • Difficulty — Easy / Medium / Hard (default: Medium)

If the user isn't sure of their weak areas, ask:

"What topics do you find yourself getting stuck on, or want to get better at?"

If they still aren't sure, default to: Arrays, Strings, and Hash Maps (the most commonly tested fundamentals).


Step 2 — Find matching problems

Fire parallel TinyFish agents across LeetCode, HackerRank, and Codeforces to find real problems matching the topic and difficulty.

bash
# Agent 1 — LeetCode problem search
tinyfish agent run \
  --url "https://leetcode.com/problemset/?difficulty={DIFFICULTY}&topicSlugs={TOPIC_SLUG}" \
  "You are on the LeetCode problem set page filtered by difficulty and topic.
   Find 3 problems that match the topic: {TOPIC}.
   For each problem extract:
   - title
   - difficulty (Easy/Medium/Hard)
   - acceptance rate
   - topic tags
   - direct URL to the problem (e.g. https://leetcode.com/problems/two-sum/)
   STRICT RULES:
   - Do NOT click any problem to open it
   - Read only the problem listing visible on this page
   - Return exactly 3 problems, no more
   - Skip premium-only problems (marked with a lock icon)
   Return JSON array: [{title, difficulty, acceptance_rate, tags, url}]" \
  --sync > /tmp/lc_leetcode.json &

# Agent 2 — HackerRank problem search
tinyfish agent run \
  --url "https://www.hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D={TOPIC_SLUG}" \
  "You are on HackerRank's algorithms problem listing filtered by topic.
   Find 2 problems that match the topic: {TOPIC} at {DIFFICULTY} level.
   For each problem extract:
   - title
   - difficulty
   - score/points
   - topic tags
   - direct URL to the problem
   STRICT RULES:
   - Do NOT click any problem
   - Read only the visible listing
   - Return up to 2 problems
   - Skip problems requiring premium or contests
   Return JSON array: [{title, difficulty, score, tags, url}]" \
  --sync > /tmp/lc_hackerrank.json &

# Agent 3 — Codeforces problem search
tinyfish agent run \
  --url "https://codeforces.com/problemset?tags={TOPIC_SLUG}" \
  "You are on Codeforces problem set filtered by tag.
   Find 2 problems matching the topic: {TOPIC} at approximately {DIFFICULTY} level
   (Easy ≈ rating 800-1200, Medium ≈ 1300-1800, Hard ≈ 1900+).
   For each problem extract:
   - problem ID (e.g. 1A, 158B)
   - title
   - rating
   - tags
   - direct URL (e.g. https://codeforces.com/problemset/problem/1/A)
   STRICT RULES:
   - Do NOT click any problem
   - Read only the visible listing
   - Return up to 2 problems
   Return JSON array: [{id, title, rating, tags, url}]" \
  --sync > /tmp/lc_codeforces.json &

wait

echo "=== LEETCODE ===" && cat /tmp/lc_leetcode.json
echo "=== HACKERRANK ===" && cat /tmp/lc_hackerrank.json
echo "=== CODEFORCES ===" && cat /tmp/lc_codeforces.json

Before running, replace:

  • {DIFFICULTY} — Easy / Medium / Hard
  • {TOPIC} — human-readable topic e.g. dynamic programming
  • {TOPIC_SLUG} — URL-friendly e.g. dynamic-programming

Step 3 — Present problem options

From the results, pick the 3 best problems across all sources. Prefer:

  1. LeetCode problems (widest community support, best editorial availability)
  2. Problems with clear descriptions visible from the listing
  3. Problems with acceptance rates between 30-60% for Medium difficulty

Present them like this:

Here are 3 problems matched to your focus on **{TOPIC}** in **{LANGUAGE}**:

**Option 1 — {Title}** ({difficulty}) · {source}
Tags: {tags}
Acceptance: {rate}
🔗 {url}

**Option 2 — {Title}** ({difficulty}) · {source}
Tags: {tags}
🔗 {url}

**Option 3 — {Title}** ({difficulty}) · {source}
Tags: {tags}
🔗 {url}

Which one do you want to tackle? (1, 2, or 3)

Wait for the user to choose a problem before proceeding.


Step 3b — Ask how they want to solve it

Once the user picks a problem, ask:

How do you want to solve it?

1. **On the website** — I'll give you the direct link and you solve it in the browser
2. **Locally** — I'll fetch the full problem and set up files on your machine so you can code in your editor

(1 or 2)

If they choose option 1 (website): Give them the direct link to the problem and wish them luck:

Here you go: {problem_url}

Good luck! Come back and paste your solution when you're done — I'll review it.

Stop here. Do not create any files.

If they choose option 2 (locally): Continue to Step 4.


Step 4 — Fetch the full problem

Once the user picks, fetch the full problem description using TinyFish.

bash
tinyfish agent run \
  --url "{CHOSEN_PROBLEM_URL}" \
  "You are on a coding problem page. Extract the complete problem details.
   Extract:
   - title
   - difficulty
   - full problem description (exactly as written — do not paraphrase)
   - constraints (exact list)
   - all example inputs and outputs with explanations
   - topic tags
   - any follow-up questions mentioned
   STRICT RULES:
   - Do NOT click any links
   - Extract the complete description verbatim — do not shorten it
   - If examples have visual diagrams described in text, include them
   Return JSON: {title, difficulty, description, constraints: [], examples: [{input, output, explanation}], tags: [], followup}" \
  --sync

Step 5 — Create local files

Once you have the full problem, create these three files in the current working directory:

problem.md

markdown
# {Problem Title}

**Source:** {url}
**Difficulty:** {difficulty}
**Tags:** {tags}
**Language:** {language}

---

## Problem

{full problem description}

## Constraints

{constraints as bullet list}

## Examples

### Example 1
**Input:** {input}
**Output:** {output}
**Explanation:** {explanation}

### Example 2
...

---

## Notes
<!-- Add your approach notes here before coding -->

solution.{ext}

Create a starter file with the correct extension for the chosen language and a function signature scaffold. Use the appropriate extension:

LanguageExtensionStarter
Python.pydef solution(): with docstring
JavaScript.jsfunction solution() {} with JSDoc
TypeScript.tstyped function signature
Java.javaclass + method scaffold
C++.cpp#include + function
Go.gopackage + func
Rust.rsfn solution()

Include a comment at the top:

// Problem: {title}
// Source: {url}
// Difficulty: {difficulty}
// Your approach: (fill this in before coding)

Infer the function signature from the problem description if possible (e.g. if the problem says "given an array of integers, return..."). If unclear, use a generic starter.

test_cases.md

markdown
# Test Cases — {Problem Title}

## From the problem

| # | Input | Expected Output |
|---|-------|----------------|
| 1 | {input} | {output} |
| 2 | {input} | {output} |

## Edge cases to consider
<!-- Think about: empty input, single element, negative numbers, duplicates, max constraints -->
- [ ] Empty input
- [ ] Single element
- [ ] Already sorted / already valid
- [ ] Maximum constraint size

Step 6 — Brief the user

Once the files are created, tell the user:

Files created:
- problem.md     ← full problem description
- solution.{ext} ← starter template in {language}
- test_cases.md  ← sample test cases + edge case checklist

Take your time and solve it. When you're done, paste your solution here and I'll review it — checking for correctness, edge cases, time complexity, and style.

Good luck!

Edge Cases

  • LeetCode returns no results for topic — fall back to searching https://leetcode.com/problemset/?search={TOPIC} without the filter
  • Problem URL is premium-only — skip it and pick the next best option from the results
  • User doesn't know their weak areas — default to Arrays + Hash Maps (Medium), which covers the widest range of interview fundamentals
  • User wants a specific problem by name — skip Steps 2-3, go straight to fetching and creating files for that problem
  • Codeforces returns nothing — skip it silently, present options from LeetCode and HackerRank only
  • User is a complete beginner — suggest Easy difficulty and start with Two Sum (LeetCode #1) as a warm-up before moving to their topic of interest

Frequently asked questions

What does the Leetcode Coach AI skill do?

Find and set up coding practice problems tailored to your weak areas, then create local files so you can solve them right away. Use this skill when a user wants to practice coding, asks for a LeetCode problem, says "give me a coding challenge", "I want to practice DSA", "help me prep for coding interviews", "find me a problem to solve", "I'm weak at dynamic programming", "quiz me on algorithms", or any request to practice coding with a specific language or topic focus.

Why use Leetcode Coach on TypingMind?

Because you install it once and use it with any model. Leetcode Coach is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Leetcode Coach in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tinyfish-io/tinyfish-cookbook/tree/main/skills/leetcode-coach. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Leetcode Coach?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Leetcode Coach?

As many as you like. As long as a model supports skills, you can use Leetcode Coach with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Leetcode Coach AI skill free?

Yes. It is published on GitHub by tinyfish-io under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇