iframe

A guide to creating widgets that run inside an iframe, an embedded webpage area hosted by another site. The widget is isolated from the parent page and must follow cross-origin browser restrictions.

In plain words
What is it for?
Use it when serving a widget at a URL for embedding in another website, especially when planning its layout, communication, and browser security behavior.
Why use it?
It prevents mistakes caused by treating an embedded widget like a normal desktop window, notebook, or main webpage. It clarifies the limits of the embedded environment.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/deeleeramone/pywry/iframe
Any agent
npx skills add deeleeramone/PyWry --skill iframe
Clone the repo
git clone --depth 1 https://github.com/deeleeramone/PyWry

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,710 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01710
Opus 5 $0.00000 $0.00855
Sonnet 5 $0.00000 $0.00342
Haiku 4.5 $0.00000 $0.00171

Measured 2d ago against content hash 1c8803cbe3b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

iframe 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 2d 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.

pywry/pywry/mcp/skills/iframe/SKILL.md · 265 lines

How it starts

The opening of the file, as written. The whole thing — 265 lines — stays where its author put it; the contents beside it link to each section on GitHub.

iFrame Embed Mode

CRITICAL: This mode is for widgets embedded as iframes in external web pages. This is NOT a native window. This is NOT Jupyter. The widget is sandboxed.

What iFrame Mode IS

You're creating widgets to be embedded as iframes in external pages:

  • Widget served at a URL: http://host:port/widget/{widget_id}
  • Embedded via <iframe src="..."> in parent page
  • Sandboxed execution - isolated from parent
  • Cross-origin restrictions apply

What iFrame Mode is NOT

NOT a native window - No OS integration, no native dialogs ❌ NOT Jupyter - No kernel, no notebook context ❌ NOT the main page - You're embedded, constrained by parent

Architecture

┌───────────────────────────────────────────────────────────────────┐
│                   Parent Web Page (any origin)                    │
│                                                                   │
│   <iframe src="http://pywry-server:port/widget/abc123"            │
│           width="100%" height="500">                              │
│     ┌───────────────────────────────────────────────────────┐     │
│     │              PyWry Widget (sandboxed)                 │     │
│     │                                                       │     │
│     │    ┌───────────────────────────────────────────┐      │     │
│     │    │        Your Content (HTML/CSS/JS)         │      │     │
│     │    └───────────────────────────────────────────┘      │     │
│     │                                                       │     │
│     │    [Toolbars, Charts, Forms, etc.]                    │     │
│     │                                                       │     │
│     └───────────────────────────────────────────────────────┘     │
│   </iframe>                                                       │
│                                                                   │
│   Other page content...                                           │
└───────────────────────────────────────────────────────────────────┘
                   ↕ postMessage for communication

Read the full file on GitHub · 265 lines

Changes

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.

  1. 2d ago First seen · 265 lines · 0 tokens per session scan A 1c8803cbe3b9

Subscribe to this mod's changes

iframe is a skill published in the GitHub repository deeleeramone/PyWry (93 stars, last pushed 8d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,710 tokens. 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-30.

Related

Other skills, from other repositories

verify-worldmonitor

Launch and drive the WorldMonitor browser dashboard (Vite app at /dashboard) to prove user-facing behavior with screenshots and transcripts. Use when a change needs proof in the real app rather than only unit tests — panels, map layers, settings, search, country briefs, boot — or when asked to run, screenshot, or…

koala73/worldmonitor · 73 tokens

playwright-mcp-metabase

Drive Metabase's UI with the Playwright MCP browser tools (mcpplaywrightbrowser). Covers the snapshot/act/check pattern, Mantine component pitfalls (Menu race, Select/MultiSelect, the Escape-closes-modal trap, portal scoping), and Metabase-specific login flows. Use whenever a session needs to interact with the…

metabase/metabase · 85 tokens

browser-use

Drive agentglass's built-in browser — the one already signed in to the sites this project uses. Use when a task needs a page behind a login (a dashboard, a ticket, a staging app), when a URL fetched with curl comes back signed out or JavaScript-rendered, or when the user asks you to look at, click through, or…

SirAllap/agentglass · 80 tokens

investigate

Investigate a URL or page using Playwright browser.

dlupiak/claude-session-dashboard · 13 tokens

wfdash

Serve wayfinder maps held in GitHub Issues as a local browser dashboard — one map drawn as a dependency DAG, plus an overview of every map across every repo. Use when the user asks what to work on next, wants to see a map's shape or frontier, wants to read a resolved ticket's decision, or types /wfdash. Also use for…

mingrath/wfdash · 96 tokens

rebrand

Rebrand the app — change the product name, logo, description, theme, and navigation. Use when porting this template into a new product.

ahpxex/open-dashboard · 33 tokens