AGENT SKILL

claude-api-in-prototypes

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

License 许可
MIT
最近更新
2026-08-24
Stars
★ 0
Forks
0

01 前言 Front Matter

name
claude-api-in-prototypes
description
Call Claude from your HTML artifacts via window.claude.complete
user-invocable
true

03 SKILL.md 正文

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.

04 同仓库更多 Skills

Neuroca-Inc
Neuroca-Inc/Perfect_Prompts

{{SKILL_ID}}

{{ONE_SENTENCE_ACTIVATION_DESCRIPTION}}

★ 0
Neuroca-Inc
Neuroca-Inc/Perfect_Prompts

session-handoff

Generate rigorous, multi-artifact session handoff packages that preserve full context for zero-loss context switching between AI sessions. Use this skill whenever the user asks to: save session state, create a handoff, package context for a new session, summarize and preserve a conversation for later, do a session dump, create a context transfer, prepare a state snapshot, export session knowledge, hand off to another agent, persist session memory, "wrap up" or "save where we are", create a knowledge package, synthesize session context, or produce a resumption artifact. Also trigger when the user says things like "save this for next time", "capture everything we discussed", "I need to pick this up later", "package this session", "make sure nothing is lost", "create a handoff document", "session export", "context preservation", or any variant of persisting conversational and working state. Even if the user just says "handoff" or "save state" — use this skill.

★ 0
Neuroca-Inc
Neuroca-Inc/Perfect_Prompts

vdm-publication-bundle

Generate, audit, and validate complete VDM research bundles following theorem-bearing manuscript standards. Use this skill when the user wants to: create a research bundle, Lean4 package from formal claims, SymPy adversarial symbolic audit script, a skeptical-reviewer Jupyter notebook, score papers w/ CRAFT/BASS review metrics, audit burden coverage, generate SHA256 manifests, create figures following standards, scaffold a new Complete Formalism publication from claims, or check whether existing bundles meet certificate requirements. Also trigger when the user mentions "publication bundle","validation bundle","CRAFT score","BASS score","burden coverage","claim attack","gate check","reviewer notebook","adversarial audit","publication certificate","closure certificate","artifact manifest", "figure standards", "review-ready", or any CF/CFN publication workflow. Even if the user just says "score this paper"/"check if this is publication-ready", use this skill.

★ 0
Neuroca-Inc
Neuroca-Inc/Perfect_Prompts

pdf

Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as `reportlab`, `pdfplumber`, and `pypdf` for generation and extraction.

★ 0
Neuroca-Inc
Neuroca-Inc/Perfect_Prompts

pdf

Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as `reportlab`, `pdfplumber`, and `pypdf` for generation and extraction.

★ 0
Neuroca-Inc
Neuroca-Inc/Perfect_Prompts

template-skill

Replace with description of the skill and when Claude should use it.

★ 0