Skip to content
exec-808b21f4-9b2f-4b5f-8db4-2e229203932e

Dev Tools

How to Use Claude Code on an Existing Project

By Benjamin Thomas 1 min read
Start with a small change you can verify against an existing test suite. This walkthrough uses an illustrative input-validation bug so you can adapt the steps to your own repository.

Start from a clean branch

Run git status --short and preserve any work in progress. On a clean checkout, run git switch -c fix/input-validation. Run the project’s documented checks and record existing failures.

Inspect before editing

Open Claude Code from the repository root. Follow Anthropic’s setup guide if needed. In Plan Mode, ask it to locate where empty input is parsed, identify relevant tests, and propose the smallest fix without editing files. Verify that the named files and commands exist.

Make one change and review it

Ask Claude Code to reject empty input using the existing validation error and add one focused regression test. Review git diff for unintended changes and git status --short for new files. Rerun the focused test and the project’s normal checks. If the baseline already failed, compare the new failures with the baseline before attributing them to the patch.

Discover more from CortexHub

Subscribe to get the latest posts sent to your email.

Get featured Put your product in front of people who build.

Newsletter

The CortexHub Daily

The tech stories that matter — startups, AI, and the products people actually use. One email.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Redirecting to checkout…

Discover more from CortexHub

Subscribe now to keep reading and get access to the full archive.

Continue reading