
Prompt Api
This skill handles browser Prompt API integrations when you're adding on-device AI to a web app. It walks through availability checks, session lifecycle, streaming versus one-shot prompts, structured output with JSON Schema, download progress UX, and iframe permission policy. The template service wrapper and step-by-step procedures keep you from shipping code that breaks in cross-origin iframes or mishandles the downloading state. It's opinionated about treating availability checks as passive capability detection rather than app-owned busy states, which matches the spec intent but isn't obvious from the API shape alone. Useful if you're implementing the Prompt API for the first time and want to avoid the common traps around context, modalities, and secure contexts.
- skills.sh installs
- 146
- GitHub stars
- 31
- last updated
- Jun 3, 2026
Install
$ npx -y skills add webmaxru/agent-skills --skill prompt-api --agent claude-codeInstalls into .claude/skills of the current project.
Files
Prompt API
Procedures
Step 1: Identify the integration surface
- Inspect the workspace for browser entry points, UI handlers, and any existing AI abstraction layer.
- Execute
node scripts/find-frontend-targets.mjs .to inventory likely frontend files and existing Prompt API usage when a Node runtime is available. - If a Node runtime is unavailable, inspect the nearest
package.json, HTML entry point, and framework entry files manually to identify the browser app boundary. - If the workspace contains multiple frontend apps, prefer the app that contains the active route, component, or user-requested feature surface.
- If the inventory still leaves multiple plausible frontend targets, stop and ask the user which app should receive the Prompt API integration.
- If the project is not a browser web app, stop and explain that this skill does not apply.
Sponsors
Details
- Repository
- github.com/webmaxru/agent-skills
- Categories
- Backend & APIs, AI & Agent Building
- First seen
- Jun 3, 2026