← Back to Skills Marketplace
fourierer

auto-leetcode

by Fourier · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
40
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install auto-leetcode
Description
LeetCode刷题辅助技能。当用户提供LeetCode题目序号+名称时,自动获取题目内容、生成解题思路和带注释的代码,并在指定目录下创建题目文件夹。支持用户指定编程语言(默认Python)。当用户提到LeetCode刷题、做LeetCode题目、LeetCode题解、刷算法题等场景时触发。
README (SKILL.md)

LeetCode 刷题助手

根据用户提供的题目序号+名称,自动生成题目内容、解题思路和代码,并创建本地文件夹。

输入要求

用户需提供:

  • 题目序号+名称(如 42.接雨水1.两数之和
  • 本地目录路径(如 /Users/yihe/leetcode
  • 编程语言(可选,默认 Python;可选 pythoncppjavajavascriptgorust

若用户未提供目录或语言,主动询问。

工作流程

1. 获取题目内容

使用 web-search-prime_web_search_prime 搜索题目,关键词格式:LeetCode {序号} {名称}

然后使用 web-reader_webReader 抓取题目页面内容(优先使用 LeetCode 中文站 leetcode.cn 的链接)。

从抓取内容中提取:

  • 题目标题
  • 难度(简单/中等/困难)
  • 题目描述
  • 输入输出示例
  • 数据范围/约束条件

2. 生成解题思路

基于题目内容,分析并生成结构化的解题思路,包含:

  • 问题分析与关键洞察
  • 推荐解法(优先给出最优解)
  • 算法步骤(伪代码或自然语言描述)
  • 时间/空间复杂度分析
  • 如有多种解法,列出对比(从暴力到最优)

3. 生成代码

根据用户指定语言(默认Python)生成带详细注释的代码:

  • 函数/类签名词汇与LeetCode一致
  • 中文注释解释关键逻辑
  • 包含解题思路中的核心算法
  • 代码风格参考 references/code-style.md

4. 创建本地文件

在用户指定目录下创建文件夹并写入文件。

文件夹命名:使用题目序号+名称(如 42.接雨水

文件结构

{目录}/{序号}.{名称}/
├── 题目内容.md
├── 解题思路.md
└── {序号}.{ext}

语言与扩展名映射

语言 扩展名
python .py
cpp .cpp
java .java
javascript .js
go .go
rust .rs

5. 文件内容格式

各文件格式参考 references/output-templates.md

Usage Guidance
This looks safe for its stated purpose. Before installing, be aware that it will use web lookup/reading tools and create files in a local directory you provide. Choose a dedicated folder and check for existing files with the same problem name to avoid accidental overwrites.
Capability Analysis
Type: OpenClaw Skill Name: auto-leetcode Version: 1.0.0 The 'auto-leetcode' skill is a legitimate utility designed to automate the process of fetching LeetCode problem descriptions and generating solution files. It uses standard web search and reading tools to gather information and writes the results to a user-specified local directory using predefined templates in 'references/output-templates.md'. No indicators of malicious intent, data exfiltration, or unauthorized execution were found.
Capability Assessment
Purpose & Capability
The stated purpose, workflow, and included reference templates all align around fetching LeetCode problem content, generating explanations/code, and saving them locally.
Instruction Scope
The skill instructs use of web search/web reader tools and local file creation, which are purpose-aligned but should remain limited to the requested LeetCode problem and user-provided directory.
Install Mechanism
There is no install spec, no executable code, no required binaries, and no required environment variables or credentials.
Credentials
Writing files under a user-specified path is proportionate to the skill, but users should choose a dedicated directory and avoid overwriting existing work.
Persistence & Privilege
The only persistence described is creation of local problem folders and files; there is no background service, credential storage, memory indexing, or ongoing autonomous behavior.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install auto-leetcode
  3. After installation, invoke the skill by name or use /auto-leetcode
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
auto-leetcode 1.0.0 – LeetCode刷题自动化助手发布 - 根据用户输入的题目序号和名称自动获取LeetCode题目信息 - 生成结构化解题思路与带注释的代码(支持多语言,默认Python) - 在指定本地目录自动创建题目文件夹与标准文件结构 - 支持自定义编程语言(Python、C++、Java、JavaScript、Go、Rust) - 全程引导用户输入必要信息,自动补全缺失部分
Metadata
Slug auto-leetcode
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is auto-leetcode?

LeetCode刷题辅助技能。当用户提供LeetCode题目序号+名称时,自动获取题目内容、生成解题思路和带注释的代码,并在指定目录下创建题目文件夹。支持用户指定编程语言(默认Python)。当用户提到LeetCode刷题、做LeetCode题目、LeetCode题解、刷算法题等场景时触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 40 downloads so far.

How do I install auto-leetcode?

Run "/install auto-leetcode" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is auto-leetcode free?

Yes, auto-leetcode is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does auto-leetcode support?

auto-leetcode is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created auto-leetcode?

It is built and maintained by Fourier (@fourierer); the current version is v1.0.0.

💬 Comments