Useful Claude Code Tips and Tricks

December 30, 2025

I'm still learning a lot about agentic coding and Claude Code specifically. Here's a list of some helpful tips and tricks to hopefully make your learning curve a little easier.

Plan Mode

'Shift + Tab' to go into planning mode (planning mode on) where you can work with Claude to create a plan before beginning the implementation. Saves a lot of tokens and $$$. 

Thinking

Use the 'thinking' keyword to tell Claude to think harder about the problem and solution. Planning and Thinking can be used together. 

Claude.md 

Create a 'claude.md' file in your project root to detail the tech stack used for the project, important facts to take into consideration when working on solutions, coding preferences and any additional details you want Claude to know about. You can create this manually or by using the '/init' command in Claude code and then editing the file afterwards. This is most useful once you have your base project setup with a package.json and/or composer.json file for Claude to read.

Add context with '#' 

Preface a prompt in Claude code with the '#' to provide additional details and clarity to the Claude's context. When you hit enter it will ask where you want the details stored. Select your Claude.md file (or your local prefs if desired).  

Esc key 

Use the 'esc' key to stop Claude for going down a rabbit hole or spending too much time on a problem. If you notice Claude getting hung up on a common pitfall use the 'Esc' key and the '#' key (above) to add an additional memory for Claude to prevent it from repeating a problem. 

Screenshots

Take a screen shot on your Mac or PC and then click 'ctrl+v' in Claude Code to paste a link to the local image. Make sure you have your screen shot settings set to store the image in your clipboard. If they are being saved to your computer you can right click and copy the file and then 'ctrl+v' in Claude Code to paste a link to the image.

/compact 

Use the '/compact' command when Claude has learned a lot about the current task and you want to maintain that knowledge as it moves to the next related task. This will reduce the context overhead and token usage while retaining important memory for the tasks at hand. 

/clear 

Use the '/clear' command to clear out conversation/session context when switching to an entirely new task. 

Custom commands 

Commands are kitchen implements like knives, mashes and peelers, very specific and task oriented. 

Inside your project directory open the '.claude' directory and create a new directory called 'commands'. Inside the 'commands' directory create a new markdown file for each custom command. The naming convention is {command-name}.md. To further augment the command you can add an option '$ARGUMENTS' variable, anything after the command prompt will be sent to the command in the $ARGUMENTS var. After creating and saving the command file you will need to restart your Claude code session and your new command can be accessed like any internal Claude command using the '/' and then your new command name. Claude will follow the instructions in the command file within the current coding context.

Skills

Skills are recipes, the ingredients and steps needed to produce an outcome. Think of skills as extensions for tasks that Claude doesn’t have knowledge about. Tasks that follow well defined steps like an Standard Operating Procedure - SOP. When you need something specific done but you don’t know when you will need it. Skills extend Claude’s knowledge it doesn’t replace existing knowledge. 

Inside your project directory open the '.claude' directory and create a new directory called 'skills'. Inside the 'skills' directory create a new directory for each new skill (eg 'code-linter'). Inside the skill directory create a markdown file called 'SKILL.md' and add a name, description and the details/steps to follow. Here's a useful link, https://code.claude.com/docs/en/skills.

Sub Agents

Sub agents are helpers, assistants, like a sous chef or a pastry chef, proficient at a very specific skill set and type of tasks. 

Use the '/agent' command to create a new sub agent. Claude will guide you through naming your agent and defining its role and responsibilities. Sub agents are stored in the '.claude/agents' directory and can be invoked during your coding session when you need specialized help. For example, you might create a 'code-reviewer' agent focused on catching bugs and suggesting improvements, or a 'documentation-writer' agent to handle markdown files and comments. Once created, reference your sub agent by name in your prompts (e.g., "@code-reviewer check this function") and Claude will engage that specialized assistant to handle the task within its defined expertise. Claude will also automatically invoke and use sub agents if you define and describe them well.