npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

doing-leetcode

v1.0.0

Published

Interview-style algorithm practice Skill for AI coding agents (TRAE, Claude Code, Cursor, Windsurf, etc.). Simulates real interview whiteboarding from problem analysis to complete code.

Readme

doing-LeetCode

Interview-style algorithm practice Skill for AI coding agents. Simulates a real interview whiteboarding experience — from the moment you receive a problem to the moment you write the final line of code.

Works with TRAE, Claude Code, Cursor, Windsurf, GitHub Copilot, Cline, and any agent that supports skill directories.

What It Does

When you enter practice mode and ask an algorithm question, this skill:

  1. Confirms your preferences — ACM or LeetCode mode? Chat or file output?
  2. Solves the problem like a real interview — raw, step-by-step thinking, not a polished answer
  3. Writes code segment by segment — each code block is preceded by what you're thinking
  4. Re-explains the approach at the end, simulating an interviewer follow-up

Quick Start

Install via npx (recommended)

# Install into your current project for TRAE (default agent)
npx doing-leetcode

# Install for a specific agent
npx doing-leetcode --agent claude
npx doing-leetcode --agent cursor
npx doing-leetcode --agent windsurf

# Specify a target directory
npx doing-leetcode /path/to/your/project

# Combine target + agent
npx doing-leetcode /path/to/your/project --agent claude

Supported Agents

| Agent | --agent value | Skill directory | |-------|-----------------|-----------------| | TRAE (default) | trae | .trae/skills/doing-LeetCode/ | | Claude Code | claude | .claude/skills/doing-LeetCode/ | | Cursor | cursor | .cursor/skills/doing-LeetCode/ | | Windsurf | windsurf | .windsurf/skills/doing-LeetCode/ | | GitHub Copilot | copilot | .github/copilot-skills/doing-LeetCode/ | | Cline | cline | .cline/skills/doing-LeetCode/ | | Custom path | custom | Use --skill-path to specify |

Custom Skill Path

If your agent uses a non-standard directory, use --agent custom with --skill-path:

npx doing-leetcode --agent custom --skill-path .myagent/skills
npx doing-leetcode --agent custom --skill-path /absolute/path/to/skills

List Supported Agents

npx doing-leetcode --list

Install via npm (global)

npm install -g doing-leetcode
doing-leetcode /path/to/your/project --agent claude

Install via git clone

cd your-project/.trae/skills/   # or .claude/skills/, .cursor/skills/, etc.
git clone https://github.com/Xstly1014/doing-LeetCode.git

Usage

Once installed, open your project in your agent IDE and say:

practice mode, reverse linked list

The skill will respond:

Got it. Before we start, I need to confirm two things:

1. ACM mode or LeetCode mode?
2. Output to chat or write to file?

After you answer, the skill walks through the entire problem-solving process:

  • First reaction — raw initial thoughts
  • Determining direction — analyzing problem characteristics to pick the optimal approach
  • Writing code while thinking — segment by segment, with reasoning before each block
  • Complete code — assembled into one copy-pasteable block
  • Complexity analysis — time and space, with explanations
  • Re-explaining the approach — simulating "walk me through your solution"

ACM Mode vs LeetCode Mode

| Mode | Description | |------|-------------| | ACM Mode | Complete runnable program with main, input handling (Scanner), and output (System.out) | | LeetCode Mode | Only the Solution class and core method — no main, no I/O |

Output Options

| Option | Description | |--------|-------------| | Chat Output | Everything displayed in the conversation | | File Output | Appended to a markdown file (default: practice-notes.md) |

Example Output Style

Alright, let me look at this problem.

Reverse a linked list... so 1->2->3->4->5 becomes 5->4->3->2->1.

My first reaction: each node's next should point to the previous node.
But a singly linked list only goes forward — how do I know the previous node?

Let me think... if I'm at node 2, I want 2 to point to 1. But once I
move past 1, it's gone — unless I save it beforehand.

Also, if I change 2's next to point to 1, I lose 2's original next (node 3).
So I must save 2's next before changing the pointer.

OK, direction is set: three pointers — prev, curr, next.

Let me start writing.

First, I need to handle I/O. ACM mode, so I need a main method...

```java
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
    }
}

Wait, I need to build a linked list. Let me define ListNode first...

class ListNode {
    int val;
    ListNode next;
    ListNode(int val) { this.val = val; }
}

Now the core method. What parameters? Pass head, return the new head...

    public static ListNode reverseList(ListNode head) {
        ListNode prev = null;
        ListNode curr = head;
        while (curr != null) {
            ListNode next = curr.next;
            curr.next = prev;
            prev = curr;
            curr = next;
        }
        return prev;
    }

Return prev because when curr becomes null, prev points to the last processed node — the new head.


## File Structure

doing-LeetCode/ ├── SKILL.md # Skill definition (the core file) ├── bin/ │ └── install.js # npx installer script (multi-agent support) ├── package.json # npm package config ├── README.md # This file ├── LICENSE # MIT └── .gitignore


## Language Support

Default priority:
1. Language explicitly specified by the user
2. Java (most common in interviews)
3. Python (quick to validate ideas)
4. C++ (common in competitive programming)

## License

MIT