proofreader-api
Integrates browser-native Proofreader API into web applications for AI-powered text correction, grammar checking, and language support with managed model lifecycle.
Introduction
The Proofreader API skill provides a structured framework for implementing browser-based, AI-powered writing assistance. Designed for JavaScript and TypeScript web applications, this skill enables developers to integrate proofreading capabilities—such as grammar correction, spelling verification, and punctuation refinement—directly into the browser using built-in machine learning models. It is intended for software engineers and frontend developers building text editors, content management systems, or interactive forms who need to handle the complexities of model availability, secure-context requirements, and browser-specific preview implementation nuances.
-
Enables robust availability checks to determine if the Proofreader API can be initialized in the current browser environment.
-
Facilitates monitored model downloads, allowing UI components to track progress and update user states during asset acquisition.
-
Manages session lifecycle by handling session creation, abort signals, and cleanup to ensure efficient resource usage.
-
Supports configuration of input languages and fine-grained correction types like spelling, grammar, and punctuation.
-
Provides patterns for rendering corrected text outputs and structured metadata including correction explanations and range indexing.
-
Implements guarded wrappers that encapsulate the API surface, ensuring consistent behavior across different browser versions and preview flags.
-
Prioritize the use of provided helper scripts to inventory browser entry points and identify integration targets within your workspace.
-
Ensure all Proofreader operations occur within a secure context and check permissions-policy constraints before attempting session creation.
-
Always implement non-AI fallbacks for unsupported browsers, blocked frames, or devices that do not meet the minimum preview hardware and storage requirements.
-
Use the provided session templates to maintain strict typing and handle specific errors like NotAllowedError or NotSupportedError gracefully.
-
Note that session options are immutable; recreate sessions rather than attempting to mutate behaviors after initialization.
-
The skill includes troubleshooting references to address edge cases such as model deletion due to low storage or iframe-specific restrictions.
Repository Stats
- Stars
- 27
- Forks
- 1
- Open Issues
- 0
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 06:56 PM