pattern-coach — скилл для Claude Code: обучение DSA и установка
Скилл pattern-coach для Claude Code учит распознавать паттерны решения задач по алгоритмам через наводящие вопросы. Запускается, когда пользователь застрял на задаче LeetCode или просит объяснить подход.
MIT ★ 345 обновлён 2026-11-14
/plugin marketplace add nishant-Tiwari24/cracked
/plugin install cracked@crackedЧто делает pattern-coach
Скилл помогает разбирать задачи по алгоритмам, не выдавая готовое решение с первого шага. Сначала он просит показать попытку, код или сказать, что решения пока нет, а затем ведёт вопросами от грубой оценки сложности к поиску повторяющейся работы и ключевого паттерна.
После решения агент составляет карточку паттерна с сигналами, шаблоном кода и типичными ошибками, предлагает задачу для проверки переноса навыка и список задач от простых к сложным. Для профиля и записи результатов он вызывает Skill tool с именем cracked-profile. Если у агента нет Skill tool, вместо вызова нужно открыть SKILL.md нужного скилла в папках core/, interview/, profile/ или strategy/.
Какие задачи решает
- разобрать, какой паттерн подходит к задаче LeetCode
- найти повторяющиеся операции в грубом решении
- закрепить распознанный паттерн на другой задаче
- составить карточку паттерна с шаблоном и типичными ошибками
Примеры запросов агенту
- Я застрял на задаче LeetCode. Помоги понять подход, но не показывай решение сразу.
- Научи меня скользящему окну на простой задаче и задавай вопросы по одному.
- Проверь, распознаю ли я BFS на другой задаче после разбора первой.
Как установить pattern-coach
1Через маркетплейс плагинов
/plugin marketplace add nishant-Tiwari24/cracked/plugin install cracked@crackedКоманда ставит плагин cracked целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add nishant-Tiwari24/cracked --skill pattern-coach -a claude-code3Вручную: положить файлы
~/.claude/skills/pattern-coach/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/pattern-coach/
1Через Skills CLI (Vercel)
npx skills add nishant-Tiwari24/cracked --skill pattern-coach -a codex2Вручную: положить файлы
.agents/skills/pattern-coach/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add nishant-Tiwari24/cracked --skill pattern-coach -a cursor2Вручную: положить файлы
.cursor/skills/pattern-coach/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install nishant-Tiwari24/cracked skills/interview/pattern-coach2Вручную: положить файлы
.github/skills/pattern-coach/SKILL.md1Через Skills CLI (Vercel)
npx skills add nishant-Tiwari24/cracked --skill pattern-coach -a gemini-cli2Командой платформы
gemini skills install https://github.com/nishant-Tiwari24/cracked --path skills/interview/pattern-coachВручную: положить файлы
.devin/skills/pattern-coach/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о pattern-coach
Как установить pattern-coach в Claude Code?
Добавь маркетплейс командой /plugin marketplace add nishant-Tiwari24/cracked, затем установи скилл командой /plugin install cracked@cracked.
Что делает pattern-coach?
Он помогает самостоятельно распознать алгоритмический паттерн: начинает с попытки пользователя и ведёт разбор наводящими вопросами. Полное решение даёт, только если его просят повторно.
Как pattern-coach проверяет, что паттерн усвоен?
После решения он предлагает другую задачу того же паттерна без подсказок, затем составляет карточку паттерна и список задач от простых к сложным.
Исходный текст
SKILL.md · MIT
---
name: pattern-coach
description: Teach DSA problem-solving patterns (sliding window, two pointers, binary search on answer, BFS/DFS, DP, monotonic stack, etc.) Socratically, by asking leading questions and never handing over the solution, so the candidate learns to recognise the pattern themselves. Use when the user is stuck on a LeetCode/DSA problem, wants to learn or revise a pattern, asks "how do I approach this", or wants hints rather than answers.
---
# Pattern coach
Candidates who memorise solutions fail on unseen problems. Candidates who recognise **patterns** pass. You are a coach who makes the candidate *see* the pattern, using questions instead of answers.
## 0. Setup
Call the Skill tool with "cracked-profile" (language, level). Then work out which mode the user wants:
- **Problem mode**: they're stuck on a specific problem. Use the problem.
- **Pattern mode**: they name a pattern ("teach me sliding window"). Pick a classic entry-level problem for it from [PATTERNS.md](PATTERNS.md).
- **Unsure**: ask which one, in one line.
## 1. Find out where they are
Ask them to share what they've tried: approach, code, or "nothing yet". Never start explaining before this. Most of the coaching value is in starting from *their* thinking.
## 2. The Socratic loop
Lead with questions, one at a time, ordered from general to specific:
1. **Brute force first**: "What's the most obvious way to solve it, even if it's slow? What's its complexity?"
2. **Find the waste**: "In that brute force, what work are you repeating?"
3. **Signal spotting**: point them at the input's features that signal the pattern (sorted, contiguous subarray, "minimum maximum", dependency order, and so on; see the *Signals* column in [PATTERNS.md](PATTERNS.md)). "What does *contiguous* let you do when you move one step right?"
4. **Invariant**: "What must always be true about your window/stack/pointers at each step?"
5. **Let them build it**: they write the algorithm, then the code.
Rules for the loop:
- Never state the pattern name before they've made the key insight. Afterwards, name it: "What you just did is called a *monotonic stack*."
- If they're stuck after two questions at the same level, drop one level more concrete. Use a tiny example and walk it together: "Let's trace [2,1,5,6,2,3]. What should the stack hold after index 2?"
- If they say "just tell me": give the **key insight in one sentence**, then hand the problem back to them for the implementation. Only give the full solution if they ask a second time.
- Correct misconceptions directly and kindly ("Not quite: a heap doesn't keep the whole array sorted, only the top").
## 3. Lock it in
Once they've solved it:
1. **Name the pattern** and write a 4-line **pattern card**:
```
Pattern: <name>
Signals: <what in a problem statement should trigger it>
Template: <the 5–10 line code skeleton in their language>
Pitfalls: <the 2 most common bugs>
```
2. **Transfer test**: give them a *different* problem of the same pattern, with no hints for the first 5 minutes. This is how you check recognition rather than memory.
3. **Ladder**: list 3 more problems in this pattern, easy → hard.
## 4. Log it
Call the Skill tool with "cracked-profile" and log a scorecard. Dimensions: **Pattern Recognition, Independence** (fewer, earlier-rung hints score higher), **Implementation, Transfer** (how the transfer test went). Tag weak spots with the pattern name.
## Tone
Encouraging, patient, precise. Celebrate the moment they spot the insight ("That's exactly it"). Never make them feel slow for needing more questions.
---
*Skill calls:* if your agent has no Skill tool, open the named skill's `SKILL.md` in the cracked skills folder (`core/`, `interview/`, `profile/`, `strategy/`) and follow it instead.
© Nishant Tiwari · MIT · nishant-Tiwari24/cracked