Back to Writing

    5 Tips for Building Software with AI Tools Like Claude Code and Codex

    Mohanid Elragel

    Five practical tips for using AI coding tools like Claude Code and Codex in real software engineering workflows. How to give context, break tasks, verify results, and keep engineering judgement.

    5 Tips for Building Software with AI Tools Like Claude Code and Codex

    AI coding tools have changed the way software gets built.

    Tools like Claude Code and Codex can write code, understand large codebases, debug problems, run tests, and even make changes across multiple files. But the biggest mistake is treating them like a faster version of autocomplete.

    The real advantage comes from changing how you work.

    Here are five lessons that have made AI-assisted development much more effective.

    1. Give the AI context before giving it a task

    "Build me a login system" is a terrible prompt.

    The AI might produce something that works, but it has no idea how your application is structured, what conventions you follow, what database you use, or what constraints exist.

    A better approach is to let the tool understand the project first.

    Ask it to inspect the relevant parts of the codebase, understand the architecture, identify existing patterns, and explain how the feature should fit into the application.

    Then give it the task.

    The difference is significant. You are no longer asking AI to invent a solution. You are asking it to work within an existing system.

    2. Give it small, well-defined jobs

    AI can handle surprisingly large tasks, but that does not mean you should throw an entire feature at it in one prompt.

    Break the work down.

    Instead of:

    Build the entire payment system.

    Try:

    Review the existing payment service and explain how payments currently flow through the application.

    Then:

    Add support for Stripe webhooks using the existing service patterns.

    Then:

    Write tests for the webhook handler, including duplicate events and invalid signatures.

    This gives you checkpoints. You can review what happened before moving on.

    It also makes mistakes much easier to identify.

    3. Let AI write the code, but make it prove the code works

    One of the most useful things about tools like Claude Code and Codex is that they can work with your development environment rather than simply generating snippets.

    Use that.

    Ask the AI to run tests, inspect compiler errors, run linters, reproduce bugs, and verify its changes.

    A useful workflow is:

    Plan -> Implement -> Test -> Review -> Fix

    Do not stop at "the code looks right."

    Software is full of edge cases that are invisible from a quick code review. Having the AI run the tests and validate its own work creates another feedback loop.

    But there is an important distinction: AI verification is not a replacement for human review. You still need to understand what is changing, particularly around security, data, authentication, payments, and anything business-critical.

    4. Use AI to understand code, not just write it

    This is probably the most underrated use of coding agents.

    You can point them at an unfamiliar part of a codebase and ask questions such as:

    • Why does this service work this way?
    • Where is this database record created?
    • What happens when this API request fails?
    • Find all the places that depend on this interface.
    • Explain the authentication flow from the frontend to the database.

    This can dramatically reduce the time spent navigating an unfamiliar codebase.

    It is especially useful when joining an existing project. Instead of spending hours manually following references through hundreds of files, you can use AI as a codebase guide.

    The important part is still to verify its explanation against the actual code.

    5. Do not outsource your engineering judgement

    This is the big one.

    AI can produce code much faster than most developers can type it. That does not mean it can replace engineering judgement.

    Someone still needs to decide:

    • What should actually be built?
    • Is this architecture appropriate?
    • What are the security implications?
    • What happens at scale?
    • Is this introducing unnecessary complexity?
    • Is the code maintainable?
    • Does this solve the actual business problem?

    The developers who get the most out of AI are not necessarily the ones who write the most code.

    They are the ones who can give good direction, recognise bad solutions, and understand the system well enough to know when the AI is wrong.

    The bigger shift

    AI-assisted development is not simply about writing code faster.

    It changes the economics of software development.

    A developer can now spend less time typing boilerplate and more time thinking about architecture, product decisions, testing, user experience, and the difficult parts of engineering.

    That is the opportunity.

    Use Claude Code, Codex, and similar tools as engineering partners, not as autonomous programmers you blindly trust.

    The better your engineering judgement, the more valuable these tools become.

    If your team is adopting AI coding tools and you want to turn the experiment into faster, more reliable delivery, we would be glad to have that conversation.

    hello@leptiscode.com

    leptiscode.com