10 Tips to Get the Most Out of Claude Code and Any LLM

NC
Nacho Conesa
calendar_today February 28, 2026 schedule 7 min read Tutorial
Artificial intelligence neural network with interconnected nodes on dark background

The 10 most effective tips for using Claude Code and LLMs in programming. From persistent context with CLAUDE.md to agent mode for complete flows.

Using Claude Code — or any LLM for programming — is easy. Using it well requires understanding how these models think and what practices maximize their effectiveness. After working intensively with them, here are the tips with the most impact.

1. Give Context, Not Just Instructions

The most common mistake is telling the model what to do without telling it why. The difference between "refactor this function" and "refactor this function to improve testability, because we're adding unit tests this week" is enormous. Business context guides technical decisions.

2. Use CLAUDE.md Files for Persistent Context

Claude Code automatically reads a CLAUDE.md file in the project root. Use it to explain the architecture, project conventions, important design decisions, and what it should not touch. This file is your permanent "briefing" to the model.

# CLAUDE.md
## Architecture
- Backend: FastAPI + PostgreSQL
- Frontend: React 18 with TypeScript
- Authentication: JWT with refresh tokens

## Conventions
- Tests: pytest, minimum 80% coverage
- Commits: conventional commits format
- Do not modify files in /legacy/ without notice

3. Ask for Reasoning Before Code

Before asking it to write code, ask it to explain its plan. "What would your approach be for implementing this? Explain the steps before writing anything." This lets you correct the course before it generates 200 lines in the wrong direction.

4. Work in Small Chunks

LLMs maintain coherence better with bounded tasks. Instead of "build the complete authentication system", divide into: "implement the user model", then "add the registration endpoint", then "add the login one". Each step is independently verifiable.

5. Show It Examples of What You Want

Models learn by analogy. If you have a well-written module in your project, say: "I want the new module to follow the same pattern as this one." Existing code is the best prompt you have.

6. Be Explicit About Constraints

Don't assume the model knows your restrictions. Say explicitly: "Don't use external libraries for this", "Maintain compatibility with Python 3.9", "Don't break the public interface of this class." Models optimize for what you tell them, not what you take for granted.

7. Always Review Generated Code

LLMs make subtle mistakes: incorrect logic in edge cases, imports that don't exist, inconsistencies with the rest of the code. The model is your collaborator, not your replacement. Code review remains your responsibility.

8. Use Investigation Capability for Debugging

Claude Code can read logs, run code with specific inputs, and trace a bug's origin through multiple files. For complex bugs, instead of trying to explain the problem, give it access to the code and say: "This test fails. Investigate the repository, find the cause, and propose a fix."

9. Iterate the Prompt, Not Just the Code

If the result isn't what you expected, before accepting it and modifying it manually, think about whether the problem is in your prompt. Often, reformulating the instruction produces a much better result. "Make it more readable" is vague. "Extract constants to variables with descriptive names and add a comment for each logical block" is actionable.

10. Leverage Agentic Mode for Complete Flows

Claude Code can execute complete flows without intervention: read code → identify problem → write fix → run tests → commit. For this to work, you need to define the initial goal well and trust the process. Don't constantly interrupt; let the agent complete the cycle.

More articles