Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Josh-E-S/awesome-pexip-skillsnpx agentmods add skills/josh-e-s/awesome-pexip-skills/browser-close-confirmationWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/josh-e-s/awesome-pexip-skills/browser-close-confirmation)<a href="https://agentmods.dev/skills/josh-e-s/awesome-pexip-skills/browser-close-confirmation"><img src="https://agentmods.dev/badge/skills/josh-e-s/awesome-pexip-skills/browser-close-confirmation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/josh-e-s/awesome-pexip-skills/browser-close-confirmation"><img src="https://agentmods.dev/badge/skills/josh-e-s/awesome-pexip-skills/browser-close-confirmation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.01670 |
| Opus 5 | $0.00034 | $0.00835 |
| Sonnet 5 | $0.00013 | $0.00334 |
| Haiku 4.5 | $0.00007 | $0.00167 |
Grade A, and why
browser-close-confirmation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pexip browser-close confirmation
The browser's beforeunload hook gives you the standard "Reload site? Changes you made may not be saved" prompt. For a video call, that's exactly what you want when the user accidentally closes the tab — interrupting an active call should require confirmation.
But the implementation has nuance: browsers handle beforeunload differently across versions, the user can toggle the preference mid-call, and disconnectDestination redirects can fight with the prompt. This skill captures the right wiring.
The handler — both modern and legacy patterns
const preventBrowserCloseHandler = (event: BeforeUnloadEvent) => {
// Modern (recommended) — calling preventDefault triggers the prompt
event.preventDefault();
// Legacy support for Chrome/Edge < 119
event.returnValue = true;
};
Both lines are needed. The W3C spec says preventDefault() is enough; older Chrome/Edge required returnValue to be truthy. Including both is the no-regret default.
You can't customize the message — modern browsers ignore any string you set. The prompt is browser-controlled and locale-aware.
The hook
import {useEffect} from 'react';
import {config} from '../config';
import {BrowserCloseConfirmation} from '../types';
import {useBrowserCloseConfirmationConfig} from './useBrowserCloseConfirmationConfig';
export const useBrowserCloseConfirmation = () => {
const {shouldShowBrowserCloseConfirmation} = useBrowserCloseConfirmationConfig();
// Initial wiring: register based on the current config
useEffect(() => {
if (shouldShowBrowserCloseConfirmation) {
window.addEventListener('beforeunload', preventBrowserCloseHandler);
}
return () => {
window.removeEventListener('beforeunload', preventBrowserCloseHandler);
};
}, [shouldShowBrowserCloseConfirmation]);
// React to user toggling the preference mid-call
useEffect(() =>
config.subscribe('browserCloseConfirmation', browserClosePrevention => {
if (browserClosePrevention === BrowserCloseConfirmation.Enabled) {
window.addEventListener('beforeunload', preventBrowserCloseHandler);
} else {
window.removeEventListener('beforeunload', preventBrowserCloseHandler);
}
}),
[]);
};
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 151 lines · 67 tokens per session scan A 27c257ce184b
browser-close-confirmation is a skill published in the GitHub repository Josh-E-S/awesome-pexip-skills (1 stars, last pushed 3mo ago), licensed MIT. It adds 67 tokens to every session and 1,670 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
playwright-component-testing
Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.
next-dev-loop
Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines /next/mcp (Next.js's view) with agent-browser (the browser's view). Requires a running next dev.
next-partial-prefetching-optimizer
Optimize what selected Next.js client navigations include before the click under Partial Prefetching. Use after Cache Components and Partial Prefetching are adopted when the user wants selected URL-specific UI to be instant, wants reusable content to wait for navigation, or needs to choose between default, viewport…