How to Turn Code Written by Claude into a Real Service
Prevent Design Fragmentation
HTML files generated by Claude look decent at first. However, once you go beyond three pages, maintaining them becomes a nightmare. Opening 10 files just to change a single font size is a waste of time. Separate your code.
- Create a project folder. Divide your files: CSS in
/assets/css, images in /assets/img, and layouts in /components.
- Use only lowercase letters and hyphens for filenames, such as
main-header.html. This reduces the chance of Claude confusing file paths.
- Include a
<link> tag in the <head> of your main HTML file to manage styles centrally.
By doing this, you only need to fix a header once, and the changes are immediately applied across all pages. You won't have to spend time editing files repeatedly.
Standardize Your Color Palette with CSS Variables
Do not hardcode color codes directly into every component. You don't want to sift through thousands of lines every time you want to change a button color. Instead, use CSS variables.
- Open your
/assets/css/global.css file.
- Define your 3 core colors like this:
:root { --main-color: #000000; --sub-color: #ffffff; }.
- When writing styles, use them like:
background-color: var(--main-color);.
If your brand colors change later, just update a single file for 3 seconds. The button colors on every page will change at once. This is much more efficient than manually editing the design every time.
Verify Instantly in a Local Environment
If you constantly modify code and refresh the browser, you will lose your focus. Install the Live Server extension for VS Code.
- Install Live Server in VS Code and click the "Go Live" button at the bottom.
- Open your site in the browser, right-click, and select "Inspect" to open Developer Tools.
- Adjust margins or font sizes in the Elements tab on the fly. Simply copy the updated values back into your CSS files.
See visible changes in real-time without refreshing. This cuts your design iteration time in half.
Enforce Standards for Claude
Claude writes code differently every time you ask. Establish rules before you start chatting. Create a CLAUDE.md file in your project root directory.
- Write down your CSS variable rules and folder structure in
CLAUDE.md.
- Define frequently used button or card shapes in XML format (e.g., code).
- When asking Claude for a new screen, just add one sentence: "Follow the rules in
CLAUDE.md."
This significantly reduces the chances of the AI arbitrarily complicating your code.
Automate Deployment with Vercel
Don't worry about server settings or complex configurations. With Vercel, your website works as soon as you push your code.
- Push your code to GitHub.
- Connect your GitHub account on the Vercel website and create a project.
- Every time you push code to GitHub thereafter, Vercel will update the site within 45 seconds.
There is no need to manage servers yourself. A domain address is generated automatically, and if a problem occurs, you can roll back to a previous version at any time. Upload your code now.