<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Neurobin</title>
    <description>The latest articles on DEV Community by Neurobin (@neurobin_).</description>
    <link>https://dev.to/neurobin_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4000435%2Fbb974a91-866b-4fbc-a2f8-d1c41049dee0.png</url>
      <title>DEV Community: Neurobin</title>
      <link>https://dev.to/neurobin_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/neurobin_"/>
    <language>en</language>
    <item>
      <title>How to Share Claude HTML Artifacts as a Live Preview URL</title>
      <dc:creator>Neurobin</dc:creator>
      <pubDate>Thu, 25 Jun 2026 03:33:26 +0000</pubDate>
      <link>https://dev.to/neurobin_/how-to-share-claude-html-artifacts-as-a-live-preview-url-2hak</link>
      <guid>https://dev.to/neurobin_/how-to-share-claude-html-artifacts-as-a-live-preview-url-2hak</guid>
      <description>&lt;p&gt;Claude is surprisingly good at producing useful HTML artifacts: quick dashboards, landing page mockups, product one-pagers, data reports, UI prototypes, and internal tools.&lt;/p&gt;

&lt;p&gt;The awkward part usually comes after the HTML is generated.&lt;/p&gt;

&lt;p&gt;You want to send it to someone, but the artifact lives in a chat, a local file, or a temporary preview. Screenshots lose interactivity. Copying code into a message is hard to review. Asking someone to download a file and open it locally adds friction.&lt;/p&gt;

&lt;p&gt;For many small HTML outputs, the missing step is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Turn the generated HTML into a real browser URL.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This article walks through a practical workflow for sharing Claude HTML artifacts as live previews.&lt;/p&gt;

&lt;p&gt;If you want a focused version of this workflow, I also wrote a short guide here: &lt;a href="https://previewship.com/guides/share-claude-html-artifacts" rel="noopener noreferrer"&gt;Share Claude HTML artifacts as a live URL&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with local HTML artifacts
&lt;/h2&gt;

&lt;p&gt;When Claude generates HTML, you usually get one of three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A single self-contained HTML file&lt;/li&gt;
&lt;li&gt;A small static folder with CSS, JavaScript, and image assets&lt;/li&gt;
&lt;li&gt;A source project that needs to be built first, such as Vite, Next.js, Astro, or another frontend setup&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are not the same deployment target.&lt;/p&gt;

&lt;p&gt;A single HTML file can often be published directly. A static folder can be hosted as-is if it already contains the final assets. A source project usually needs a build command first.&lt;/p&gt;

&lt;p&gt;The most common mistake is trying to share the source project instead of the built artifact.&lt;/p&gt;

&lt;p&gt;For example, this is usually not what you want to publish:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-demo/
  package.json
  src/
  node_modules/
  vite.config.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is much closer to what you want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dist/
  index.html
  assets/
    app.css
    app.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That distinction matters because a browser can load &lt;code&gt;index.html&lt;/code&gt;, CSS, JavaScript, images, and static assets. It cannot run your local build system for the viewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a good preview workflow should do
&lt;/h2&gt;

&lt;p&gt;A good preview workflow for AI-generated HTML should be boring in the best possible way:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Take the exact artifact Claude generated or built&lt;/li&gt;
&lt;li&gt;Publish it to a public HTTPS URL&lt;/li&gt;
&lt;li&gt;Preserve linked CSS, JavaScript, images, and fonts&lt;/li&gt;
&lt;li&gt;Let reviewers open it without installing anything&lt;/li&gt;
&lt;li&gt;Make it easy to replace the preview when the artifact changes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That workflow works especially well for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI-generated reports&lt;/li&gt;
&lt;li&gt;HTML prototypes&lt;/li&gt;
&lt;li&gt;Landing page drafts&lt;/li&gt;
&lt;li&gt;Client demos&lt;/li&gt;
&lt;li&gt;Small internal tools&lt;/li&gt;
&lt;li&gt;Static examples for docs&lt;/li&gt;
&lt;li&gt;UI states that are easier to review in a browser than in a screenshot&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Option 1: Paste or upload the HTML
&lt;/h2&gt;

&lt;p&gt;If Claude generated one self-contained HTML file, the fastest path is to paste or upload the file and get a live URL.&lt;/p&gt;

&lt;p&gt;This works best when the file includes everything it needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Revenue Dashboard Preview&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;system-ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Revenue Dashboard&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a generated static preview.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is ideal for quick review loops because there is no repository, no DNS, no build pipeline, and no app server.&lt;/p&gt;

&lt;p&gt;If you are using PreviewShip, the upload flow is built for this kind of artifact:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://previewship.com/guides/publish-ai-generated-html" rel="noopener noreferrer"&gt;Publish AI-generated HTML online&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: Publish from the command line
&lt;/h2&gt;

&lt;p&gt;If Claude Code or another local coding agent generated a file in your workspace, the command line can be faster than using a browser UI.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx previewship deploy ./report.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, if you want a machine-readable result for scripting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx previewship deploy ./report.html &lt;span class="nt"&gt;--json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A CLI-based workflow is useful when you repeatedly generate variations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx previewship deploy ./experiments/pricing-page-v3.html
npx previewship deploy ./reports/weekly-growth.html
npx previewship deploy ./demos/onboarding-flow.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important thing is that the deployed file or folder should already be browser-ready.&lt;/p&gt;

&lt;p&gt;For a built frontend project, that usually means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
npx previewship deploy ./dist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact output folder depends on your framework:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vite      -&amp;gt; dist/
Astro     -&amp;gt; dist/
Next.js   -&amp;gt; out/ if using static export
SvelteKit -&amp;gt; build/ depending on adapter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Option 3: Let Claude Code publish the preview
&lt;/h2&gt;

&lt;p&gt;If you are working inside Claude Code, Cursor, or another agentic coding tool, you can also make publishing part of the agent workflow.&lt;/p&gt;

&lt;p&gt;A typical prompt can be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build the static preview, deploy the browser-ready output, and give me the public URL.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works best when the tool has a clear deployment command or MCP integration available.&lt;/p&gt;

&lt;p&gt;For PreviewShip, the MCP docs are here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://previewship.com/docs/mcp" rel="noopener noreferrer"&gt;PreviewShip MCP docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That kind of setup is useful because the agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate the HTML&lt;/li&gt;
&lt;li&gt;Build the static output if needed&lt;/li&gt;
&lt;li&gt;Deploy the result&lt;/li&gt;
&lt;li&gt;Return a URL for review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You still need to be explicit about what should be deployed. If the agent built a Vite app, ask it to deploy &lt;code&gt;dist/&lt;/code&gt;, not the raw source directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small checklist before sharing the URL
&lt;/h2&gt;

&lt;p&gt;Before sending the preview to someone else, check these details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The page has a real &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The layout works on desktop and mobile&lt;/li&gt;
&lt;li&gt;External images and fonts load correctly&lt;/li&gt;
&lt;li&gt;Buttons and links do not point to localhost&lt;/li&gt;
&lt;li&gt;The page does not expose private API keys or internal data&lt;/li&gt;
&lt;li&gt;The artifact is the built output, not the source project&lt;/li&gt;
&lt;li&gt;The preview URL opens in a private browser window&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last check is underrated. If it works in a private window, it is much more likely to work for the person receiving the link.&lt;/p&gt;

&lt;h2&gt;
  
  
  When this workflow is better than a full deployment
&lt;/h2&gt;

&lt;p&gt;This live-preview workflow is not a replacement for production hosting.&lt;/p&gt;

&lt;p&gt;It is best for artifacts that need fast review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Can you check this report?"&lt;/li&gt;
&lt;li&gt;"Does this landing page copy make sense?"&lt;/li&gt;
&lt;li&gt;"Is this generated UI close to what we want?"&lt;/li&gt;
&lt;li&gt;"Can the client open this without installing anything?"&lt;/li&gt;
&lt;li&gt;"Can I share this prototype in a Slack thread?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For long-lived production apps, use your normal deployment pipeline.&lt;/p&gt;

&lt;p&gt;For throwaway or review-focused HTML, a lightweight preview URL is usually enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;Claude can generate the first version of an HTML artifact quickly. The real productivity gain comes when the review loop is just as fast.&lt;/p&gt;

&lt;p&gt;If the output can be opened as a URL, people can comment on the actual experience instead of debugging file sharing.&lt;/p&gt;

&lt;p&gt;That small shift makes AI-generated HTML much easier to use in real work.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>html</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
