DEV Community

Zara Sethi
Zara Sethi

Posted on

How I Get Better Results from Claude Code

AI coding tools can dramatically speed up development, but only when you give them enough context and structure.

While working on web and mobile development at NRI Dating, I’ve increasingly used Claude Code as part of my development workflow. The biggest improvement didn’t come from learning clever prompts. It came from creating a better process around the tool.

Here are the practices that have made the biggest difference for me.

Give It the Bigger Picture

One of the easiest mistakes is asking an AI coding assistant to change something without explaining how that feature fits into the rest of the application.

Instead of saying:

Add a block button to the profile page.

Explain the actual behaviour:

Add a block option to the profile page. Once blocked, neither user should be able to access the other's profile. Existing conversations should remain visible but become read-only, and the profile link inside the conversation should no longer be accessible.

That extra context can prevent several rounds of fixes later.

The AI is no longer just being told what interface to create. It understands what the feature is supposed to mean across the product.

Keep Project Instructions in the Repository

For larger projects, repeating your technology choices and conventions in every conversation becomes tedious.

Keep a project instruction file containing things such as:

  • Framework and technology choices
  • Directory conventions
  • UI conventions
  • Database rules
  • Naming conventions
  • Things the AI must not change
  • Deployment considerations

If your project uses Bootstrap and does not use Tailwind, say that once in the project instructions.

If there are existing patterns for controllers, services, API responses or database naming, document them.

The better the project context, the less time you spend correcting unnecessary changes.

Ask It to Inspect Before Changing

This has probably saved me more frustration than anything else.

Before implementing a substantial feature, ask Claude Code to inspect the existing implementation first.

For example:

Inspect the existing authentication implementation, routes, middleware and database structure. Do not modify anything yet. Explain how it currently works and identify what needs to change.

Once you agree with its understanding, move on to implementation.

AI coding assistants can write code incredibly quickly.

Unfortunately, that also means they can write the wrong code incredibly quickly.

Understanding first and editing second is usually much safer.

Describe the Result, Not Just the Code

You do not necessarily need to know exactly how something should be implemented.

Describe what you expect the user to experience.

For example:

A visitor can see the first page of search results. If they try to access additional results without having purchased coins, show the purchase prompt. Users who have previously purchased any coin package should continue normally.

That is often more useful than trying to dictate controllers, methods and database queries yourself.

Let the coding assistant investigate the architecture and determine how the behaviour fits into it.

Break Large Features Into Stages

Giving an AI a massive specification and saying “implement everything” can work.

It can also create a spectacular mess.

For substantial features, I prefer something closer to:

  1. Inspect the existing system
  2. Propose the implementation
  3. Create the database changes
  4. Implement backend behaviour
  5. Implement the UI
  6. Add validation and security checks
  7. Test the complete flow

Each stage gives you an opportunity to catch a misunderstanding before it spreads through the project.

Tell It What Not to Do

Constraints are surprisingly useful.

If you do not want new dependencies:

Do not install additional packages unless absolutely necessary.

If database compatibility matters:

Do not rename or remove existing columns.

If you are fixing a production issue:

Make the smallest change necessary to fix this problem. Do not refactor unrelated code.

These instructions reduce the tendency for a small task to turn into an unnecessary rewrite.

Screenshots Are Extremely Useful

For frontend work, describing a visual problem can sometimes take longer than showing it.

A screenshot plus:

The spacing between these cards is inconsistent. Keep the existing design but align the cards and make their vertical spacing consistent.

can communicate the requirement much more clearly.

The same applies when recreating a design.

Give the assistant the visual reference and then explain which elements actually matter.

Make It Test Its Own Work

Do not stop at:

Implement this feature.

Finish with something like:

After implementation, test the complete flow. Check validation, authorization, error states and existing functionality that could have been affected.

For bugs, ask it to reproduce the problem first whenever practical.

That encourages the assistant to verify that it fixed the actual issue rather than simply producing code that looks plausible.

Keep Changes Reversible

AI-assisted development makes changes extremely fast.

That makes reversibility even more important.

Before significant changes, make sure you have a reliable way to return to the previous state.

That might mean:

  • Git commits
  • Branches
  • File backups
  • Database backups
  • Server snapshots

The best AI coding session is one where you can confidently experiment because nothing is irreversible.

Do Not Accept Everything It Suggests

Claude Code can often find solutions you would not immediately think of.

It can also confidently suggest unnecessary complexity.

When it proposes:

  • Another dependency
  • A new architectural layer
  • A database redesign
  • A large refactor
  • Replacing something that already works

ask why.

Sometimes the answer is excellent.

Sometimes you discover that the simpler existing implementation was perfectly adequate.

Give It Clear Ownership of the Task

One thing that improves results is being explicit about what the assistant is responsible for.

Instead of:

Can you help me fix this?

Try:

Investigate the issue, identify the root cause, implement the smallest safe fix, test it and report exactly what changed.

That creates a clearer workflow.

It also helps prevent situations where the assistant only explains the problem without actually finishing the task.

What I’ve Learned

My biggest lesson from working with AI coding tools is surprisingly simple:

Do not spend all your time trying to write the perfect prompt. Build a workflow that gives the AI the right context.

Explain the outcome.

Let it inspect the project.

Give it constraints.

Break complicated work into stages.

Make it verify its work.

And keep yourself in control of architectural decisions.

Used that way, Claude Code is not just a faster way to type code. It becomes a genuinely useful development partner.

Top comments (0)