beer-sakthai/sak-family-agent/saksee-broadcast-channel-api

Claude Code and agent skill by beer-sakthai/sak-family-agent

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Cross-context communication in the browser using Broadcast Channel API — same-origin messaging between tabs, windows, iframes, and service workers.

Install

npx vskill@latest install beer-sakthai/sak-family-agent/saksee-broadcast-channel-api

SKILL.md

Broadcast Channel API

Concept

The Broadcast Channel API allows same-origin contexts (tabs, windows, iframes, service workers) to send messages to each other by name. Unlike localStorage events or SharedArrayBuffer, it provides a clean publish/subscribe interface with no serialization constraints beyond the structured clone algorithm.

When to Use

  • Sync state across tabs for the same logged-in user (e.g., logout reflected everywhere)
  • Notify service workers or other windows about background updates
  • Coordinate multi-view editor or dashboard splits
  • Avoid polling or server round-trips when the update is local to the browser

Code Example

javascript
// sender.js — any same-origin context
const channel = new BroadcastChannel("app_updates");
channel.postMessage({ type: "THEME_CHANGED", theme: "dark" });
// receiver.js — any other same-origin context
const channel = new BroadcastChannel("app_updates");
channel.onmessage = (event) => {
if (event.data.type === "THEME_CHANGED") {
document.documentElement.setAttribute("data-theme", event.data.theme);
}
};
// Cleanup
channel.close();

Pitfalls

  • Only works within the same origin (protocol + host + port).
  • Messages are lost if no receiver is listening at send time.
  • Use channel.name carefully; collisions can cause unexpected cross-app noise in dev environments.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
Repository forks
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/beer-sakthai/sak-family-agent/saksee-broadcast-channel-api/badge)](https://verified-skill.com/skills/beer-sakthai/sak-family-agent/saksee-broadcast-channel-api)

Something wrong with this skill or its page? Tell us.