leetcode-teacher
LeetCode 逐步练习 Skill
设计理念 (Why)
核心学习循环
出题 → 生成脚手架 → 用户独立作答 → 验证 → 复盘讲解
为什么这样设计
问题:传统刷题往往是被动接受——看题想思路看答案,浅层记忆很快消散。
解决方案:建立「主动思考」的学习闭环:
- 出题 → 制造知识缺口,激发探索欲
- 脚手架 → 降低启动成本,让用户专注解题本身
- 独立作答 → 没有提示,只能自己想,建立真实能力
- 验证 → 用客观结果检验理解
- 复盘 → 从具体解法提炼可迁移的算法思维
效果:用户自己想出来的才会真正记住,并能迁移到新题。
为什么需要进度追踪
刷题是长期过程,跨会话的记忆很重要。进度追踪让:
- 下次会话知道用户做过什么题
- 薄弱点可以被识别和复习
- 学习轨迹有据可查
为什么需要每日目标
目标驱动坚持。每日目标 + git commit 让进步可视化、可沉淀。
系统架构
配置文件:leetcode.json
{
"difficulty": "medium",
"daily_goal": 3,
"mode": "normal",
"initialized": true,
"problems": [...],
"progress": {},
"study_plan": {}
}
交互模式选择
| 模式 | 何时使用 | 做什么 | 不做什么 |
|---|---|---|---|
| 普通模式 | 新题练习、需要写代码 | 出题 + 自动生成脚手架 + 验证 | 不给提示 |
| 快速模式 | 复习、口头推导 | 出题 + 对话引导思考 | 不生成代码、不给答案 |
初始化流程
触发条件:leetcode.json 不存在。
操作:通过 question 工具依次询问:
-
difficulty:难度偏好
- 问题:"想练习什么难度的题目?"
- 选项:简单 / 中等(默认)/ 困难
-
daily_goal:每日目标
- 问题:"每日目标做几道题目?"
- 范围:1-10,默认 3
-
mode:默认交互模式
- 问题:"默认使用哪种模式?"
- 选项:普通模式 / 快速模式
完成后:告知用户配置已保存,可以开始刷题。
会话开始
操作步骤:
- 检查 leetcode.json 是否存在,不存在则执行初始化
- 读取每日状态:
python3 scripts/get_status.py - 根据 next_step 判断后续操作
模式加载
用户说"下一题"、"来一道"、"开始练习"时:
- 读取 leetcode.json 获取当前模式设置
- 普通模式 → 读取
references/normal_mode_sop.md并执行 - 快速模式 → 读取
references/quick_mode_sop.md并执行
模式切换:用户说"快速模式"进入快速模式,说"普通模式"切回普通模式。切换后立即执行对应 SOP。
题目分类体系
详见 references/problem_list.md
| 优先级 | 类型 |
|---|---|
| High | DP、双指针、滑动窗口、哈希表、链表、树、图 |
| Medium | 二分、栈、堆、回溯、区间 |
| Low | 并查集、Trie |
关键原则
-
独立思考优先:过早提示会减少学习效果,用户自己想出来的才会真正记住
-
验证驱动:用测试用例说话,让客观结果引导认知
-
理解优于答案:讲解为什么,而非仅仅是什么。复杂度分析能力和算法思维迁移性比记住特定解法更有长期价值
-
持续追踪:进度文档是跨会话的记忆,让学习有连贯性
-
诊断而非修改:除非用户明确要求"帮我改",否则只指出问题位置和方向,保持用户的学习主体性
参考文档
| 文档 | 用途 |
|---|---|
references/problem_list.md |
题目库,按类型和优先级组织 |
references/normal_mode_sop.md |
普通模式完整 SOP |
references/quick_mode_sop.md |
快速模式完整 SOP |
references/scaffolds.md |
脚手架模板和测试用例生成原则 |
references/progress_tracking.md |
进度追踪格式详细说明 |
scripts/get_status.py |
获取每日状态 |
scripts/update_progress.py |
更新进度 |
scripts/git_ops.sh |
Git 操作 |
More from lumincui/skills
infographic
|
8knowledge-graph
将研究、讨论、探究的内容整理成系统性知识文档,或收集整理公司/产品调研信息。当用户要求总结知识、整理笔记、生成知识库文档、把讨论内容沉淀为结构化文档时使用此 skill。也适用于收集整理 AI 公司、初创企业、产品的调研信息。即使用户没有明确说"知识图谱"或"知识库",只要涉及把散乱信息梳理成体系化文档的工作流,都应使用此 skill。
8opinion-miner
Analyze community opinions from forums and comment sections. Scrapes comments from Bilibili, Reddit, or GitHub Issues, clusters them by semantic similarity, and extracts the core arguments, debates, and viewpoints. Produces a structured report showing what the community actually thinks — not just a summary of comments, but the underlying positions people hold and where the real disagreements are. Use this skill when the user wants to understand public opinion on a topic, find the main points of contention in a discussion, or do competitive/event research from community sources. Triggers include requests to "analyze comments", "what are people saying about X", "summarize the debate", "find the key arguments", "what's the community consensus", or any task involving opinion extraction from forum or comment data.
7obsidian-todoist-sync
>
7housing-monitor
|
6