MCPInstall

writing-assistance-apis

Implements and debugs browser Summarizer, Writer, and Rewriter integrations in JavaScript or TypeScript web apps. Use when adding availability checks, model download UX, session creation, summarize or write or rewrite flows, streaming output, abort handling, or permissions-policy constraints for built-in writing assistance APIs. Don't use for generic prompt engineering, server-side LLM SDKs, or cloud AI services.

Installs
478
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/webmaxru/web-ai-agent-skills --skill writing-assistance-apis
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads writing-assistance-apis automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Writing Assistance APIs

Procedures

Step 1: Identify the browser integration surface

  1. Inspect the workspace for browser entry points, UI handlers, and any existing AI abstraction layer.
  2. Execute 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.
  3. If a Node runtime is unavailable, inspect the nearest package.json, HTML entry point, and framework bootstrap files manually to identify the browser app boundary.
  4. If the workspace contains multiple frontend apps, prefer the app that contains the active route, component, or user-requested feature surface.
  5. If the inventory still leaves multiple plausible frontend targets, stop and ask which app should receive the Writing Assistance API integration.
  6. If the project is not a browser web app, stop and explain that this skill does not apply.

Step 2: Confirm API viability and choose the right surface

  1. Read references/writing-assistance-reference.md before writing code.
  2. Read references/examples.md when the feature needs a session shape for monitoring downloads, batch output, streaming output, or cancellation.
  3. Read references/compatibility.md when preview flags, browser channels, hardware requirements, or iframe constraints matter.
  4. Read references/troubleshooting.md when availability checks, creation, streaming, or session cleanup fail.
  5. Verify that the feature runs in a secure Window context and that the relevant permissions-policy feature allows access from the current frame.
  6. Choose the narrowest surface that matches the task:
    • 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.
  7. If the feature must run in a worker, on the server, or against a remote model provider, stop and explain the platform mismatch.
  8. If the project uses TypeScript, add or preserve typings that cover the specific browser APIs used by the feature.

Step 3: Implement a guarded session wrapper

  1. Read assets/writing-assistance-session.template.ts and adapt it to the framework, state model, and file layout in the workspace.
  2. Gate session creation behind the API's availability() method using the same create options that will be used at runtime.
  3. Treat availability() as a capability check, not a guarantee that creation will succeed without user interaction or download time.
  4. Create sessions only after user activation when creation may initiate a download.
  5. Use the monitor option during create() when the UI needs download progress.
  6. Use AbortController for cancelable create and run calls, and call destroy() when the session is no longer needed.
  7. Recreate the session instead of mutating options after creation; session options are fixed per instance.
  8. If the feature lives in a cross-origin iframe, require explicit delegation for each API that the frame needs.

Step 4: Wire UX and fallback behavior

  1. Surface distinct states for missing APIs, unavailable devices, downloadable or downloading models, ready sessions, in-flight generation, and aborted work.
  2. Keep a non-AI fallback for unsupported browsers, blocked frames, or devices that do not meet the current preview requirements.
  3. Strip or normalize HTML before summarization or rewriting when the source text comes from rendered page content.
  4. Use the batch methods when the feature needs the full result before continuing, and use the streaming methods when the UI should reveal output incrementally.
  5. Pass sharedContext only for persistent session-wide guidance, and pass per-call context only for request-specific background detail.
  6. Keep language options explicit when the feature depends on supported input, context, or output languages.
  7. Do not route generic chatbot, tool-calling, or open-ended assistant tasks through these APIs; switch to the Prompt API or another approved capability when the task is not summarization, writing, or rewriting.

Step 5: Validate behavior

  1. Execute node scripts/find-writing-assistance-targets.mjs . to confirm that the intended app boundary and API markers still resolve to the edited integration surface.
  2. Verify feature detection, secure-context checks, and availability() behavior before debugging deeper runtime failures.
  3. Test at least one batch call and one streaming call when the feature exposes both modes.
  4. Confirm that cancellation stops generation cleanly and that destroyed sessions are not reused.
  5. If the target environment depends on preview browser flags or channel-specific behavior, confirm the required browser state from references/compatibility.md before treating failures as application bugs.
  6. Run the workspace build, typecheck, or tests after editing.

Error Handling

  • If 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.
  • If availability() returns downloadable or downloading, require user-driven session creation before promising that generation is ready.
  • If create() throws NotAllowedError, check permissions-policy constraints, missing user activation for downloads, browser policy restrictions, or user rejection.
  • If create() or a run call throws NotSupportedError, align the requested languages, output format, summary type, tone, or length with the browser's supported combinations.
  • If a call throws QuotaExceededError, shrink sharedContext, per-call context, or the user input before retrying.
  • If the feature must run in a worker or server context, stop and explain that the Writing Assistance APIs are window-only browser APIs.

FAQ

What does the writing-assistance-apis skill do?

Implements and debugs browser Summarizer, Writer, and Rewriter integrations in JavaScript or TypeScript web apps. Use when adding availability checks, model download UX, session creation, summarize or write or rewrite flows, streaming output, abort handling, or permissions-policy constraints for built-in writing assistance APIs. Don't use for generic prompt engineering, server-side LLM SDKs, or cloud AI services.

How do I install writing-assistance-apis?

Run npx skills add https://github.com/webmaxru/web-ai-agent-skills --skill writing-assistance-apis in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/writing-assistance-apis/ (personal) or .claude/skills/writing-assistance-apis/ (project).

Which AI agents can use writing-assistance-apis?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is writing-assistance-apis safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains writing-assistance-apis?

It is published by webmaxru in webmaxru/web-ai-agent-skills. It has 478 recorded installs.

More from webmaxru/web-ai-agent-skills

View all →

webmcp

webmaxru/web-ai-agent-skills

Implements and debugs browser WebMCP integrations in JavaScript or TypeScript web apps. Use when exposing imperative tools through document.modelContext (with a navigator.modelContext fallback), annotating HTML forms for declarative tools, handling agent-invoked form flows, or validating WebMCP behavior in the current Chrome preview. Don't use for server-side MCP servers, REST tool backends, or non-browser providers.

AI & Agents518 installs

language-detector-api

webmaxru/web-ai-agent-skills

Implements and debugs browser Language Detector API integrations in JavaScript or TypeScript web apps. Use when adding LanguageDetector support checks, availability and model download flows, session creation, detect() calls, input-usage measurement, permissions-policy handling, or compatibility fallbacks for built-in language detection. Don't use for server-side language detection SDKs, cloud translation services, or generic NLP pipelines.

Backend & APIs478 installs

github-agentic-workflows

webmaxru/web-ai-agent-skills

Authors, reviews, installs, and debugs GitHub Agentic Workflows in repositories, including workflow markdown, frontmatter, gh aw compile and run flows, safe outputs, security guardrails, and operational patterns. Use when creating or maintaining GH-AW automation. Don't use for standard deterministic GitHub Actions YAML, generic CI pipelines, or non-GitHub automation systems.

AI & Agents474 installs

proofreader-api

webmaxru/web-ai-agent-skills

Implements and debugs browser Proofreader API integrations in JavaScript or TypeScript web apps. Use when adding Proofreader availability checks, monitored model downloads, proofread flows, correction metadata handling, or permissions-policy checks for built-in proofreading. Don't use for generic prompt engineering, server-side LLM SDKs, or cloud AI services.

Backend & APIs473 installs

translator-api

webmaxru/web-ai-agent-skills

Open the skill to read its SKILL.md instructions.

Backend & APIs471 installs

webnn

webmaxru/web-ai-agent-skills

Implements and debugs browser Web Neural Network API integrations in JavaScript or TypeScript web apps. Use when adding navigator.ml checks, MLContext creation, MLGraphBuilder flows, device selection, tensor dispatch and readback, or explicit fallback paths to ONNX Runtime Web or other local runtimes. Don't use for model training, server-side ML inference, or cloud AI APIs.

AI & Agents466 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs