Skip to main content
browser-common

Small, tree-shakeable TypeScript wrappers around 40+ browser Web APIs.

import {
isClipboardApiAvailable,
copyToClipboard,
} from '@rtorcato/browser-common/clipboard'

if (isClipboardApiAvailable()) {
await copyToClipboard('hello world')
}
npm install @rtorcato/browser-common

Use with AI

A skill ships with the package so coding agents use browser-common correctly — whichever tool you're in.

Read the rules →
Any coding agent
Pull the skill into any tool the skills CLI supports.
npx skills add https://github.com/rtorcato/browser-common --skill browser-common
Claude Code
The repo is its own plugin marketplace — add it, then install the skill.
/plugin marketplace add rtorcato/browser-common
/plugin install browser-common@browser-common
Cursor, Copilot, Codex
They read AGENTS.md. It ships in the npm tarball, so it is already in your node_modules.
node_modules/@rtorcato/browser-common/AGENTS.md
Tiny per-module imports
Tiny per-module imports
Under 1 kB brotlied per subpath. Tree-shake to just the bytes you use.
Safe by default
Safe by default
Every module exports `is<Name>Available()`. Operations never throw on unsupported runtimes.
TypeScript-first
TypeScript-first
Strict types, generics preserved, JSDoc-rich in your IDE. Zero runtime dependencies.
44 Web APIs covered
44 Web APIs covered
One subpath per spec — clipboard, geolocation, storage, observers, and 40 more.

One subpath per Web API

Eight focused categories. 44 modules. Import exactly what you need.

View all modules →

Sibling projects

More from @rtorcato — same conventions, same release pipeline.