Agent Skillsasgeirtj/system_prompts_leaks › claude-api-in-prototypes

claude-api-in-prototypes

GitHub

提供在HTML原型中直接调用Claude API的内置助手,无需SDK或密钥。支持文本与消息数组格式,具备模型配置、工具调用及循环执行能力,适用于快速原型开发中的AI功能集成。

Anthropic/claude-design/skills/claude-api-in-prototypes/SKILL.md asgeirtj/system_prompts_leaks

Trigger Scenarios

需要在HTML原型中嵌入AI对话或总结功能 希望在不引入额外依赖的情况下快速测试Claude API

Install

npx skills add asgeirtj/system_prompts_leaks --skill claude-api-in-prototypes -g -y
More Options

Non-standard path

npx skills add https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-design/skills/claude-api-in-prototypes -g -y

Use without installing

npx skills use asgeirtj/system_prompts_leaks@claude-api-in-prototypes

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add asgeirtj/system_prompts_leaks --all -g -y

预览 repo 内 skill

npx skills add asgeirtj/system_prompts_leaks --list

SKILL.md

Frontmatter
{
    "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.

<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.

Version History

  • 481967c Current 2026-08-20 17:02

Same Skill Collection

Anthropic/claude-code/skills/artifact-diagramming/SKILL.md
Anthropic/claude-code/skills/batch/SKILL.md
Anthropic/claude-code/skills/claude-in-chrome/SKILL.md
Anthropic/claude-code/skills/debug/SKILL.md
Anthropic/claude-code/skills/deep-research/SKILL.md
Anthropic/claude-code/skills/design-sync/SKILL.md
Anthropic/claude-code/skills/fewer-permission-prompts/SKILL.md
Anthropic/claude-code/skills/init/SKILL.md
Anthropic/claude-code/skills/keybindings-help/SKILL.md
Anthropic/claude-code/skills/loop/SKILL.md
Anthropic/claude-code/skills/run-skill-generator/SKILL.md
Anthropic/claude-code/skills/run/SKILL.md
Anthropic/claude-code/skills/schedule/SKILL.md
Anthropic/claude-code/skills/security-review/SKILL.md
Anthropic/claude-code/skills/simplify/SKILL.md
Anthropic/claude-code/skills/verify/SKILL.md
Anthropic/claude-code/skills/workflow-authoring/SKILL.md
Anthropic/claude-cowork/setup-writing-style/SKILL.md
Anthropic/claude-design/skills/create-design-system/SKILL.md
Anthropic/claude-design/skills/frontend-design/SKILL.md
Anthropic/claude-design/skills/hi-fi-design/SKILL.md
Anthropic/claude-design/skills/maps-geography/SKILL.md
Anthropic/claude-design/skills/options/SKILL.md
Anthropic/claude-design/skills/wireframe/SKILL.md
Anthropic/claude-code/skills/artifact-capabilities/SKILL.md
Anthropic/claude-code/skills/artifact-design/SKILL.md
Anthropic/claude-code/skills/claude-api/SKILL.md
Anthropic/claude-code/skills/dataviz/SKILL.md
Anthropic/claude-code/skills/design/SKILL.md
Anthropic/claude-code/skills/doctor/SKILL.md
Anthropic/claude-code/skills/update-config/SKILL.md
Anthropic/claude-design/skills/3d-object/SKILL.md
Anthropic/claude-design/skills/animated-video/SKILL.md
Anthropic/claude-design/skills/export-as-pptx-editable/SKILL.md
Anthropic/claude-design/skills/export-as-pptx-screenshots/SKILL.md
Anthropic/claude-design/skills/flier/SKILL.md
Anthropic/claude-design/skills/handoff-to-claude-code/SKILL.md
Anthropic/claude-design/skills/html-email/SKILL.md
Anthropic/claude-design/skills/interactive-prototype/SKILL.md
Anthropic/claude-design/skills/make-a-deck/SKILL.md
Anthropic/claude-design/skills/make-a-doc/SKILL.md
Anthropic/claude-design/skills/make-tweakable/SKILL.md
Anthropic/claude-design/skills/save-as-pdf/SKILL.md
Anthropic/claude-design/skills/save-as-standalone-html/SKILL.md
Anthropic/claude-design/skills/web-research/SKILL.md

Metadata

Files
0
Version
a7d0a26
Hash
7875558b
Indexed
2026-08-20 17:02

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 05:52
浙ICP备14020137号-1 $Carte des visiteurs$