Назад к подкастамClaude
Claude Code 101
Рабочий процесс Исследование→План→Код→Коммит в Claude Code
If you take one thing away from Claude code, let it be this workflow: explore, plan, code, and commit.
Если вы возьмете только одно из Claude Code, пусть это будет данный workflow: исследовать, plan, писать код и commit.
Without this, most people jump straight to pasting in Claude to write code, which means more course correcting later on.
Без этого большинство людей сразу переходят к вставке в Claude для написания кода, что означает больше исправлений в дальнейшем.
The fastest way to handle step one and two is with plan mode.
Самый быстрый способ выполнить шаги один и два — использовать plan mode.
With plan mode, Claude can't edit files.
В plan mode Claude не может редактировать файлы.
It just reads files to gather research on how to tackle this implementation.
Он только читает файлы, чтобы исследовать, как подойти к этой реализации.
To enter plan mode, hit shift and tab until you see the plan mode under the text input.
Чтобы войти в plan mode, нажимайте shift и tab, пока не увидите plan mode под полем ввода текста.
I need to add WebP conversion to our image upload pipeline.
Мне нужно добавить конвертацию WebP в наш pipeline загрузки изображений.
Figure out where in the pipeline it should happen, whether we need new dependencies, and how to approach it.
Выясните, в какой части pipeline это должно происходить, нужны ли новые зависимости и как к этому подойти.
And Claude will read relevant files, do some web searches, and give you a plan of action.
Claude прочитает соответствующие файлы, выполнит веб-поиск и даст вам план действий.
Make sure you review it and determine if it meets your criteria.
Обязательно проверьте его и определите, соответствует ли он вашим критериям.
Otherwise, I can ask it to add on or revise some areas.
В противном случае я могу попросить его добавить или пересмотреть некоторые области.
Perfect.
Отлично.
And this right here is the best place to course correct because it's before any code is written.
И здесь лучшее место для корректировки курса, потому что это до написания какого-либо кода.
You can also use explore without being in plan mode by just asking Claude to explore your code base.
Вы также можете исследовать без входа в plan mode, просто попросив Claude исследовать вашу кодовую базу.
Now, once the plan looks good, you can select approve to accept the plan and let Claude toggle all of the list items it provided.
Теперь, когда план выглядит хорошо, вы можете выбрать «одобрить», чтобы принять план и позволить Claude выполнить все пункты списка.
You can determine if you want Claude to auto accept the file edits or ask every single time.
Вы можете решить, хотите ли вы, чтобы Claude автоматически принимал изменения файлов или спрашивал каждый раз.
Claude will do its best to troubleshoot your code base before considering the plan finished.
Claude сделает все возможное для устранения неполадок в вашей кодовой базе, прежде чем считать план завершенным.
But at times, you'll need to course correct.
Но иногда вам нужно скорректировать курс.
This is the benefit of working with plan mode because after the plan is finished, we also have the context of how it got to the results to help it guide its next decision.
Это преимущество работы с plan mode, потому что после завершения плана у нас также есть контекст того, как он пришел к результатам, чтобы помочь направить его следующее решение.
In order for Claude to be confident in its results, it has to be clear on what it deems correct.
Чтобы Claude был уверен в своих результатах, ему нужно четко понимать, что он считает правильным.
When writing your plan, make this explicit.
При написании вашего плана сделайте это явным.
Adding tools that will help Claude complete its goals will remove a lot of back and forth.
Добавление инструментов, которые помогут Claude достичь своих целей, устранит много пустых переговоров.
For example, if you're building web UIs, make sure you have the Claude and Chrome extension so that Claude code can control a tab and test out the UI before deeming it finished.
Например, если вы создаете Web UI, убедитесь, что у вас есть расширение Claude и Chrome, чтобы Claude Code мог управлять вкладкой и тестировать UI перед тем, как счесть его готовым.
In your project, include a test suite that Claude can continuously validate on.
В вашем проекте включите набор тестов, который Claude может постоянно проверять.
Claude can even write tests for you.
Claude даже может написать тесты за вас.
Before passing this off to Claude, make sure that the tests are a source of truth for you and your team to avoid any false positives.
Прежде чем передать это Claude, убедитесь, что тесты являются источником истины для вас и вашей команды, чтобы избежать ложных срабатываний.
Quick tip, if you find Claude keeps running into the same issues, ask Claude to save the solution to his Claude MD file.
Быстрый совет: если вы обнаружите, что Claude постоянно сталкивается с одними и теми же проблемами, попросите Claude сохранить решение в его файл Claude MD.
Now, once you have tested for yourself and are happy with the results, it's time to push your code.
Теперь, когда вы протестировали сами и довольны результатами, пора отправить ваш код.
A tip before you commit, run a sub agent code reviewer to look at your code.
Совет перед commit: запустите sub agent для проверки кода.
Then you get Claude to generate a commit message for you in your style.
Затем попросите Claude сгенерировать сообщение для commit в вашем стиле.
Rinse and repeat.
Повторяйте.
If you want to be effective with Claude code, follow the explore, plan, code, and commit workflow.
Если вы хотите быть эффективным с Claude Code, следуйте workflow: исследовать, plan, писать код и commit.
Exploration will give the relevant context
Исследование даст соответствующий контекст
Claude needs for your project.
который нужен Claude для вашего проекта.
Plan will create a plan of action that Claude will use to determine if they are successful.
Plan создаст план действий, который Claude будет использовать для определения успеха.
Code is the back and forth that you and Claude do before settling on the final outcomes of the plan.
Code — это обмен, который вы и Claude ведете перед тем, как определиться с окончательными результатами плана.
Commit helps you review and push your code so you can start on your next feature.
Commit помогает вам проверить и отправить код, чтобы вы могли приступить к следующей функции.