Agent skill

Leetcode Py

by wislertt in wislertt/leetcode-py

Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI.

Apache-2.0Auto-check passedBusiness, Finance & HR

Install Leetcode Py

skills CLI
$ npx skills add wislertt/leetcode-py --skill leetcode-py -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wislertt/leetcode-py leetcode-py --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wislertt/leetcode-py.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs .claude/skills/leetcode-py && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
leetcode-py
GitHub stars
142
Token cost
~1.4k tokens
SKILL.md length
397 words
Files
1,560
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI.

  • A repository needs coding interview practice scaffolding: generating problem directories (README
  • SKILL.md covers Commands, Generating problems, Problem anatomy and Testing, plus 3 more sections
  • Calls pip, uv and npx; reaches leetcode-py.wisl.dev
  • Parametrized pytest suite

What it does

Leetcode Py is an agent skill from wislertt/leetcode-py. Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI. Use when a repository needs coding interview practice scaffolding: generating problem directories (README, solution stub, parametrized pytest suite, helpers, notebook); setting up collections like Blind 75, Grind 75, Grind 169, NeetCode 150, NeetCode 250, or Algo Master 75; testing LeetCode solutions with loguru-logged, parametrized suites; visualizing TreeNode, ListNode, or GraphNode structures; or scraping…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1560 other files (for example `README.md`). Compatibility notes: Requires Python 3.10+. The lcpy CLI runs in any repo; bake tasks need this repo cloned.

It sits in Business, Finance & HR, covering Interview preparation, Unit testing and Web scraping. It works with Python and pytest. The repository describes itself as: Python LeetCode practice environment with automated problem generation, data structure visualizations, and comprehensive testing. Includes all Grind 75, partial Blind, Neetcode… The licence is Apache-2.0.

When your agent uses it

  • A repository needs coding interview practice scaffolding: generating problem directories (README
  • Parametrized pytest suite
  • Setting up collections like Blind 75
  • Testing LeetCode solutions with loguru-logged

Example prompts

  • “set up interview prep repo”
  • “add leetcode problem”
  • “practice grind 75 in python”
  • “/leetcode-py”

Requirements

  • Python 3
  • Node.js
  • Compatibility (from SKILL.md): Requires Python 3.10+. The lcpy CLI runs in any repo; bake tasks need this repo cloned.

What it can do on your machine

Read from SKILL.md and the folder at commit 9155db3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • uv
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • leetcode-py.wisl.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Python 3.10+. The lcpy CLI runs in any repo; bake tasks need this repo cloned.

    From compatibility in the SKILL.md frontmatter.

Context cost

Leetcode Py loads about 1.4k tokens when it runs. Until then it costs about 202 tokens; SKILL.md has 397 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~202
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wislertt/leetcode-py at commit 9155db3, republished under its Apache-2.0 licence (© wislertt). 397 words, ~1,443 tokens.

Download SKILL.mdSave it as .claude/skills/leetcode-py/SKILL.md (or your agent's skills folder). This skill also uses 1559 other files; get the full folder from GitHub.
name
leetcode-py
description
Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI. Use when a repository needs coding interview practice scaffolding: generating problem directories (README, solution stub, parametrized pytest suite, helpers, notebook); setting up collections like Blind 75, Grind 75, Grind 169, NeetCode 150, NeetCode 250, or Algo Master 75; testing LeetCode solutions with loguru-logged, parametrized suites; visualizing TreeNode, ListNode, or GraphNode structures; or scraping LeetCode problem data as JSON. Use even if leetcode-py is not named: "set up interview prep repo", "add leetcode problem", "practice grind 75 in python". Do NOT use for submitting to leetcode.com, fetching judge results or contest rankings, or non-LeetCode competitive programming.
compatibility
Requires Python 3.10+. The lcpy CLI runs in any repo; bake tasks need this repo cloned.
license
Apache-2.0
metadata
version: "1.0" docs: https://leetcode-py.wisl.dev repository: https://github.com/wislertt/leetcode-py

leetcode-py

leetcode-py is a Python LeetCode practice environment generator. lcpy generates complete problem directories from JSON templates bundled with the package, so a repo never carries hand-written test scaffolding. This repository is itself one such practice environment kept in sync by the same generator.

Commands

CommandPurpose
lcpy gen -n 1Generate the Two Sum directory (README, stub, tests, helpers, notebook).
lcpy gen -t grind-75Generate every problem in a collection.
lcpy listList the 307 bundled problems in a formatted table.
lcpy scrape -n 198Fetch a problem's data from LeetCode as JSON.
bake p-test -p two_sumRun one problem's test suite (this repo only).
bake testRun every suite (this repo only).

One CLI: lcpy generates and lists. bake tasks exist only inside a clone of this repository.

Generating problems

bash
pip install leetcode-py-sdk
# or
uv tool install leetcode-py-sdk
bash
mkdir my-practice && cd my-practice
lcpy gen -t grind-75    # a full practice env, no repo checkout needed

gen selects problems by number (-n 1), slug (-s two-sum), collection tag (-t blind-75), difficulty (-d Easy), or --all; repeatable flags accept several values. -o sets the output directory and --force overwrites existing files. gen refuses to clobber without --force.

Problem anatomy

Each problem lands as leetcode/<problem_name>/ with six files:

  • README.md - the problem statement
  • solution.py - implementation with a TODO stub
  • test_solution.py - parametrized pytest suite, 10+ cases
  • helpers.py - run_* / assert_* functions
  • playground.ipynb - percent-format notebook
  • __init__.py - empty package file
Show full SKILL.md (188 more words)Show less

Testing

Suites are parametrized; the same cases cover multiple solution classes:

python
import pytest

from leetcode_py import logged_test

from .helpers import assert_two_sum, run_two_sum
from .solution import Solution


class TestTwoSum:
    def setup_method(self):
        self.solution = Solution()

    @logged_test
    @pytest.mark.parametrize(
        "nums, target, expected",
        [
            ([2, 7, 11, 15], 9, [0, 1]),
            ([3, 3], 6, [0, 1]),  # duplicate values
            ([-1, -2, -3, -4, -5], -8, [2, 4]),  # all negatives
            ([1, 2], 5, []),  # no answer exists
            ([-1000000000, 1000000000], 0, [0, 1]),  # boundary values
        ],
    )
    def test_two_sum(self, nums: list[int], target: int, expected: list[int]):
        result = run_two_sum(Solution, nums, target)
        assert_two_sum(result, expected)

For a second approach next to the first, parametrize over the class instead of copying the suite:

python
@pytest.mark.parametrize("solution_class", [Solution, SolutionMath])
@pytest.mark.parametrize("input_params, expected", test_cases)
def test_method(self, solution_class, input_params, expected):
    result = run_helper(solution_class, *input_params)
    assert_helper(result, expected)

logged_test (from leetcode_py, also exports TreeNode, ListNode, GraphNode) logs each case and its result. Helpers accept the solution class as their first argument and normalize comparison, so [1, 0] passes against expected [0, 1] when order does not matter.

Collections

Six tags ship in the catalog: grind-75 (75), grind (169), blind-75 (75), neetcode-150 (154), neetcode-250 (253), algo-master-75 (75). Overlap is allowed. lcpy list -t <tag> filters, lcpy gen -t <tag> generates the whole set.

Common gotchas

  • lcpy is the published CLI (leetcode-py-sdk on PyPI) and runs in any repo; bake tasks need this repo's bakefile.py.
  • gen fails on existing files; add --force.
  • Problems are snake_case directories (two_sum), LeetCode slugs are kebab-case (two-sum); -s takes the slug, -p in bake p-test takes the directory name.
  • @logged_test wraps the test function and must sit directly above @pytest.mark.parametrize.

Machine-readable docs

© wislertt, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1,559 other files in docs of wislertt/leetcode-py.

  • SKILL.md
  • README.md
  • catalog/algo-master-75.mdx
  • catalog/all-2.mdx
  • catalog/all-3.mdx
  • catalog/all-4.mdx
  • catalog/all-5.mdx
  • catalog/all-6.mdx
  • catalog/all-7.mdx
  • catalog/all-8.mdx
  • catalog/all.mdx
  • catalog/blind-75.mdx
  • catalog/easy-2.mdx
  • catalog/easy.mdx
  • catalog/grind-75.mdx
  • catalog/grind.mdx
  • catalog/hard-2.mdx
  • catalog/hard.mdx
  • catalog/index.mdx
  • catalog/medium-2.mdx
  • … and 1,540 more

Open the folder on GitHubat commit 9155db3

Compare with similar skills

Leetcode Py next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Leetcode Py compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Leetcode Py this skillwislertt/leetcode-py142—~1.4kAutomated safety check: PassApache-2.0
Python Guidelightly-ai/lightly-studio896—~3kAutomated safety check: PassApache-2.0
Python Testingmacalbert/envilder138—~3.1kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Adk Setupgoogle/adk-python22k—~993Automated safety check: NotesApache-2.0
Simple Modern Uvjlevy/simple-modern-uv301—~1.9kAutomated safety check: PassMIT

Similar skills

  • Python Guide

    lightly-ai/lightly-studio

    Read before writing or reviewing any Python code in this repository.

    896 GitHub stars~3k tokensUpdated today
    Testing & QAAuto-check passed
  • Python Testing

    macalbert/envilder

    Mandatory testing conventions including AAA pattern, test naming, assertions, and mocks.

    138 GitHub stars~3.1k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Adk Setup

    google/adk-python

    Official

    Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test…

    22k GitHub stars~993 tokensUpdated today
    DevelopmentAuto-check: notes
  • Simple Modern Uv

    jlevy/simple-modern-uv

    Start, selectively modernize, fully migrate, or update Python projects using simple-modern-uv practices: uv, ruff, BasedPyright, pytest, GitHub Actions CI, and tag-driven PyPI publishing.

    301 GitHub stars~1.9k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 15 days ago
    Testing & QAAuto-check passed

More from wislertt/leetcode-py

  • Test Quality Assurance

    wislertt/leetcode-py

    Test quality assurance workflow for LeetCode problems - verifies reproducibility, fixes linting issues, and ensures test structure matches JSON templates.

    142 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Batch Problem Creation

    wislertt/leetcode-py

    Batch creation workflow for multiple LeetCode problems - loops through problem creation, solution implementation, and quality assurance for a specified count.

    142 GitHub stars~10k tokensUpdated today
    Auto-check passed
  • Problem Creation

    wislertt/leetcode-py

    Guide for creating a single LeetCode problem scaffold - scrape, transform to JSON template, generate files, and verify.

    142 GitHub stars~9.9k tokensUpdated today
    Auto-check passed
  • Update Tags

    wislertt/leetcode-py

    Use ONLY when user explicitly requests "update tags" or "/update-tags", or after running .claude/.dev/updatetags.py and seeing "Missing" or "Removed" discrepancy lines.

    142 GitHub stars~2.5k tokensUpdated today
    Auto-check passed

Works with

Questions about Leetcode Py

What does Leetcode Py do?

Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI. Leetcode Py is an agent skill from wislertt/leetcode-py. Generates Python LeetCode practice environments and manages a 307-problem catalog with the lcpy CLI.

When should I use Leetcode Py?

Leetcode Py fits situations like: A repository needs coding interview practice scaffolding: generating problem directories (README; parametrized pytest suite; setting up collections like Blind 75; testing LeetCode solutions with loguru-logged.

How do I install Leetcode Py in Claude Code?

Run `npx skills add wislertt/leetcode-py --skill leetcode-py -a claude-code`. Or copy the skill folder (docs in wislertt/leetcode-py) into .claude/skills/leetcode-py in your project. Claude Code loads it when a task matches its description.

How do I install Leetcode Py in Codex?

Run `npx skills add wislertt/leetcode-py --skill leetcode-py -a codex`. Or copy the skill folder (docs in wislertt/leetcode-py) into .agents/skills/leetcode-py in your project. Codex loads it when a task matches its description.

Can I use Leetcode Py in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wislertt/leetcode-py --skill leetcode-py -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/leetcode-py, .gemini/skills/leetcode-py, .github/skills/leetcode-py and .opencode/skills/leetcode-py in your project.

What does Leetcode Py need to run?

Going by SKILL.md and its folder, Leetcode Py needs the command-line tools its instructions call (pip, uv and npx). Our summary lists: Python 3; Node.js. Compatibility (from SKILL.md): Requires Python 3.10+. The lcpy CLI runs in any repo; bake tasks need this repo cloned..

Does Leetcode Py access the network?

SKILL.md names 1 domain. In commands or code: leetcode-py.wisl.dev; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Leetcode Py safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Leetcode Py use?

Leetcode Py is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Leetcode Py use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Leetcode Py?

Skills that share tags, products or a category with Leetcode Py: Python Guide (lightly-ai/lightly-studio, 896 stars), Python Testing (macalbert/envilder, 138 stars), Kedro Babysit (kedro-org/kedro, 11k stars) and Adk Setup (google/adk-python, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Leetcode Py?

wislertt (a GitHub user) maintains it in wislertt/leetcode-py, which has 142 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: wislertt/leetcode-py on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.