DEV Community

Cover image for Claude Code Wasn’t Breaking My Projects. My Workflow Was.
alfie.ecom
alfie.ecom

Posted on

Claude Code Wasn’t Breaking My Projects. My Workflow Was.

Claude Code can write code quickly.

That is useful until it starts moving faster than it understands your project.

I kept running into the same problems:

Small requests touched unrelated files
Existing logic was rebuilt instead of reused
Bug fixes created different bugs
Claude changed the scope halfway through
Tasks were marked complete without testing the real user flow

The issue was not simply “bad prompts.”

My entire workflow started too late.

I was asking Claude to build before making it inspect, define boundaries and agree on what success looked like.

A quick disclosure

I created The Claude Code Toolkit, a paid collection containing 260 prompts and systems, 15 CLAUDE.md templates, 10 development workflows and 100 curated Claude Code skills.

It costs £3.99:

The Claude Code Builder Kit

Stop fighting Claude Code. Start building with it.You know what you want to build.Claude just keeps guessing wrong, breaking things and making you repeat yourself.This toolkit fixes that.You get 260 structured prompts that give Claude the exact context it actually needs:• What to build• What not to touch• How to test the result• When the task is actually completeWhat’s Inside• 260 prompts for websites, app development, SaaS features and debugging• 15 professional CLAUDE.md templates• 10 complete development workflows• 100 curated Claude Code skills• Beginner quick start guideHere’s one prompt from the toolkitThat’s one of 50 website building prompts included. The full version goes from planning all the way through implementation and testing.How It WorksPick a prompt.Customise it for your project.Paste it into Claude.Get clearer, more structured results.It takes around 30-90 seconds to customise and works with Claude Code, ChatGPT, Gemini and other AI coding tools.Get Instant Access£3.99. One payment. Lifetime access. Instant delivery.You’ll receive a PDF containing access to the full organised toolkit in Google Docs.It works on desktop, tablet and mobile.Stop rewriting the same instructions for every project.Just build.

favicon alfiestips.gumroad.com

The complete pre-flight prompt below is free to copy. It is not a shortened preview.

The pre-flight check I run before important changes

Before Claude edits anything, I make it answer five questions:

What does the current system do?
Which files are actually relevant?
What must remain untouched?
What is the smallest safe change?
How will the result be verified?

That sounds basic, but it prevents a lot of unnecessary work.

Here is the full prompt.

Act as a senior software engineer preparing to make a controlled change inside an existing codebase.

TASK

[DESCRIBE THE FEATURE, FIX OR UPDATE]

EXPECTED RESULT

[DESCRIBE EXACTLY WHAT THE USER SHOULD BE ABLE TO DO]

PROTECTED FUNCTIONALITY

[LIST FEATURES, PAGES, FILES, DATA OR INTEGRATIONS THAT MUST REMAIN UNCHANGED]

KNOWN PROJECT CONTEXT

Project purpose:
[DESCRIBE THE APPLICATION]

Tech stack:
[LIST THE STACK OR WRITE UNKNOWN]

Relevant files:
[LIST THEM OR WRITE UNKNOWN]

Recent changes:
[LIST RELEVANT CHANGES OR WRITE NONE]

Known errors:
[PASTE ERRORS OR WRITE NONE]

Do not edit any code yet.

First, inspect the existing project and perform a pre-flight review.

Your review must include:

  1. Trace the current user flow connected to this task.
  2. Identify the components, routes, services, APIs, database logic and state involved.
  3. Find existing patterns, utilities and components that should be reused.
  4. Identify every file likely to be modified.
  5. Explain why each file may need to change.
  6. Identify functionality that could be affected indirectly.
  7. List unclear requirements or missing information.
  8. Identify security, permission, validation and data-integrity risks.
  9. Recommend the smallest safe implementation.
  10. Create a testing plan for the complete user flow.

Respond using these sections:

CURRENT BEHAVIOUR

Explain how the relevant functionality currently works.

TASK UNDERSTANDING

Restate the requested result in your own words.

RELEVANT FILES

List the files involved and explain what each one controls.

EXISTING PATTERNS TO REUSE

Identify components, services, utilities and conventions that should be preserved.

RISKS

Explain possible regressions, edge cases and security concerns.

SMALLEST SAFE CHANGE

Recommend the minimum implementation required to deliver the requested result.

APPROVED SCOPE

List every file and area you expect to modify.

PROTECTED AREAS

List everything that must remain untouched.

IMPLEMENTATION PLAN

Provide a step-by-step plan.

TESTING PLAN

Explain how you will test:

  • The complete successful flow
  • Invalid and missing input
  • Failed requests
  • Loading, empty and error states
  • Authentication and permissions
  • Repeated clicks or duplicate submissions
  • Related functionality
  • Browser console errors
  • Server logs
  • Protected functionality

Wait for my approval before editing any code.

After approval:

  • Stay inside the approved scope.
  • Follow the existing architecture.
  • Reuse existing project patterns.
  • Do not perform unrelated refactoring.
  • Do not change unrelated styling.
  • Do not add dependencies without approval.
  • Stop and ask before modifying an unapproved file.
  • Preserve existing user data, permissions and integrations.

After implementation:

  1. List every file created or modified.
  2. Explain the exact changes made.
  3. Compare the result against the approved plan.
  4. Test the complete user flow.
  5. Test related protected functionality.
  6. Report failed tests.
  7. List anything that could not be verified.

Do not claim completion because the code compiles or the page loads.

The task is complete only when the intended user flow has been tested and protected functionality still works.

ENJOY!

Top comments (0)