Tableau Workbook Thumbnail Viewer by Claude

Claude wrote for me a simple tool for viewing and optionally removing thumbnails from a Tableau workbook file. I’m calling it my Aha! moment for AI-assisted development :)
I’ve been following along with Simon Willison’s blog and was really intrigued with Everything I built with Claude Artifacts this week:
I’m a huge fan of Claude’s Artifacts feature, which lets you prompt Claude to create an interactive Single Page App (using HTML, CSS and JavaScript) and then view the result directly in the Claude interface, iterating on it further with the bot and then, if you like, copying out the resulting code.
My first idea was something I’d recently been looking into: Tableau workbook thumbnails. Tableau workbooks are saved in .TWB or .TWBX format. Both of these are actually XML files and the difference is the .TWB contains just the workbook while .TWBX also includes the data. Thumbnail images are automatically saved in a <thumbnails> element that includes the Base64-encoded PNG file:
<thumbnails>
  <thumbnail height='384' name='Commission Model' width='384'>
    iVBORw0KGgoAAAANSUhEUgAAAYAAAAGACAYAAACkx7W/AAAACXBIWXMAAA7DAAAOwwHHb6hk
    AAAgAElEQVR4nOzdZ3wd1Z34/8/cXlWuepclW7Jk2bIt23LHvYFNDS0EAiQQ0hOSbPaf3Syb
    3SS/bDbLkiUBTCcQOhhj3HBTb1bvvfderqRb5/9AjoyxwDYYO0Tn/UQv3Tlzzpkzc+c7c+bO
    ...
  </thumbnail>
  ...
</thumbnails>
Thumbnails are used in places like the recently-opened list in Tableau Desktop:

Tableau Desktop recently opened workbooks represented by thumbnail images

Thumbnails are handy but could be a concern if you’re sharing a workbook with other people and you’ve used it for viewing sensitive data. In that case you might want to remove those thumbnails before sharing.
My instructions to Claude (copying / inspired by Simon’s examples) were as follows:

Build an artifact – no react – that accepts XML in a textarea (either typed in or with an upload button). Below the textarea create a button called Go that inspects the XML, finds how many <thumbnail> elements are present, and reports that number below. The elements contain base64 encoded PNG images – after printing the number of thumbnail elements, for each one decode and display the image on the web page.

After a few iterations including adding buttons for removing the thumbnails and downloading the modified XML file, it worked! (Insert Aha! moment here.) Everything worked fine in the Claude console except for the download button. (I think there is some limitation when running in the iframe within Claude, but downloading and running locally worked fine.)

Here’s an example of the result, loading a workbook with the Superstore dataset which had 9 thumbnails. The app let’s you remove those thumbnails and save the .TWB file again. Success!

Tableau workbook thumbnail viewer created by Claude