Best practice L2 · Context engineering informational

Iterate Inside an Artifact Instead of Re-Pasting in Chat

What it is

A workflow for building something concrete — a document, a component, a script — where you have Claude create it as an Artifact and then refine it in place with targeted requests, rather than pasting the whole thing back into chat each round to be regenerated.

Re-paste in chatdrifts· copy the whole thing back· context bloats· versions get muddledEdit the artifactstable→ change in place→ one living version→ clean diff each turn
Editing the artifact in place beats re-pasting a growing blob.

Why it works

Re-pasting a growing document into the conversation bloats the context, muddles which version is current, and invites the model to quietly rewrite parts you were happy with. An Artifact is a single living object: each request edits that object, you always know what 'the current version' is, and changes are scoped to what you asked for. It turns iteration into editing rather than repeated regeneration.

When to use it

Anything you'll revise several times and want to keep as one evolving thing — a landing page, a spec, a chart, a utility script, a policy doc.

When not to use it

One-shot answers you won't iterate on, or content that belongs in your own editor/repo where you'll take over. Don't force throwaway text into an Artifact.

Prompt

Create this as an artifact: <what to build>. Then I'll ask for specific changes and you update the artifact in place — change only what I ask and keep the rest stable. Start with <initial version>.

Example

Building a pricing page, you say 'make the middle tier the highlighted one' and 'tighten the FAQ to four questions' as separate edits; the Artifact updates in place each time, so you never lose the parts you liked to an accidental full rewrite.

Advanced version

Once the Artifact is close, ask for one 'consistency pass' over the whole thing — align spacing, tone, or naming — as a deliberate final step, instead of letting each small edit silently drift the rest.

Common mistakes

  • Copying the artifact back into chat to 'continue', which restarts the drift you were avoiding.
  • Asking for sweeping changes that effectively regenerate it, losing the stable version.
  • Never doing a final consistency pass, so accumulated small edits leave rough edges.

Related