mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-09-26 13:20:42 +02:00
docs: follow-ups from the v2.1.220 accuracy review (#161)
* fix(ci): move the EPUB build out of pre-commit into CI The build-epub hooks called scripts/build_epub.py, which raises when the mmdc binary is missing, while check_mermaid.py skips with a warning in the same situation. On arm64 — where @mermaid-js/mermaid-cli has no working build — that made 'pre-commit run --all-files' impossible to satisfy for a docs-only change without --no-verify. Remove the build-epub, vietnamese-build-epub and japanese-build-epub hooks and widen the CI build-epub job to a language matrix so PR-time coverage is not reduced: it previously built en only, and now builds en, vi, zh and ja. zh was covered by neither the hooks nor this job, so a broken zh diagram could only surface at release time. Closes #156 * docs: replace the stale Kroki narrative with local mmdc rendering Commite76bbe4swapped the Kroki HTTP dependency for local mmdc rendering but left the docs describing the old design. The claim appeared in seven live files, not the two originally reported: CLAUDE.md, scripts/README.md and their ja/uk/vi copies. Also corrects what the same staleness dragged along: - scripts/README.md documented --timeout and --max-concurrent, which no longer exist, and omitted --mmdc-path, --lang and --puppeteer-config - 'Async concurrent fetching' described a render_all() that is now a plain sequential loop with a dedupe cache - the network-error/rate-limiting troubleshooting entries are replaced with the failures that actually occur now (missing mmdc, Chromium sandbox) CHANGELOG entries recording the Kroki-to-mmdc switch are left alone; they describe the past accurately. Closes #157 * fix(scripts): make the ruff config match files that exist Ruff resolves include/per-file-ignores patterns relative to the directory holding pyproject.toml. Since the config lives in scripts/, the pattern "scripts/**/*.py" meant scripts/scripts/**/*.py, which matches nothing — 'ruff check scripts/' printed 'warning: No Python files found under the given path(s)' and then 'All checks passed!'. per-file-ignores had the same mistake. Both are now relative to scripts/, so ruff sees all 14 files. This silently disabled the pre-commit ruff hooks too, not just the documented command, and two test files had drifted out of format as a result. Reformatting them exposed a second problem: the pre-commit hook pinned ruff v0.8.2 while the CI lint job installs unpinned latest and this venv has 0.15.10. The versions disagree on formatting, so each reverted the other's output, and CI would have started failing on a file the local hook kept rewriting. Bump the hook pin and the requirements-dev floor to 0.15.10 so all three agree. Verified: 'pre-commit run --all-files' is stable across consecutive runs, 'ruff format --check scripts/' and 'ruff check scripts/' both pass, 92 tests pass. Closes #160 * docs: point localized module links at their own trees Files at the root of a language directory used ../NN-module/, which from uk/CATALOG.md resolves to the English 05-mcp/ at the repo root rather than uk/05-mcp/. Readers following a count stated about the localized tree landed in the English one. The link checker never caught it because the English target does exist. Files one level deeper (uk/04-subagents/README.md and friends) were already correct — ../06-hooks/ from there resolves to uk/06-hooks/ — so this is scoped to the 7 depth-1 files that actually escape: CATALOG.md in uk, vi, ja and zh, LEARNING-ROADMAP.md in uk and vi, and ja/claude_concepts_guide.md. 119 links in total. The ../NN- occurrences left in STYLE_GUIDE.md and TRANSLATION_NOTES.md are inside fenced examples showing what a module page should contain, where the ../ form is the correct convention. All 119 rewritten targets were verified to exist. Closes #158 * docs(hooks): stop conflating hook types with hook event categories '**Hook Types** (5 types, 31 events)' sat above four bullets, so the count read as wrong. It was not — the two numbers describe different axes that had been merged into one label. 06-hooks/README.md:126 documents five hook *types*: command, http, prompt, mcp_tool and agent. Those describe how a hook runs. The four bullets are event *categories* — Tool, Session, Task, Lifecycle — holding 31 events (6+7+6+12), and describe when it runs. Split the label so each number belongs to the axis it counts, in all nine affected files: README.md and INDEX.md plus the ja, uk, vi and zh copies. QUICK_REFERENCE.md and LEARNING-ROADMAP.md already stated '5 types' with the handler names attached and needed no change. Closes #159 * chore(scripts): drop the unused httpx dependency httpx was the HTTP client for Kroki rendering. Nothing has imported it sincee76bbe4moved diagram rendering to a local mmdc subprocess — check_links.py, the only other network caller, uses stdlib urllib.request. The PEP 723 blocks in build_epub.py and build_website.py had already dropped it; only the manifests and docs still declared it. Removes it from requirements.txt, pyproject.toml dependencies, the dependency tables and uv --with lines in scripts/README.md and its ja/uk copies, and the .cspell.json word list. Also drops the B113 bandit suppression, which existed solely for an httpx timeout false positive — bandit reports no issues without it. Also corrects two Requirements lines missed in the previous pass: the ja and uk script READMEs still listed an internet connection rather than mmdc. Note: tenacity is now dead for the same reason and is left in place. * chore(scripts): drop the unused tenacity dependency Nothing imports tenacity — the retry logic it was added for went away with the Kroki HTTP fetching ine76bbe4. It was still declared in requirements.txt, pyproject.toml, both `uv run --with` lines and all three dependency tables. * docs(i18n): sync the localized pre-commit check lists The ja/uk/vi CLAUDE.md files still listed build-epub as pre-commit check #5, stale since 6da8184 moved the EPUB build to CI. They also omitted markdown-rendering, and the ja/uk stated counts disagreed with their own lists. Now matches the English CLAUDE.md. * fix(scripts): silence PLR0917 now stable in ruff 0.16 CI installs the latest ruff (uv pip install ruff, unpinned), and 0.16.1 promoted too-many-positional-arguments from preview to stable, hard-failing the Code Quality check on build_epub.py's long-signature draw/helper functions. These sit in the same family as PLR0913, which is already ignored. Add PLR0917 so the local 0.15.10 pin and unpinned CI lint agree again.
This commit is contained in:
+15
-15
@@ -19,13 +19,13 @@
|
||||
|
||||
| Функція | Вбудовані | Приклади | Разом | Довідник |
|
||||
|---------|-----------|----------|-------|----------|
|
||||
| **Слеш-команди** | 60+ | 8 | 68+ | [01-slash-commands/](../01-slash-commands/) |
|
||||
| **Субагенти** | 6 | 9 | 15 | [04-subagents/](../04-subagents/) |
|
||||
| **Навички (Skills)** | 10 вбудованих | 6 | 16 | [03-skills/](../03-skills/) |
|
||||
| **Плагіни** | - | 3 | 3 | [07-plugins/](../07-plugins/) |
|
||||
| **MCP-сервери** | 1 | 4 | 5 | [05-mcp/](../05-mcp/) |
|
||||
| **Хуки** | 31 подія | 10 | 41 | [06-hooks/](../06-hooks/) |
|
||||
| **Пам'ять** | 7 типів | 3 | 10 | [02-memory/](../02-memory/) |
|
||||
| **Слеш-команди** | 60+ | 8 | 68+ | [01-slash-commands/](01-slash-commands/) |
|
||||
| **Субагенти** | 6 | 9 | 15 | [04-subagents/](04-subagents/) |
|
||||
| **Навички (Skills)** | 10 вбудованих | 6 | 16 | [03-skills/](03-skills/) |
|
||||
| **Плагіни** | - | 3 | 3 | [07-plugins/](07-plugins/) |
|
||||
| **MCP-сервери** | 1 | 4 | 5 | [05-mcp/](05-mcp/) |
|
||||
| **Хуки** | 31 подія | 10 | 41 | [06-hooks/](06-hooks/) |
|
||||
| **Пам'ять** | 7 типів | 3 | 10 | [02-memory/](02-memory/) |
|
||||
| **Разом** | **115** | **43** | **158** | |
|
||||
|
||||
---
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
> **Область**: `Користувач` = персональні процеси (`~/.claude/commands/`), `Проект` = спільні для команди (`.claude/commands/`)
|
||||
|
||||
**Довідник**: [01-slash-commands/](../01-slash-commands/) | [Офіційна документація](https://code.claude.com/docs/en/interactive-mode)
|
||||
**Довідник**: [01-slash-commands/](01-slash-commands/) | [Офіційна документація](https://code.claude.com/docs/en/interactive-mode)
|
||||
|
||||
**Швидке встановлення (усі кастомні команди)**:
|
||||
|
||||
@@ -128,7 +128,7 @@ Claude Code підтримує 6 режимів дозволів, що конт
|
||||
| `bypassPermissions` | Пропустити всі перевірки дозволів | CI/CD, headless-середовища |
|
||||
| `dontAsk` | Пропустити інструменти, що потребують дозволу | Неінтерактивне скриптування |
|
||||
|
||||
> **Примітка**: Режим `auto` вимагає відповідного плану, моделі та провайдера — див. [09-advanced-features/](../09-advanced-features/#auto-mode). Використовуйте `bypassPermissions` лише в довірених ізольованих середовищах.
|
||||
> **Примітка**: Режим `auto` вимагає відповідного плану, моделі та провайдера — див. [09-advanced-features/](09-advanced-features/#auto-mode). Використовуйте `bypassPermissions` лише в довірених ізольованих середовищах.
|
||||
|
||||
**Довідник**: [Офіційна документація](https://code.claude.com/docs/en/permissions)
|
||||
|
||||
@@ -179,7 +179,7 @@ Claude Code підтримує 6 режимів дозволів, що конт
|
||||
|
||||
> **Область**: `Користувач` = персональні (`~/.claude/agents/`), `Проект` = спільні для команди (`.claude/agents/`)
|
||||
|
||||
**Довідник**: [04-subagents/](../04-subagents/) | [Офіційна документація](https://code.claude.com/docs/en/sub-agents)
|
||||
**Довідник**: [04-subagents/](04-subagents/) | [Офіційна документація](https://code.claude.com/docs/en/sub-agents)
|
||||
|
||||
**Швидке встановлення (усі кастомні агенти)**:
|
||||
|
||||
@@ -225,7 +225,7 @@ cp 04-subagents/*.md .claude/agents/
|
||||
| `effort` | string | Рівень зусиль міркування (`low`, `medium`, `high`) |
|
||||
| `shell` | string | Оболонка для скриптів (`bash`, `zsh`, `sh`) |
|
||||
|
||||
**Довідник**: [03-skills/](../03-skills/) | [Офіційна документація](https://code.claude.com/docs/en/skills)
|
||||
**Довідник**: [03-skills/](03-skills/) | [Офіційна документація](https://code.claude.com/docs/en/skills)
|
||||
|
||||
**Швидке встановлення (усі навички)**:
|
||||
|
||||
@@ -272,7 +272,7 @@ cp -r 03-skills/* ~/.claude/skills/
|
||||
└── scripts/ # Допоміжні скрипти
|
||||
```
|
||||
|
||||
**Довідник**: [07-plugins/](../07-plugins/) | [Офіційна документація](https://code.claude.com/docs/en/plugins)
|
||||
**Довідник**: [07-plugins/](07-plugins/) | [Офіційна документація](https://code.claude.com/docs/en/plugins)
|
||||
|
||||
**Команди управління плагінами**:
|
||||
|
||||
@@ -321,7 +321,7 @@ cp -r 03-skills/* ~/.claude/skills/
|
||||
}
|
||||
```
|
||||
|
||||
**Довідник**: [05-mcp/](../05-mcp/) | [Документація MCP](https://modelcontextprotocol.io)
|
||||
**Довідник**: [05-mcp/](05-mcp/) | [Документація MCP](https://modelcontextprotocol.io)
|
||||
|
||||
**Швидке встановлення (GitHub MCP)**:
|
||||
|
||||
@@ -401,7 +401,7 @@ export GITHUB_TOKEN="your_token" && claude mcp add github -- npx -y @modelcontex
|
||||
}
|
||||
```
|
||||
|
||||
**Довідник**: [06-hooks/](../06-hooks/) | [Офіційна документація](https://code.claude.com/docs/en/hooks)
|
||||
**Довідник**: [06-hooks/](06-hooks/) | [Офіційна документація](https://code.claude.com/docs/en/hooks)
|
||||
|
||||
**Швидке встановлення (усі хуки)**:
|
||||
|
||||
@@ -429,7 +429,7 @@ mkdir -p ~/.claude/hooks && cp 06-hooks/*.sh ~/.claude/hooks/ && chmod +x ~/.cla
|
||||
|
||||
> **Область**: `Організація` = керується адмінами, `Проект` = спільний через git, `Користувач` = персональні, `Локальний` = не комітиться, `Сесія` = автокерований
|
||||
|
||||
**Довідник**: [02-memory/](../02-memory/) | [Офіційна документація](https://code.claude.com/docs/en/memory)
|
||||
**Довідник**: [02-memory/](02-memory/) | [Офіційна документація](https://code.claude.com/docs/en/memory)
|
||||
|
||||
**Швидке встановлення**:
|
||||
|
||||
|
||||
+9
-7
@@ -16,7 +16,7 @@ Claude How To — це навчальний репозиторій з функц
|
||||
|
||||
### Перевірки якості pre-commit
|
||||
|
||||
Уся документація повинна пройти чотири перевірки якості перед комітами (запускаються автоматично через pre-commit хуки):
|
||||
Уся документація повинна пройти п'ять перевірок якості перед комітами (запускаються автоматично через pre-commit хуки):
|
||||
|
||||
```bash
|
||||
# Install pre-commit hooks (runs on every commit)
|
||||
@@ -31,7 +31,9 @@ pre-commit run --all-files
|
||||
2. **cross-references** — Внутрішні посилання, якорі, синтаксис блоків коду (Python-скрипт)
|
||||
3. **mermaid-syntax** — Валідація коректного парсингу всіх Mermaid-діаграм (Python-скрипт)
|
||||
4. **link-check** — Доступність зовнішніх URL (Python-скрипт)
|
||||
5. **build-epub** — EPUB генерується без помилок (при змінах `.md`)
|
||||
5. **markdown-rendering** — Markdown рендериться без помилок (Python-скрипт)
|
||||
|
||||
Збірка EPUB **не є** pre-commit хуком — вона виконується лише в CI (джоб `build-epub` у `.github/workflows/test.yml`), бо потребує локального бінарника `mmdc`, для якого немає робочої збірки під arm64.
|
||||
|
||||
### Налаштування середовища розробки
|
||||
|
||||
@@ -85,11 +87,11 @@ mypy scripts/ --ignore-missing-imports
|
||||
### Збірка EPUB
|
||||
|
||||
```bash
|
||||
# Generate ebook (renders Mermaid diagrams via Kroki.io API)
|
||||
# Generate ebook (renders Mermaid diagrams with the local mmdc CLI — no network)
|
||||
uv run scripts/build_epub.py
|
||||
|
||||
# With options
|
||||
uv run scripts/build_epub.py --verbose --output custom-name.epub --max-concurrent 5
|
||||
uv run scripts/build_epub.py --verbose --output custom-name.epub --mmdc-path ./node_modules/.bin/mmdc
|
||||
```
|
||||
|
||||
## Структура каталогів
|
||||
@@ -106,7 +108,7 @@ uv run scripts/build_epub.py --verbose --output custom-name.epub --max-concurren
|
||||
├── 09-advanced-features/ # Планування, мислення, фони
|
||||
├── 10-cli/ # Довідник CLI
|
||||
├── scripts/
|
||||
│ ├── build_epub.py # Генератор EPUB (рендерить Mermaid через Kroki API)
|
||||
│ ├── build_epub.py # Генератор EPUB (рендерить Mermaid через локальний mmdc)
|
||||
│ ├── check_cross_references.py # Валідація внутрішніх посилань
|
||||
│ ├── check_links.py # Перевірка зовнішніх URL
|
||||
│ ├── check_mermaid.py # Валідація синтаксису Mermaid
|
||||
@@ -125,7 +127,7 @@ uv run scripts/build_epub.py --verbose --output custom-name.epub --max-concurren
|
||||
|
||||
### Mermaid-діаграми
|
||||
- Усі діаграми повинні успішно парситися (перевіряється pre-commit хуком)
|
||||
- Збірка EPUB рендерить діаграми через Kroki.io API (потрібен інтернет)
|
||||
- Збірка EPUB рендерить діаграми через локальний `mmdc` CLI (інтернет не потрібен, але потрібен `mmdc`)
|
||||
- Використовуйте Mermaid для блок-схем, діаграм послідовностей та архітектурних візуалізацій
|
||||
|
||||
### Перехресні посилання
|
||||
@@ -146,7 +148,7 @@ uv run scripts/build_epub.py --verbose --output custom-name.epub --max-concurren
|
||||
|
||||
3. **Pre-commit — привратник** — Усі перевірки якості повинні пройти перед прийняттям PR. CI-конвеєр запускає ці ж перевірки як другий прохід.
|
||||
|
||||
4. **Рендеринг Mermaid потребує мережі** — Збірка EPUB викликає Kroki.io API для рендерингу діаграм. Помилки збірки тут зазвичай пов'язані з мережею або невалідним синтаксисом Mermaid.
|
||||
4. **Рендеринг Mermaid потребує локального `mmdc`** — Збірка EPUB викликає локальний `mmdc` CLI для рендерингу діаграм (мережа не потрібна). Помилки збірки тут зазвичай пов'язані з відсутнім `mmdc` або невалідним синтаксисом Mermaid. Сама збірка EPUB не виконується у pre-commit — лише в CI.
|
||||
|
||||
5. **Це туторіал, а не бібліотека** — При додаванні контенту зосереджуйтесь на чітких поясненнях, готових прикладах та візуальних діаграмах. Цінність — у навчанні концепцій, а не у наданні повторно використовуваного коду.
|
||||
|
||||
|
||||
+3
-1
@@ -231,7 +231,9 @@ blog-draft/
|
||||
|
||||
**Використання**: Налаштовуються в settings, виконуються автоматично
|
||||
|
||||
**Типи хуків** (5 типів, 31 подія):
|
||||
**Типи хуків** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — як саме виконується хук.
|
||||
|
||||
**Події хуків** (31, у 4 категоріях) — коли він виконується:
|
||||
|
||||
- Хуки інструментів: PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, PermissionRequest, PermissionDenied
|
||||
- Хуки сесії: SessionStart, Setup, SessionEnd, Stop, StopFailure, SubagentStart, SubagentStop
|
||||
|
||||
+42
-42
@@ -102,17 +102,17 @@ graph TD
|
||||
|
||||
| Крок | Функція | Складність | Час | Рівень | Залежності | Чому вивчати | Ключові переваги |
|
||||
|------|---------|-----------|-----|--------|------------|-------------|-----------------|
|
||||
| **1** | [Слеш-команди](../01-slash-commands/) | ⭐ Початківець | 30 хв | Рівень 1 | Немає | Швидкий приріст продуктивності (55+ вбудованих + 5 навичок) | Миттєва автоматизація |
|
||||
| **2** | [Пам'ять](../02-memory/) | ⭐⭐ Початківець+ | 45 хв | Рівень 1 | Немає | Необхідна для всіх функцій | Постійний контекст |
|
||||
| **3** | [Контрольні точки](../08-checkpoints/) | ⭐⭐ Середній | 45 хв | Рівень 1 | Управління сесіями | Безпечне дослідження | Експериментування, відновлення |
|
||||
| **4** | [Основи CLI](../10-cli/) | ⭐⭐ Початківець+ | 30 хв | Рівень 1 | Немає | Базове використання CLI | Інтерактивний та print mode |
|
||||
| **5** | [Навички](../03-skills/) | ⭐⭐ Середній | 1 год | Рівень 2 | Слеш-команди | Автоматична експертиза | Повторювані можливості |
|
||||
| **6** | [Хуки](../06-hooks/) | ⭐⭐ Середній | 1 год | Рівень 2 | Інструменти, Команди | Автоматизація процесів (31 подія, 5 типів) | Валідація, контроль якості |
|
||||
| **7** | [MCP](../05-mcp/) | ⭐⭐⭐ Середній+ | 1 год | Рівень 2 | Конфігурація | Доступ до даних у реальному часі | Інтеграція, API |
|
||||
| **8** | [Субагенти](../04-subagents/) | ⭐⭐⭐ Середній+ | 1.5 год | Рівень 2 | Пам'ять, Команди | Складні завдання (6 вбудованих) | Делегування, спеціалізація |
|
||||
| **9** | [Розширені функції](../09-advanced-features/) | ⭐⭐⭐⭐⭐ Просунутий | 2-3 год | Рівень 3 | Усі попередні | Інструменти експерта | Планування, Auto Mode, канали |
|
||||
| **10** | [Плагіни](../07-plugins/) | ⭐⭐⭐⭐ Просунутий | 2 год | Рівень 3 | Усі попередні | Комплексні рішення | Онбординг команди, дистрибуція |
|
||||
| **11** | [Майстерність CLI](../10-cli/) | ⭐⭐⭐ Просунутий | 1 год | Рівень 3 | Рекомендовано: Усі | Майстерність командного рядка | Скрипти, CI/CD |
|
||||
| **1** | [Слеш-команди](01-slash-commands/) | ⭐ Початківець | 30 хв | Рівень 1 | Немає | Швидкий приріст продуктивності (55+ вбудованих + 5 навичок) | Миттєва автоматизація |
|
||||
| **2** | [Пам'ять](02-memory/) | ⭐⭐ Початківець+ | 45 хв | Рівень 1 | Немає | Необхідна для всіх функцій | Постійний контекст |
|
||||
| **3** | [Контрольні точки](08-checkpoints/) | ⭐⭐ Середній | 45 хв | Рівень 1 | Управління сесіями | Безпечне дослідження | Експериментування, відновлення |
|
||||
| **4** | [Основи CLI](10-cli/) | ⭐⭐ Початківець+ | 30 хв | Рівень 1 | Немає | Базове використання CLI | Інтерактивний та print mode |
|
||||
| **5** | [Навички](03-skills/) | ⭐⭐ Середній | 1 год | Рівень 2 | Слеш-команди | Автоматична експертиза | Повторювані можливості |
|
||||
| **6** | [Хуки](06-hooks/) | ⭐⭐ Середній | 1 год | Рівень 2 | Інструменти, Команди | Автоматизація процесів (31 подія, 5 типів) | Валідація, контроль якості |
|
||||
| **7** | [MCP](05-mcp/) | ⭐⭐⭐ Середній+ | 1 год | Рівень 2 | Конфігурація | Доступ до даних у реальному часі | Інтеграція, API |
|
||||
| **8** | [Субагенти](04-subagents/) | ⭐⭐⭐ Середній+ | 1.5 год | Рівень 2 | Пам'ять, Команди | Складні завдання (6 вбудованих) | Делегування, спеціалізація |
|
||||
| **9** | [Розширені функції](09-advanced-features/) | ⭐⭐⭐⭐⭐ Просунутий | 2-3 год | Рівень 3 | Усі попередні | Інструменти експерта | Планування, Auto Mode, канали |
|
||||
| **10** | [Плагіни](07-plugins/) | ⭐⭐⭐⭐ Просунутий | 2 год | Рівень 3 | Усі попередні | Комплексні рішення | Онбординг команди, дистрибуція |
|
||||
| **11** | [Майстерність CLI](10-cli/) | ⭐⭐⭐ Просунутий | 1 год | Рівень 3 | Рекомендовано: Усі | Майстерність командного рядка | Скрипти, CI/CD |
|
||||
|
||||
**Загальний час навчання**: ~11-13 годин (або перейдіть на свій рівень і заощадьте час)
|
||||
|
||||
@@ -163,8 +163,8 @@ cp 02-memory/project-CLAUDE.md ./CLAUDE.md
|
||||
|
||||
Коли освоїтесь, прочитайте:
|
||||
|
||||
- [01-slash-commands/README.md](../01-slash-commands/README.md)
|
||||
- [02-memory/README.md](../02-memory/README.md)
|
||||
- [01-slash-commands/README.md](01-slash-commands/README.md)
|
||||
- [02-memory/README.md](02-memory/README.md)
|
||||
|
||||
> **Перевірте розуміння**: Запустіть `/lesson-quiz slash-commands` або `/lesson-quiz memory` у Claude Code.
|
||||
|
||||
@@ -210,8 +210,8 @@ cat error.log | claude -p "explain this error"
|
||||
|
||||
#### Наступні кроки
|
||||
|
||||
- Прочитайте: [08-checkpoints/README.md](../08-checkpoints/README.md)
|
||||
- Прочитайте: [10-cli/README.md](../10-cli/README.md)
|
||||
- Прочитайте: [08-checkpoints/README.md](08-checkpoints/README.md)
|
||||
- Прочитайте: [10-cli/README.md](10-cli/README.md)
|
||||
- **Готові до Рівня 2!** Переходьте до [Етапу 2A](#етап-2a-автоматизація-навички--хуки)
|
||||
|
||||
> **Перевірте розуміння**: Запустіть `/lesson-quiz checkpoints` або `/lesson-quiz cli`.
|
||||
@@ -229,10 +229,10 @@ cat error.log | claude -p "explain this error"
|
||||
|
||||
Перед початком Рівня 2 переконайтеся, що ви освоїли концепції Рівня 1:
|
||||
|
||||
- [ ] Вмієте створювати та використовувати слеш-команди ([01-slash-commands/](../01-slash-commands/))
|
||||
- [ ] Налаштували пам'ять проекту через CLAUDE.md ([02-memory/](../02-memory/))
|
||||
- [ ] Знаєте, як створювати та відновлювати контрольні точки ([08-checkpoints/](../08-checkpoints/))
|
||||
- [ ] Вмієте використовувати `claude` та `claude -p` з командного рядка ([10-cli/](../10-cli/))
|
||||
- [ ] Вмієте створювати та використовувати слеш-команди ([01-slash-commands/](01-slash-commands/))
|
||||
- [ ] Налаштували пам'ять проекту через CLAUDE.md ([02-memory/](02-memory/))
|
||||
- [ ] Знаєте, як створювати та відновлювати контрольні точки ([08-checkpoints/](08-checkpoints/))
|
||||
- [ ] Вмієте використовувати `claude` та `claude -p` з командного рядка ([10-cli/](10-cli/))
|
||||
|
||||
> **Прогалини?** Перегляньте відповідні посібники перед продовженням.
|
||||
|
||||
@@ -293,8 +293,8 @@ chmod +x ~/.claude/hooks/pre-tool-check.sh
|
||||
|
||||
- Створіть власну кастомну навичку
|
||||
- Налаштуйте додаткові хуки для вашого процесу
|
||||
- Прочитайте: [03-skills/README.md](../03-skills/README.md)
|
||||
- Прочитайте: [06-hooks/README.md](../06-hooks/README.md)
|
||||
- Прочитайте: [03-skills/README.md](03-skills/README.md)
|
||||
- Прочитайте: [06-hooks/README.md](06-hooks/README.md)
|
||||
|
||||
> **Перевірте розуміння**: Запустіть `/lesson-quiz skills` або `/lesson-quiz hooks`.
|
||||
|
||||
@@ -348,8 +348,8 @@ cp 04-subagents/*.md .claude/agents/
|
||||
|
||||
- Налаштуйте додаткові MCP-сервери (база даних, Slack тощо)
|
||||
- Створіть кастомних субагентів для вашої предметної області
|
||||
- Прочитайте: [05-mcp/README.md](../05-mcp/README.md)
|
||||
- Прочитайте: [04-subagents/README.md](../04-subagents/README.md)
|
||||
- Прочитайте: [05-mcp/README.md](05-mcp/README.md)
|
||||
- Прочитайте: [04-subagents/README.md](04-subagents/README.md)
|
||||
- **Готові до Рівня 3!** Переходьте до [Етапу 3A](#етап-3a-розширені-функції)
|
||||
|
||||
> **Перевірте розуміння**: Запустіть `/lesson-quiz mcp` або `/lesson-quiz subagents`.
|
||||
@@ -367,10 +367,10 @@ cp 04-subagents/*.md .claude/agents/
|
||||
|
||||
Перед початком Рівня 3 переконайтеся, що ви освоїли концепції Рівня 2:
|
||||
|
||||
- [ ] Вмієте створювати та використовувати навички з автовикликом ([03-skills/](../03-skills/))
|
||||
- [ ] Налаштували хуки для автоматизації на основі подій ([06-hooks/](../06-hooks/))
|
||||
- [ ] Вмієте конфігурувати MCP-сервери для зовнішніх даних ([05-mcp/](../05-mcp/))
|
||||
- [ ] Знаєте, як використовувати субагентів для делегування ([04-subagents/](../04-subagents/))
|
||||
- [ ] Вмієте створювати та використовувати навички з автовикликом ([03-skills/](03-skills/))
|
||||
- [ ] Налаштували хуки для автоматизації на основі подій ([06-hooks/](06-hooks/))
|
||||
- [ ] Вмієте конфігурувати MCP-сервери для зовнішніх даних ([05-mcp/](05-mcp/))
|
||||
- [ ] Знаєте, як використовувати субагентів для делегування ([04-subagents/](04-subagents/))
|
||||
|
||||
> **Прогалини?** Перегляньте відповідні посібники перед продовженням.
|
||||
|
||||
@@ -451,7 +451,7 @@ export CLAUDE_AGENT_TEAMS=1
|
||||
|
||||
#### Наступні кроки
|
||||
|
||||
- Прочитайте: [09-advanced-features/README.md](../09-advanced-features/README.md)
|
||||
- Прочитайте: [09-advanced-features/README.md](09-advanced-features/README.md)
|
||||
|
||||
> **Перевірте розуміння**: Запустіть `/lesson-quiz advanced`.
|
||||
|
||||
@@ -526,8 +526,8 @@ done
|
||||
|
||||
#### Наступні кроки
|
||||
|
||||
- Прочитайте: [07-plugins/README.md](../07-plugins/README.md)
|
||||
- Прочитайте: [10-cli/README.md](../10-cli/README.md)
|
||||
- Прочитайте: [07-plugins/README.md](07-plugins/README.md)
|
||||
- Прочитайте: [10-cli/README.md](10-cli/README.md)
|
||||
- Створіть командні CLI-ярлики та плагіни
|
||||
- Налаштуйте скрипти пакетної обробки
|
||||
|
||||
@@ -563,7 +563,7 @@ done
|
||||
|
||||
1. Скопіюйте одну слеш-команду: `cp 01-slash-commands/optimize.md .claude/commands/`
|
||||
2. Спробуйте в Claude Code: `/optimize`
|
||||
3. Прочитайте: [01-slash-commands/README.md](../01-slash-commands/README.md)
|
||||
3. Прочитайте: [01-slash-commands/README.md](01-slash-commands/README.md)
|
||||
|
||||
**Результат**: Робоча слеш-команда та розуміння основ
|
||||
|
||||
@@ -669,26 +669,26 @@ done
|
||||
|
||||
### 🟢 Рівень 1: Початківець
|
||||
|
||||
- [ ] Завершено [01-slash-commands](../01-slash-commands/)
|
||||
- [ ] Завершено [02-memory](../02-memory/)
|
||||
- [ ] Завершено [01-slash-commands](01-slash-commands/)
|
||||
- [ ] Завершено [02-memory](02-memory/)
|
||||
- [ ] Створено першу кастомну слеш-команду
|
||||
- [ ] Налаштовано пам'ять проекту
|
||||
- [ ] **Етап 1A досягнуто**
|
||||
- [ ] Завершено [08-checkpoints](../08-checkpoints/)
|
||||
- [ ] Завершено основи [10-cli](../10-cli/)
|
||||
- [ ] Завершено [08-checkpoints](08-checkpoints/)
|
||||
- [ ] Завершено основи [10-cli](10-cli/)
|
||||
- [ ] Створено та відновлено контрольну точку
|
||||
- [ ] Використано інтерактивний та print mode
|
||||
- [ ] **Етап 1B досягнуто**
|
||||
|
||||
### 🔵 Рівень 2: Середній
|
||||
|
||||
- [ ] Завершено [03-skills](../03-skills/)
|
||||
- [ ] Завершено [06-hooks](../06-hooks/)
|
||||
- [ ] Завершено [03-skills](03-skills/)
|
||||
- [ ] Завершено [06-hooks](06-hooks/)
|
||||
- [ ] Встановлено першу навичку
|
||||
- [ ] Налаштовано хук PreToolUse
|
||||
- [ ] **Етап 2A досягнуто**
|
||||
- [ ] Завершено [05-mcp](../05-mcp/)
|
||||
- [ ] Завершено [04-subagents](../04-subagents/)
|
||||
- [ ] Завершено [05-mcp](05-mcp/)
|
||||
- [ ] Завершено [04-subagents](04-subagents/)
|
||||
- [ ] Підключено GitHub MCP
|
||||
- [ ] Створено кастомного субагента
|
||||
- [ ] Комбіновано інтеграції у процесі
|
||||
@@ -696,15 +696,15 @@ done
|
||||
|
||||
### 🔴 Рівень 3: Просунутий
|
||||
|
||||
- [ ] Завершено [09-advanced-features](../09-advanced-features/)
|
||||
- [ ] Завершено [09-advanced-features](09-advanced-features/)
|
||||
- [ ] Використано режим планування
|
||||
- [ ] Налаштовано режими дозволів (6 режимів включно з auto)
|
||||
- [ ] Використано auto mode з класифікатором безпеки
|
||||
- [ ] Увімкнено розширене мислення
|
||||
- [ ] Досліджено канали та голосовий ввід
|
||||
- [ ] **Етап 3A досягнуто**
|
||||
- [ ] Завершено [07-plugins](../07-plugins/)
|
||||
- [ ] Завершено розширене використання [10-cli](../10-cli/)
|
||||
- [ ] Завершено [07-plugins](07-plugins/)
|
||||
- [ ] Завершено розширене використання [10-cli](10-cli/)
|
||||
- [ ] Налаштовано print mode (`claude -p`) CI/CD
|
||||
- [ ] Створено JSON-вивід для автоматизації
|
||||
- [ ] Інтегровано Claude в CI/CD-пайплайн
|
||||
|
||||
+3
-1
@@ -438,7 +438,9 @@ chmod +x ~/.claude/hooks/*.sh
|
||||
|
||||
**Використання**: Хуки виконуються автоматично за подіями
|
||||
|
||||
**Типи хуків** (5 типів, 31 подія):
|
||||
**Типи хуків** (5): `command`, `http`, `prompt`, `mcp_tool`, `agent` — як саме виконується хук.
|
||||
|
||||
**Події хуків** (31, у 4 категоріях) — коли він виконується:
|
||||
- **Хуки інструментів**: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PostToolBatch`, `PermissionRequest`, `PermissionDenied`
|
||||
- **Хуки сесій**: `SessionStart`, `Setup`, `SessionEnd`, `Stop`, `StopFailure`, `SubagentStart`, `SubagentStop`
|
||||
- **Хуки завдань**: `UserPromptSubmit`, `UserPromptExpansion`, `MessageDisplay`, `TaskCompleted`, `TaskCreated`, `TeammateIdle`
|
||||
|
||||
+16
-13
@@ -10,8 +10,8 @@
|
||||
## Функції
|
||||
|
||||
- Організує розділи за структурою каталогів (01-slash-commands, 02-memory тощо)
|
||||
- Рендерить Mermaid-діаграми як PNG-зображення через Kroki.io API
|
||||
- Асинхронне паралельне завантаження — рендерить усі діаграми одночасно
|
||||
- Рендерить Mermaid-діаграми як PNG-зображення через локальний `mmdc` CLI (без мережі)
|
||||
- Кешує однакові діаграми — кожна унікальна діаграма рендериться лише раз
|
||||
- Генерує обкладинку з логотипу проєкту
|
||||
- Конвертує внутрішні markdown-посилання у посилання на розділи EPUB
|
||||
- Суворий режим помилок — падає, якщо діаграма не може бути відрендерена
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
- Python 3.10+
|
||||
- [uv](https://github.com/astral-sh/uv)
|
||||
- Інтернет-з'єднання для рендерингу Mermaid-діаграм
|
||||
- [`mmdc`](https://github.com/mermaid-js/mermaid-cli) у `PATH` для рендерингу Mermaid-діаграм (`npm install -g @mermaid-js/mermaid-cli`)
|
||||
|
||||
## Швидкий старт
|
||||
|
||||
@@ -50,15 +50,17 @@ python scripts/build_epub.py
|
||||
|
||||
```
|
||||
usage: build_epub.py [-h] [--root ROOT] [--output OUTPUT] [--verbose]
|
||||
[--timeout TIMEOUT] [--max-concurrent MAX_CONCURRENT]
|
||||
[--mmdc-path MMDC_PATH] [--lang {en,vi,zh,ja}]
|
||||
[--puppeteer-config PUPPETEER_CONFIG]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--root, -r ROOT Root directory (default: repo root)
|
||||
--output, -o OUTPUT Output path (default: claude-howto-guide.epub)
|
||||
--verbose, -v Enable verbose logging
|
||||
--timeout TIMEOUT API timeout in seconds (default: 30)
|
||||
--max-concurrent N Max concurrent requests (default: 10)
|
||||
--mmdc-path PATH Path to mmdc binary (default: mmdc from PATH)
|
||||
--lang {en,vi,zh,ja} Language to build (default: en)
|
||||
--puppeteer-config P Puppeteer config JSON passed to mmdc via -p
|
||||
```
|
||||
|
||||
## Приклади
|
||||
@@ -70,8 +72,11 @@ uv run scripts/build_epub.py --verbose
|
||||
# Custom output location
|
||||
uv run scripts/build_epub.py --output ~/Desktop/claude-guide.epub
|
||||
|
||||
# Limit concurrent requests (if rate-limited)
|
||||
uv run scripts/build_epub.py --max-concurrent 5
|
||||
# Build a translated edition
|
||||
uv run scripts/build_epub.py --lang vi
|
||||
|
||||
# Point at an mmdc that is not on PATH
|
||||
uv run scripts/build_epub.py --mmdc-path ./node_modules/.bin/mmdc
|
||||
```
|
||||
|
||||
## Вивід
|
||||
@@ -94,7 +99,7 @@ pytest scripts/tests/ -v
|
||||
# Or with uv directly
|
||||
uv run --with pytest --with pytest-asyncio \
|
||||
--with ebooklib --with markdown --with beautifulsoup4 \
|
||||
--with httpx --with pillow --with tenacity \
|
||||
--with pillow \
|
||||
pytest scripts/tests/ -v
|
||||
```
|
||||
|
||||
@@ -107,14 +112,12 @@ uv run --with pytest --with pytest-asyncio \
|
||||
| `ebooklib` | Генерація EPUB |
|
||||
| `markdown` | Конвертація Markdown → HTML |
|
||||
| `beautifulsoup4` | Парсинг HTML |
|
||||
| `httpx` | Асинхронний HTTP-клієнт |
|
||||
| `pillow` | Генерація обкладинки |
|
||||
| `tenacity` | Логіка повторних спроб |
|
||||
|
||||
## Усунення проблем
|
||||
|
||||
**Збірка падає з мережевою помилкою**: Перевірте інтернет-з'єднання та стан Kroki.io. Спробуйте `--timeout 60`.
|
||||
**Збірка падає з `mmdc not found`**: Встановіть Mermaid CLI (`npm install -g @mermaid-js/mermaid-cli`) або вкажіть шлях через `--mmdc-path`. На arm64 вбудований Chromium не працює — збирайте EPUB у CI (джоб `build-epub` у `.github/workflows/test.yml`).
|
||||
|
||||
**Обмеження частоти**: Зменште паралельні запити з `--max-concurrent 3`.
|
||||
**`mmdc` падає в CI або контейнері**: Chromium потребує профілю без пісочниці. Запишіть `{"args":["--no-sandbox","--disable-setuid-sandbox"]}` у файл і передайте його через `--puppeteer-config`.
|
||||
|
||||
**Відсутній логотип**: Скрипт генерує текстову обкладинку, якщо `claude-howto-logo.png` не знайдено.
|
||||
|
||||
Reference in New Issue
Block a user