A readable, copyable code file, not something you write yourself
After this, you'll be able to ask Claude for a small piece of code and get it as a clean, copyable block. You'll understand that this kind of code Artifact is meant for you to copy and paste elsewhere, and is a different thing from Claude running code for you behind the scenes.
Complete Text Artifacts: documents you can export and share first; this lesson builds on that one by moving from a document you read to a code file you copy elsewhere, both produced as Artifacts in the same panel.
A Code Artifact is finished code Claude writes out for you, ready to copy. You do not write it, Claude does, handing you a tidy, labeled block you copy with one button. What you see is the code itself, with neat formatting and color, not a button-and-slider tool you click on.
Code Artifacts work on the Free plan (as of Nov 2026). A Code Artifact fits when the code is meant to go live somewhere else: a formula for a spreadsheet cell, a script your IT person runs, a snippet for a website builder. You stay no-code by reading the plain-English explanation Claude includes and pasting the result where it belongs.
In ChatGPT and Gemini: Gemini's Canvas has a code view you can edit, and it can export Python code to Google Colab. ChatGPT shows code in a code block inside the chat (its canvas side window is gone in newer models). In every tool, read the plain-English explanation before you paste.
What you need: a spreadsheet app. Google Sheets is free with a Google account, and Excel and Numbers work too. Paste the sample table from the exercise into it, one value per cell.
Now try it: send "Write me a spreadsheet formula that checks column C for a date and returns 'Overdue' if it is more than 30 days before today, otherwise 'OK'. Give me the formula as a code block I can copy, and explain it in one plain-English sentence." Use the copy button, in the panel or inline.
(Separately, Claude can also run code itself in a private workspace to build a file or work out an answer. That is a different feature; the code-snippet Artifact in this lesson is the kind you copy and paste where it belongs.)
A code-snippet Artifact hands you the code to paste elsewhere, so you stay no-code by never typing it yourself.
Paste this into Claude
Write me a clean, copyable piece of code as a Code Artifact. I am not a coder, so I want the finished code plus a short plain-English explanation, and I will copy it into the program where it belongs. Do not build me a clickable tool; I just want the code itself. First, set up a practice sheet. Open a spreadsheet and type this into cells A1 to C7, one value per cell. Each line below is one row, and the commas mark where the next cell starts, so do not type the commas. Type the dates like 2026-10-02 so the spreadsheet reads them as dates. If today is far from Nov 2026, change the dates so some are over 30 days old and some are recent. Invoice, Amount, Sent INV-1041, $1250, 2026-10-02 INV-1042, $480, 2026-10-14 INV-1043, $2300, 2026-10-29 INV-1044, $150, 2026-11-05 INV-1045, $960, 2026-11-12 INV-1046, $720, 2026-11-16 The job: a spreadsheet formula for tracking overdue invoices. - Column B has the invoice amount (row 1 holds the headings, so data starts in row 2). - Column C has the date the invoice was sent. - I want a formula for column D that returns the word "Overdue" if the invoice in that row was sent more than 30 days before today, and "OK" otherwise. Please: - Show the formula as a code block I can copy with one click. - Under it, explain in one or two plain sentences what the formula checks, so I understand what I am pasting. - Tell me which cell to paste it into and how to fill it down the column (copying the formula into every row below it).
What a good response looks like
Here is the formula for cell D2:
=IF(TODAY()-C2>30,"Overdue","OK")
What it checks: it subtracts the date in column C from today's date. If more than 30 days have passed, it shows "Overdue". Otherwise it shows "OK".
Where to paste it: click cell D2, paste the formula, and press Enter. To fill it down, click D2, then drag the small square at its bottom-right corner down the column.
Example: an invoice sent on Oct 1 shows "Overdue" on Nov 18, because 48 days have passed. One sent on Nov 10 shows "OK".
If column D shows #VALUE!, the dates in column C were typed as text. Retype them like 2026-10-02 or format column C as Date.
Tip: the amount in column B is not used here. If you want only unpaid invoices flagged, tell me which column marks an invoice as paid.
Check yours against
Paste this into claude.ai, filling in the brackets: 'Write me a clean piece of code I can copy as a Code Artifact, not a tool to click. I need [a formula / a short script / a snippet] that [does the job]. Show it as a code block I can copy, and explain in one plain sentence what it does and where I paste it.'
Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.
From memory, think of a small chore in your own work where a snippet of code would help. Write the request, naming where the code will go and the exact result you want, then say what you'd read before using it.
One good answer: 'In Excel, give me a formula for column E that adds 10% to the price in column C when column A says West. Then explain what it checks.' I'd read that explanation before using it. If your request names the program, the columns and the output, you've got it.
A Code Artifact is finished code Claude writes for you to copy, not a tool you click inside the panel. Describe the job and the program it is for, and you get readable code plus an explanation, so you stay no-code by never writing it yourself.