Artifacts Usage Guide: Generate Code, Diagrams, and Documents On the Spot

AI Navigate Original / 3/24/2026

💬 OpinionTools & Practical Usage
共有:

Key Points

  • Artifacts is a feature that can generate and improve code, charts/diagrams, documents, UI parts, SVG, and more in a work area separate from the chat conversation.
  • In real work, you become better able to make revisions by specifying the desired format first and creating the smallest viable version first.
  • Mermaid diagrams, HTML pages, React components, and SVG images work especially well with Artifacts.
  • It’s effective to “grow” the output little by little using diff-based instructions—don’t aim for a perfect one-shot result.
  • Generated outputs are convenient, but you must check security, exception handling, and accessibility before using them in production.

What Are Artifacts: A Feature for Separating “Deliverables” from the Conversation

Claude’s Artifacts is a feature that displays long-form text, code, diagrams, HTML, UI components, and more in a separate work area from the chat panel, where you can generate, edit, and review them right away. In regular conversations, responses tend to scroll by and get buried, but with Artifacts, you can manage the “final deliverable” independently.

As of 2025, its strength goes beyond just text output: you can run code previews, generate Mermaid diagrams, create HTML pages, prototype React components, and generate SVG images end to end. In particular, this is a practical way to refine deliverables while you work out the specifications in the conversation.

What You Can Do with Artifacts

PurposeDeliverables That Fit WellWhere It Helps in Practice
Code creationPython/JavaScript/SQL, etc.Prototyping, splitting functions, confirming bug-fix approaches
Diagram/chart creationMermaid flowcharts, ER diagrams, sequence diagramsRequirements clarification, design reviews, procedure documentation
Document creationMeeting minutes, specification documents, proposals, READMEDrafting, reorganizing chapter structure
Web page prototypingSingle-page HTML/CSS/JSLanding page (LP) drafts, mockups for internal tool screens
UI prototypingReact componentsDashboard, form, and card UI exploration
Image generationSVG icons, simple explanatory graphics, banner skeletonsIllustrations in documents, logo ideas, explanatory diagrams

The Basic Workflow to Remember First

  1. State the type of deliverable you want to create up front.
  2. Specify the output format (HTML, Mermaid, React, SVG, etc.).
  3. Write the intended use and constraints (who it’s for, colors, sizes, whether libraries are allowed, etc.).
  4. After sending it to Artifacts, improve it with diff-based instructions.

A common mistake beginners make is asking the first request too abstractly. With Artifacts, specifying clearly “what to create and in which format” reduces the number of revisions later.

Basic Prompt Example

Create the top screen of an internal task management tool using Artifacts.
Format should be a single page of HTML/CSS/JavaScript.
Required elements: header, search box, in-progress task list, assignee filter, deadline alerts.
Design: simple, blue and gray palette, Japanese UI.
First, create a working prototype, and then propose three improvement points.

Running Code Previews: Make a “Working Minimal Version” First

The value of Artifacts is not only that it displays code, but that it can shorten the modify-and-review cycle by letting you preview while you iterate. Especially for JavaScript and frontend-related work, it’s often faster to see the screen and behavior than to read specifications in text.

Sign up to read the full article

Create a free account to access the full content of our original articles.