- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- AI
AI Ready: Claude Code in Practice Lab
In this lab, you will set up Claude Code to work with an existing service; have it review that service and generate a CLAUDE.md file based on that review, and your desired workflow parameters; then use it to resolve a bug, ensuring it follows the defined workflow steps outlined in the CLAUDE.md file.
Lab Info
Table of Contents
-
Challenge
Introduction
In this lab, you will get some hands-on practice with Claude Code, using it to learn and explore a pre-created service, resolve a bug in that service, and then implement a new feature. You will achieve this through chatting with Claude Code, creating and updating a
CLAUDE.mdfile with the help of Claude, and leveraging Claude's plan mode functionality, all while actively reviewing changes as Claude makes them. -
Challenge
Using Claude to understand a codebase
Claude Code can be used to review and explain entire code bases. The
gradebookservice works as a small example of this. If asked, Claude will use its file-reader tool to explore any files mentioned in the prompt, as well as any related files it might need to complete the task provided in the prompt by the user.Once Claude has reviewed the code base based on your prompt, the contents of the prompt and Claude's explanation go into the context for that active session, so any future prompts can rely on that data.
Be careful, though! Should you exit the Claude Code session and restart, that session's context is lost. Project memory does not persist between sessions.
-
Challenge
The CLAUDE.md file
While session context is, by its nature, refreshed with every session, you can provide Claude with a
CLAUDE.mdfile that it can reference that supplies context to your codebase. Claude reads this file every time you start a session in the directory in which theCLAUDE.mdfile is located.The
CLAUDE.mdfile can contain information about the project's function, dependencies, features, and data about how to run and test the project. It can also contain workflow information about how you want Claude to act while working on your codebase; for example, how to create and name git branches, which tests to run before committing code, and other actions to ensure Claude is running safely and produces the expected output.Since you had Claude analyze the repository in the last step, that context can be used to have Claude create its own
CLAUDE.mdfile. -
Challenge
Resolving bugs with Claude
Claude can be an excellent tool for quickly resolving bugs and errors in code. The
gradebookservice has been provisioned with an existing error in which to practice this function of Claude. -
Challenge
Using Claude's plan mode
While using Claude, you may often find it is overly-eager to make changes to your code base. To resolve this, you can use Claude Code in
plan modeto plan out features and fixes before Claude makes any changes.Plan mode is a read-only permission mode; this means Claude can read files, explore your codebase and the internet, and write a plan without editing any of the source code. While using plan mode, Claude will output a plan for Claude to follow when it's time to implement the planned feature. This gives you time to ask questions and otherwise alter the plan. The proposed plan will include step-by-step instructions, called phases, for Claude to follow when it's time to implement, and you can prompt Claude to complete tasks based on these phases.
-
Challenge
Implementing features with Claude
While it is entirely possible to tell Claude to simply "create the pass/fail feature," for best results you should develop and leverage a plan for feature implementation. This ensures your feature is created as-desired and within your needed parameters. This also lessens potential issues and can lower token spend.
Use the
PLAN.mdfile created in the previous step to implement the new PASS/FAIL feature.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.