Making Claude Behave

15th August, 2025

After hearing great things about the Claude code agent, I made the switch from Cursor, but becoming efficient was a bit of a struggle. So here are some notes to help other beginners get started with Claude code.

For context ;) I am using Claude as a full stack engineer working on many existing codebases.

Basics

  • Create CLAUDE.md memory files, they are essential
  • The GitHub CLI tool is essential for efficient Claude usage
  • Use planning mode shift + tab at the start of a session to create a detailed plan with clear requirements
  • Provide specific context: reference specific files with @, paste server logs, drop screenshots, and link to Github issues

Claude Memory Training

Similar to Cursor rules, Claude’s memory is made of markdown files that hold its instructions and knowledge. These memory files are persistent context included in every sessions context. For improved results create a memory file for every directory you work from!

You can have memory files at the global, project, and even subproject level. The files are not created by default, but you can create them with the /memory and /init commands:

More context improves results, but keep memory files focused. Don’t bloat them with hundreds of hard to manage rules. Keep rules in their relevant file:

Claude memory

User memory

  • ~/.claude/CLAUDE.md

This is the user memory file where Claude’s global personality and behaviour rules can be set. For example, your preferred branch naming convention. Use this to make Claude always behave in certain ways:

- Git branches should be prefixed with jules- and use camel case
- Git commit messages should be a brief single line message
- Avoid phrases like "You're absolutely right"

Here’s an example Claude file attempting to make Claude more analytical I found in a HackerNews comment that is working well.

Project Memory

  • ~/your-project/CLAUDE.md

In each project directory this file holds project context. Include information such as project architecture, commands for running tests, links to style guides.

Claude’s /init command does a pretty good job of creating this project file for you. Or you can provide more specific instructions:

Analyse this codebase, summarise the project’s purpose, architecture, and key components, and relation to other repos, then create a claude project file

I had to review these files and remove some unnecessary sections, but Claude makes this easy: ‘Remove that migration section and any specific library version’

Subdirectory Memory

  • ~/.../your-project/sub-directory/CLAUDE.md

You can go further and provide additional context for subdirectories. This is useful for documenting features that require more context.

Do this where possible to avoid bloating the project level Claude file. Again you can ask Claude to help you create these files: 

For the the following directories within this project, summarise the contents and purpose, then writing a claude file 

Claude init

Other Memory Stuff

Claude rule

  • The # shortcut lets you quickly add a new rule to your current or main memory file
  • You can use a ~/your-project/CLAUDE.local.md file for personal memory that builds on the team’s shared memory

Models

As tempting as it is, you don’t need the most expensive Opus model for great results. According to Anthropic it’s overkill for most tasks. And expensive! This is just 7 work days of usage:

Claude costs

Use /model opus-plan for a balance between models. It’ll use Opus for initial discussion then will switch to Sonnet once you exit planning mode.

Another tip is to set the Sonnet model as default, then create a sub agent for specific purposes that uses the more expensive Opus model.

Still it is way more expensive that using the same agents in Cursor… It doesn’t take long to hit the limit of my personal subscription.

Agents

Agents are specialised Claude instances for a specific task with a fresh context. Define an agent once and Claude will automatically delegate relevant tasks to it, assuming your agents are defined clearly.

Claude agents

Claude will help you create agents with the /agent command, or you can copy one of the many examples online such as code reviewer.

Copying them is as simple pasting the markdown file into /Users/jules/.claude/agents.

Code reviewer is an easy starting agent, but I would suggest creating agents as you find yourself repeating prompts, rather than copying specialised agents. I was very excited to get my first custom raise-pr agent working.

A workflow that is working well for me is to spend as much time as possible in plan mode, and to refactor as much repeated prompting as possible to specialised agents:

triage agent > implement > code-review agent, commit changes, raise pr agent

Permissions

Claude asks for permissions the first time it does specific actions such as reading a GitHub issue or running a bash command. It repeats this for each new directory, but you can simply ask Claude to copy an existing file to prevent this.

Add the settings.local.json file to .gitignore to avoid this annoying diff. I guess you could use a similar file to set repository level rules for all contributors but haven’t tried this.

Claude permissions settings

Multiple accounts

Finally, it’s easy to separate your personal and work accounts using an alias. Maybe this could be used to give Claude different personalities.

alias claude-personal="CLAUDE_CONFIG_DIR=~/.claude-personal claude"

Here are some cool links for more advanced Claude usage: