npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alistigo/artifact-claude-capabilities-demo

v0.4.0

Published

Self-contained UMD bundle — a Claude artifact that demonstrates all Claude iframe APIs: storage, AI completions, file download, network proxy, and external navigation.

Readme

@alistigo/artifact-claude-capabilities-demo

A self-contained Claude artifact that exercises every API Claude injects into artifact iframes. Drop one <script> tag into any Claude HTML artifact and get an eight-tab interactive explorer.

Why this exists

Every HTML artifact Claude generates runs inside a sandboxed iframe. Before it loads, Claude silently prepends a bridge script that patches the global environment: it installs window.storage, window.claude, window.fetch, window.open, and URL.createObjectURL as postMessage proxies to the parent Claude frame. This artifact makes all of those APIs tangible — each tab demonstrates one capability with live interaction so you can verify the bridge works, see exactly what data flows through, and understand the constraints (draft mode, same-origin links, etc.).

Tabs

About

Capability overview: what each tab does, usage snippet, and an explanation of the inject-script. The default landing tab.

Storage — window.storage

A promise-based key-value store backed by the Claude conversation. Supports a private namespace (scoped to the artifact) and a shared namespace (available across all artifacts in the same conversation). The tab provides a full browser: list keys by prefix, inspect JSON values, create, edit with auto-save, and delete entries.

Draft mode: window.storage is unavailable until the artifact is published. This tab is disabled in draft mode.

AI — window.claude.complete()

Sends a prompt to the Claude model that generated the artifact and returns the completion as a string. The call routes through a postMessage bridge and resolves when Claude replies. No external API key needed.

File Generation — URL.createObjectURL / data: URI

Two download paths side by side:

  • Blob pathURL.createObjectURL(blob) produces a blob-request:// URL. The inject-script intercepts the anchor click, reads the blob as an ArrayBuffer, and forwards it to the parent frame for download.
  • data: URI path — encode content as data:text/csv;base64,… directly in the anchor href. The inject-script parses the MIME type and base64 payload inline — no blob or object URL needed.

Both paths work in draft mode.

API Calls — window.fetch

The inject-script replaces window.fetch with a postMessage bridge, but this bridge is a mediation layer scoped to the Anthropic API — not a general HTTP client. Only requests to api.anthropic.com are forwarded by the parent frame; all other origins are rejected at the network layer regardless of what is listed in the Capabilities domain allowlist (which governs code execution, not artifact fetch).

The tab ships with pre-built examples for common Anthropic API patterns (simple completions, streaming, web search tool), plus two deliberately-blocked examples (httpbingo.org, api.github.com) that demonstrate the failure mode. For external data from arbitrary hosts, use the web_search tool via the Anthropic API or an MCP connector — both route through the parent rather than the iframe.

PostMessage Log — bridge protocol inspector

Captures and displays every postMessage sent between the artifact iframe and the parent Claude frame in real time. Messages accumulate across all tab switches so you can use Storage, AI, API Calls, or any other tab and then review the full message traffic here. Each entry shows direction (↑ OUT / ↓ IN), timestamp with milliseconds, message type, and the full JSON payload — collapsed by default, click to expand.

External Navigation — window.open / <a> links

External links (href pointing to a different hostname) and window.open() calls are intercepted by the inject-script and forwarded to the parent frame as openExternal postMessages. The parent decides whether to open them. Same-origin links pass through normally.

Inject Script

Shows the full source of Claude's inject-script with JavaScript syntax highlighting. Includes an explanation of what each section does.

Note: Claude hides this script from the artifact's source tab inside the Claude UI. It is not user-visible code — it is infrastructure that Claude always injects before your artifact HTML.

Usage

Paste into a Claude HTML artifact:

<script src="https://cdn.jsdelivr.net/npm/@alistigo/artifact-claude-capabilities-demo@0/dist/index.umd.js"></script>

The artifact mounts itself to a full-height container it creates in <body>.

Configuration

Pass a config block before the script tag to customise behaviour:

<script id="alistigo-config" type="application/json">
  {
    "app": "@alistigo/artifact-claude-capabilities-demo",
    "prefix": "myapp:"
  }
</script>
<script src="https://cdn.jsdelivr.net/npm/@alistigo/artifact-claude-capabilities-demo@0/dist/index.umd.js"></script>

| Field | Type | Default | Description | |-------|------|---------|-------------| | prefix | string | "" | Filter Storage tab keys to those starting with this prefix | | container | string | auto-created <div> | CSS selector for an existing mount target |

Draft mode

The Storage tab requires a published artifact (window.storage is unavailable until Claude assigns the artifact a stable identity). All other tabs — AI, File Generation, API Calls, External Navigation, Inject Script, PostMessage Log, and About — work immediately from a freshly pasted draft.

The artifact shows a Draft badge in the top-right corner when running unpublished. Clicking it explains why the Storage tab is disabled.

How it works

The artifact is a UMD bundle built with Vite + React + Tailwind. It uses:

  • @alistigo/artifact-core — lifecycle hooks (useArtifactLifecycle, useStartArtifact)
  • @alistigo/claude-storage-plugin — typed wrapper around window.storage
  • @alistigo/artifact-core-components-react — loading/error screens, context menu, modal

The inject-script source (packages/claude-artifact-api/inject-script.html) is inlined at build time via Vite's ?raw import and displayed in the Inject Script tab.