Skip to content
Back to skills

Claude Api In Prototypes

ASecurity

Call Claude from your HTML artifacts via window.claude.complete

  • 69,003 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 3, 2026
ai-agentsapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add asgeirtj/system_prompts_leaks --skill claude-api-in-prototypes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude Api In Prototypes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Claude Api In Prototypes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/asgeirtj-claude-api-in-prototypes/badge)](https://www.skillsdirectory.com/skills/asgeirtj-claude-api-in-prototypes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: claude-api-in-prototypes
description: "Call Claude from your HTML artifacts via window.claude.complete"
user-invocable: true
---

# Claude API in prototypes

Your HTML artifacts can call Claude via a built-in helper. No SDK or API key needed.

```html
<script>
(async () => {
  const text = await window.claude.complete("Summarize this: ...");
  // or with a messages array:
  const text2 = await window.claude.complete({
    messages: [{ role: 'user', content: '...' }],
  });
})();
</script>
```

Calls default to `claude-haiku-4-5` with a 1024-token output cap. The body may also set `model` (haiku/sonnet families only), `max_tokens` (up to 32000), `system`, `tool_choice`, and client `tools` — standard Messages API shapes, except each tool also carries `run: async (input) => string` and the helper executes tool calls in-page and loops (max 8 model calls), resolving with the final text. Handler throws become is_error tool_results. Server tools (web search etc.) are rejected; no streaming; rate-limited 15 calls/minute per user, loop iterations included. Shared artifacts run under the viewer's quota.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…