[{"data":1,"prerenderedAt":337,"buildId":338},["ShallowReactive",2],{"page-\u002Fbuild\u002Fclaude-code-tutorial":3},{"id":4,"title":5,"body":6,"description":319,"extension":320,"how_to_steps":321,"hub":305,"meta":322,"navigation":323,"path":324,"primary_keyword":325,"published_at":326,"schema_types":327,"seo":331,"status":332,"stem":333,"updated_at":334,"wave":335,"__hash__":336},"pages\u002Fbuild\u002Fclaude-code-tutorial.md","Claude Code Tutorial: Build a Project From Zero",{"type":7,"value":8,"toc":308},"minimark",[9,13,22,27,34,41,51,54,57,63,78,92,96,99,107,114,117,123,126,132,140,144,147,183,194,199,206,212,222,225,231,234,240,253,257,260,267,279,283,293,296],[10,11,12],"p",{},"This Claude Code tutorial takes you from an empty folder to a one-page notice for a fictional reading room.\nYou'll ask Claude to describe the work before it edits anything, then check the page in a browser and review a second change in Git.\nThe finished site is one HTML file you can open on your computer without a web server.",[10,14,15,16,21],{},"Editorial note: This is a single-project walkthrough, not a benchmark or a ranking of tools.\nSee our ",[17,18,20],"a",{"href":19},"\u002Fdisclosure","editorial and affiliate disclosure",".",[23,24,26],"h2",{"id":25},"setup-in-ten-minutes","Setup in ten minutes",[10,28,29,30,21],{},"Use Anthropic's official Claude Code documentation, starting with its Quickstart, to pick the current installation instructions for your operating system and shell.\nTen minutes is a rough allowance for getting oriented if your tools and sign-in are already set up.\nA new installation or an account setup may take longer.\nYou'll also need Git, a web browser, and a plain text editor that can save a file as ",[31,32,33],"code",{},".html",[10,35,36,37,40],{},"A terminal runs a shell, which is the program that reads commands such as ",[31,38,39],{},"cd",".\nThe shell commands below are written for macOS or Linux shells such as Bash and Zsh, and for PowerShell on Windows.\nUse the terminal environment supported by the Claude Code installation instructions you followed.\nType the following lines at the shell prompt, one at a time, and press Enter after each one.",[42,43,49],"pre",{"className":44,"code":46,"language":47,"meta":48},[45],"language-sh","claude --version\ngit --version\n","sh","",[31,50,46],{"__ignoreMap":48},[10,52,53],{},"A version number tells you the shell found the program, not that your account is ready to use it.\nIf either command is missing, stop and check that tool's installation instructions before moving on.\nIf you just installed it, try the command in a new terminal window first.",[10,55,56],{},"Start somewhere you keep practice projects, outside any existing Git repository.\nMake a new folder for this exercise so you can tell which files appeared during the session.\nKeep private documents and credentials out of it.\nRun each line only if the previous one succeeded, and pick a different fresh folder name if the first command says it already exists.",[42,58,61],{"className":59,"code":60,"language":47,"meta":48},[45],"mkdir claude-code-practice\ncd claude-code-practice\npwd\ngit init\nclaude\n",[31,62,60],{"__ignoreMap":48},[10,64,65,66,69,70,73,74,77],{},"The path printed by ",[31,67,68],{},"pwd"," should end in the folder you created.\n",[31,71,72],{},"git init"," sets up local change tracking without publishing anything or making a commit.\n",[31,75,76],{},"claude"," starts the interactive session, where you'll paste the prompts from the next section instead of shell commands.\nIf asked to sign in, follow the official sign-in flow and keep passwords or tokens out of the agent conversation.\nIf Claude Code asks whether you trust the folder, check the path and confirm only for the practice folder you just created.\nStarting there gives the session a working directory, not a guarantee that it cannot access files elsewhere.",[10,79,80,81,85,86,88,89,91],{},"If you're new to a tool that works with files instead of just answering in chat, read ",[17,82,84],{"href":83},"\u002Fbuild\u002Fwhat-is-an-ai-coding-agent","what an AI coding agent does",".\nFor this project, keep a second terminal handy for the Git commands you will run yourself.\nIn that second terminal, use ",[31,87,39],{}," with the full practice-folder path from ",[31,90,68],{},", putting the path in straight double quotes if it contains spaces.",[23,93,95],{"id":94},"your-first-build","Your first build",[10,97,98],{},"Start with a read-only request in the Claude Code session.\nYou want to see which file Claude proposes to touch and what it thinks the browser should do afterward.",[42,100,105],{"className":101,"code":103,"language":104,"meta":48},[102],"language-text","Plan a small static website for a fictional reading room.\nIt should use one file named index.html and open directly in a browser.\nIt needs a heading and a link that jumps to a section called Where to return books.\nDo not create or edit files or run shell commands yet.\nTell me what you would write and how I can check it in the browser.\n","text",[31,106,103],{"__ignoreMap":48},[10,108,109,110,113],{},"Look for a plan that names ",[31,111,112],{},"index.html"," as the only file and uses a link to a heading on the same page.\nIf the plan proposes setting up a framework or starting a server, ask for a simpler plan before giving permission to write.\nYou should be able to describe the proposed page yourself before proceeding: a reader opens the notice and can jump straight to the return instructions.",[10,115,116],{},"Once the plan matches, paste this in the same session.",[42,118,121],{"className":119,"code":120,"language":104,"meta":48},[102],"Create only index.html in the current practice folder.\nUse Reading room returns for both the browser tab title and the main heading.\nAdd a short introduction that identifies the notice as a fictional sample.\nAdd a link labeled Jump to return instructions with href=\"#returns\".\nAdd a heading named Where to return books with id=\"returns\".\nUnder that heading write: Leave books in the blue tray by the door.\nUse semantic HTML, and if you add CSS, keep it inside this file and preserve visible keyboard focus.\nDo not add JavaScript, packages, external assets, or other files.\nDo not run shell commands, stage changes, or publish anything.\nAfter writing, tell me what you changed and which checks I still need to run.\n",[31,122,120],{"__ignoreMap":48},[10,124,125],{},"Read the filename and proposed action on any permission prompt before answering it.\nApprove the single intended edit if the request matches and decline commands that install software, read unrelated folders, or send files elsewhere.\nThe exercise only requires you to let Claude write one local file.\nIf it asks for broader access, keep that request denied and ask it to explain why the edit needs it.",[10,127,128,129,131],{},"Open your practice folder in the file manager and double-click ",[31,130,112],{}," to open it in the browser.\nOpen the same file in your editor so you can compare the page with its source.\nIf the agent cannot write the file, ask it to print the complete HTML and save it yourself as plain text under the same name.\nIf that still leaves you without a working file, use this reference and continue with the checks below.",[42,133,138],{"className":134,"code":136,"language":137,"meta":48},[135],"language-html","\u003C!doctype html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n  \u003Cmeta charset=\"utf-8\">\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  \u003Ctitle>Reading room returns\u003C\u002Ftitle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cmain>\n    \u003Ch1>Reading room returns\u003C\u002Fh1>\n    \u003Cp>This is a fictional reading room notice.\u003C\u002Fp>\n    \u003Cp>\u003Ca href=\"#returns\">Jump to return instructions\u003C\u002Fa>\u003C\u002Fp>\n    \u003Ch2 id=\"returns\">Where to return books\u003C\u002Fh2>\n    \u003Cp>Leave books in the blue tray by the door.\u003C\u002Fp>\n  \u003C\u002Fmain>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html",[31,139,136],{"__ignoreMap":48},[23,141,143],{"id":142},"reviewing-what-it-wrote","Reviewing what it wrote",[10,145,146],{},"Before trusting the summary from Claude, check the saved file and try the page yourself.\nDo this before saving your baseline, which is the version you'll compare against after the next edit.",[148,149,150,161,164,167,174,177,180],"ul",{},[151,152,153,154,156,157,160],"li",{},"Confirm ",[31,155,112],{}," is the only project file apart from Git's own ",[31,158,159],{},".git"," folder.",[151,162,163],{},"Look for \"Reading room returns\" in the browser tab and the main heading.",[151,165,166],{},"Use Tab to visibly focus the link, then Enter to activate it.",[151,168,169,170,173],{},"Check that the address ends in ",[31,171,172],{},"#returns"," and the link reaches \"Where to return books.\"",[151,175,176],{},"Confirm that the notice says it's fictional and the instruction says \"blue tray by the door.\"",[151,178,179],{},"Narrow the browser window until it's about the width of your phone, then check whether any text or the link forces you to scroll sideways.",[151,181,182],{},"Check the page again after enlarging the text: the title and instructions should still be readable without hiding any line behind the edge of the window.",[10,184,185,186,189,190,193],{},"A short page may already fit in the window, so the screen might barely move when you activate the link.\nCheck that the address changes and that the heading's ",[31,187,188],{},"id"," exactly matches the part of the link after ",[31,191,192],{},"#",".\nIn your editor, also check for unexpected scripts or references to external resources, even if everything looked fine in the browser.",[195,196,198],"h3",{"id":197},"save-a-baseline-and-review-one-edit","Save a baseline and review one edit",[10,200,201,202,205],{},"Run the next commands in your second terminal, not in the Claude conversation.\nThe first line should list the new file as ",[31,203,204],{},"?? index.html",", which means Git has not started tracking it.\nIf it lists extra files, inspect them before running the next line.",[42,207,210],{"className":208,"code":209,"language":47,"meta":48},[45],"git status --short --untracked-files=all\ngit add -- index.html\ngit --no-pager diff --cached -- index.html\n",[31,211,209],{"__ignoreMap":48},[10,213,214,217,218,221],{},[31,215,216],{},"git add"," stages a copy of the reviewed file in Git's index, where Git keeps the version selected for a future commit.\nThe last command shows that copy as a new file, with its added lines marked ",[31,219,220],{},"+",".\nLeave that copy staged throughout the exercise so it remains your baseline.\nYou do not need to make a commit.",[10,223,224],{},"Suppose the reading room moves its returns tray to the desk.\nGive Claude one change to make, leaving the rest of the page as it was.",[42,226,229],{"className":227,"code":228,"language":104,"meta":48},[102],"Edit index.html only.\nReplace \"Leave books in the blue tray by the door.\" with \"Leave books in the green tray beside the desk.\"\nKeep the link, headings, and all other content and formatting unchanged.\nDo not run commands or stage the change.\n",[31,230,228],{"__ignoreMap":48},[10,232,233],{},"If Claude cannot write the change, replace the sentence and save the file yourself before continuing.\nBack in your second terminal, compare the saved file to the staged copy.",[42,235,238],{"className":236,"code":237,"language":47,"meta":48},[45],"git status --short --untracked-files=all\ngit --no-pager diff -- index.html\n",[31,239,237],{"__ignoreMap":48},[10,241,242,245,246,249,250,252],{},[31,243,244],{},"AM index.html"," means the file is staged as added and has another modification that you haven't staged.\nIn the diff, the ",[31,247,248],{},"-"," line should name the blue tray and the ",[31,251,220],{}," line should name the green one.\nLines without those markers show the surrounding HTML for context.\nIf Claude also reformatted the page or rewrote the heading, ask it to remove those changes and run the diff again.\nReload the browser to confirm the new instruction is visible and test the link again with the keyboard.\nYou're done when the file list is unchanged, the diff shows only the requested edit, and the page passes both browser checks.",[23,254,256],{"id":255},"settings-that-matter","Settings that matter",[10,258,259],{},"For a first project, choose a permission mode that lets you review edits rather than one that approves them automatically.\nAnthropic's Claude Code documentation on permissions explains the available modes, including Plan Mode for exploring a project without editing its files.\nThe first prompt in this tutorial asks for read-only behavior in words; a prompt alone is not a permission setting.\nOn a project you care about, check the active mode before you send a request that must not change files.",[10,261,262,263,266],{},"Project instructions and permissions do different jobs.\nA project ",[31,264,265],{},"CLAUDE.md"," can tell Claude to keep the site in plain HTML, while permission settings govern which tool actions are allowed or require approval.\nSee the Claude Code documentation on memory and settings for the distinction and the current configuration options.\nYou don't need a project instruction file, custom permission rules, or integrations for this exercise.\nIf you can't account for an existing always-allow rule, resolve that before using the session on files you care about.",[10,268,269,270,273,274,278],{},"Use ",[31,271,272],{},"claude --help"," at the shell prompt to check which launch flags your installed version supports.\nIf a permission label in your terminal differs from an example you've read, check the documentation for your version instead of guessing what it allows.\nIf you'd prefer to work in a browser or editor instead of a terminal, ",[17,275,277],{"href":276},"\u002Fbuild\u002Fvibe-coding-tools","compare the leading vibe coding tools"," before starting your next project.",[23,280,282],{"id":281},"where-it-struggles","Where it struggles",[10,284,285,286,289,290,292],{},"A vague instruction like \"fix the link\" gives Claude room to replace markup that was already working.\nIf the link fails, describe the exact symptom and ask it to compare the link's ",[31,287,288],{},"href"," with the target heading's ",[31,291,188],{}," before changing anything.\nA mismatch needs a change on one line, not a button, a script, or a new layout.\nWhen the code already matches, reload the file and check the filename and path in the browser before asking for a second fix.",[10,294,295],{},"Claude also can't supply facts you haven't given it about a real reading room.\nIf you adapt the page, get the return instructions from the people who run the space and give the agent the exact text.\nKeep any claims about what passed separate from what was merely written: an edit summary can't show that you saw focus on the link or that the text was readable in a narrow window.\nThose are checks you can repeat after every edit.",[10,297,298,299,302,303,307],{},"For a follow-up that starts with the information a visitor needs and works up to a complete site, see ",[17,300,301],{"href":301},"\u002Fbuild\u002Fbuild-a-website-with-ai",".\nThe ",[17,304,306],{"href":305},"\u002Fbuild","Build with AI hub"," has more exercises for choosing and reviewing your next build.",{"title":48,"searchDepth":309,"depth":309,"links":310},2,[311,312,313,317,318],{"id":25,"depth":309,"text":26},{"id":94,"depth":309,"text":95},{"id":142,"depth":309,"text":143,"children":314},[315],{"id":197,"depth":316,"text":198},3,{"id":255,"depth":309,"text":256},{"id":281,"depth":309,"text":282},"A practical Claude Code tutorial: setup, your first build, how to review what it writes, and the settings that change the outcome.","md",[25,94,142,197],{},true,"\u002Fbuild\u002Fclaude-code-tutorial","claude code tutorial","2026-12-01T06:24:13Z",[328,329,330],"Article","BreadcrumbList","HowTo",{"title":5,"description":319},"draft","build\u002Fclaude-code-tutorial",null,"2","GO0LNnPKG1hQehG9uVUt3wYCg9fd-oL-iPbH1VIvUoM",1796185435707,"a1d53563-3a78-4678-8315-e5bd6a5bd80c"]