What I Learned from Free Claude Code Essentials Course by John Lindquist
I recently came across a free Claude Code course by John Lindquist from Egghead.io
Like all other course on egghead, this course is also pretty small but packed with lot of useful information which you might find interesting if you plan on using Claude Code regularly.
And this is more of like a intro course so it is helpful if you’re getting started with it.
π Claude Code Essentials | egghead.io
What is covered in it + my notes?
1. Combine Claude Code and Your Favorite IDE
Primarily it’s about setting up the Claude Code Extention in VS Code (+ forks like Cursor)
And he covers things like how to configure shortcuts, how extention sets context based on the file that we’re working on, etc
2. The Essential Claude Code Shortcuts
In this video, he has covered the essential shortcuts that you should be know.
Feature | Shortcut / Command | Description |
---|---|---|
Resume instantly | claude --continue | Reloads the previous session and context after a crash, restart, or closed editor. |
Rewind conversation | Double-tap Escape in an empty input | Browse history and restore to an earlier point. "Rewinding resets the chat, not your files, you can reset it using git or explicit undo prompts for code changes." |
Explicit undo/redo | Please undo the previous change to <file>. | Ask Claude to revert the last change, then use shell history to re-run or tweak the prior prompt. |
Edit like Bash | Ctrl+A / Ctrl+E β start/end of lineOption+F / Option+B β word forward/backCtrl+W β delete previous wordDouble-tap Escape β clear inputCtrl+C twice β hard exit | Provides Bash-like editing shortcuts. |
Bash mode | Type ! in the beginning to switch to bash mode | This helps to run bash scripts and pass that as context |
3. Targeting the Proper Context with Claude Code
- You can use
@
in the text box to select a file or directory throught the project. And you can select a single or multiple items files. - You can use the arrow keys to select the files you want as well. Hitting
enter
will complete the full path and adds a space. - It supports fuzzy searching like for example you can do something like
@tsx
which will select all the tsx files and you can even type name of the file like@tsxauth
which can search forauth
with tsx file extention or even a part of a path like@lib
π€― - You can even use your IDEs file selector to select file as well by using
Claude Code: Insert At-Mentioned
option (refer that video on how to do it) - You can use repomix CLI to combine multiple files into a single chunk and then pass it in the context
4. Automate Tasks in Claude Code with Slash Commands
You can custom slash command feature to automate your day to day workflow.
Create .claude/commands/repomix.md
(file name will be taken as command name)
---
allowed-tools: Bash(repomix:*)
argument-hint: [glob pattern] [user prompt]
---
!`repomix --include "$1" --stdout --output-show-line-numbers`
argument-hint
gets mapped to $X
which you can use it in your command like in the above example ($1
)
Then you can invoke it like this
/repomix src "Summarize the codebase in TLDR format"
Note this commands executes and then passed the output to the LLM.
This pattern abstraction the actual implementation which we don’t need to remember π And it is easy to share it with others.
5. The Cost of Context in Claude Code
Running /context
gives you a rough idea on how much context is consumed before even it starts processing your actual request.
What if you need more context? Just use bigger context model like sonnet 4 1M but be aware you’ll ended up paying more (or max out the rate limit) for it though.
6. Protect Secrets from Being Read by Claude Code
You can use /permission
command and then block any sensitive files like .env
Use arrow keys to move to Deny tab
And then add the rule, in this case we’re blocking read access for .env
file in current directory
Depending on your requirement, you can store it local/project/user setting level.
For example, you can also block read access to ~/.ssh
or other files so that any rouge will not have access to it.
Make sure to add .claude/settings.local.json
in .gitignore
7. Organizing Personal and Project Settings in Claude Code
You can use /add-dir
to add additional docs and can add it only for that particular session and whenever we’re on that directory.
That config gets added to .claude/settings.local.json
.
If you want to share the settings with everyone then add it in .claude/settings.json
and share it.
Note: Property defined in local level does not override the project level settings. It’s more like both the settings will be applied.
8. Customize Global User Settings and the Status Line in Claude Code
Status line in claude code helps you to run any command and display it in the status bar. So you can literally do anything with it like showing the cost of current usage, etc.
For example, you can have something like this in your ~/.claude/settings.json
:
{
"statusLine": {
"type": "command",
"command": "npx -y @owloops/claude-powerline"
}
}
And it’ll show a beautiful status bar like this
9. CLAUDE.md Initialization and Best Practices in Claude Code
CLAUDE.md
acts as a primary source of truth that Claude Code uses when running a query. You can use it to note down important things related to the project like best practices, rules, etc.
You can generate a new CLAUDE.md
file by running /init
One interesting thing is that this file can refer other files
@~/.claude/common-coding-guide.md
If you have such file make sure to give permission for it
{
"permissions": {
"allow": ["Read((/Users/you/.claude/**))"]
}
}
Credits
Happy learning-about claude!