Help us improve
Share bugs, ideas, or general feedback.
From web-ai-skills
Implements browser Summarizer, Writer, and Rewriter APIs in JS/TS web apps. Handles availability checks, model download UX, session creation, streaming, abort, and permissions-policy constraints.
npx claudepluginhub webmaxru/ai-native-dev --plugin web-ai-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/web-ai-skills:writing-assistance-apisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Step 1: Identify the browser integration surface**
Implements and debugs browser Proofreader API integrations in JavaScript/TypeScript web apps. Handles availability checks, monitored model downloads, proofread flows, correction metadata, and permissions-policy configuration.
Builds Manifest V3 browser extensions emphasizing service worker persistence (alarms, offscreen API, storage), side panels, security, and cross-browser support.
Calls AI models (DeepSeek, Hunyuan, GLM, Kimi, MiniMax) from browser/Web apps via @cloudbase/js-sdk with generateText and streamText. Default for frontend AI. Do NOT propose Node.js proxy.
Share bugs, ideas, or general feedback.
Step 1: Identify the browser integration surface
node scripts/find-writing-assistance-targets.mjs . to inventory likely frontend files and existing Summarizer, Writer, or Rewriter usage when a Node runtime is available.package.json, HTML entry point, and framework bootstrap files manually to identify the browser app boundary.Step 2: Confirm API viability and choose the right surface
references/writing-assistance-reference.md before writing code.references/examples.md when the feature needs a session shape for monitoring downloads, batch output, streaming output, or cancellation.references/compatibility.md when preview flags, browser channels, hardware requirements, or iframe constraints matter.references/troubleshooting.md when availability checks, creation, streaming, or session cleanup fail.Window context and that the relevant permissions-policy feature allows access from the current frame.Summarizer for article, document, or conversation summaries.Writer for generating new text from a short prompt or writing task.Rewriter for transforming existing text while preserving its intent.Step 3: Implement a guarded session wrapper
assets/writing-assistance-session.template.ts and adapt it to the framework, state model, and file layout in the workspace.availability() method using the same create options that will be used at runtime.availability() as a capability check, not a guarantee that creation will succeed without user interaction or download time.monitor option during create() when the UI needs download progress.AbortController for cancelable create and run calls, and call destroy() when the session is no longer needed.Step 4: Wire UX and fallback behavior
sharedContext only for persistent session-wide guidance, and pass per-call context only for request-specific background detail.Step 5: Validate behavior
node scripts/find-writing-assistance-targets.mjs . to confirm that the intended app boundary and API markers still resolve to the edited integration surface.availability() behavior before debugging deeper runtime failures.references/compatibility.md before treating failures as application bugs.Summarizer, Writer, or Rewriter is missing, keep a non-AI fallback and confirm that the environment satisfies the browser and preview requirements before changing product logic.availability() returns downloadable or downloading, require user-driven session creation before promising that generation is ready.create() throws NotAllowedError, check permissions-policy constraints, missing user activation for downloads, browser policy restrictions, or user rejection.create() or a run call throws NotSupportedError, align the requested languages, output format, summary type, tone, or length with the browser's supported combinations.QuotaExceededError, shrink sharedContext, per-call context, or the user input before retrying.