Skip to content
Back to skills

C2f Preview Modals System

ASecurity

READ BEFORE implementing or editing live-preview modals in the editor. Prevents panel-style leakage, iframe rendering failures and Content Security Policy problems.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentjavascriptjavasecurity

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add otavioserra/conn2flow-ai-workspace --skill c2f-preview-modals-system --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of C2f Preview Modals System?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for C2f Preview Modals System
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/otavioserra-c2f-preview-modals-system-conn2flow-ai-workspace/badge)](https://www.skillsdirectory.com/skills/otavioserra-c2f-preview-modals-system-conn2flow-ai-workspace)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: c2f-preview-modals-system
description: "READ BEFORE implementing or editing live-preview modals in the editor. Prevents panel-style leakage, iframe rendering failures and Content Security Policy problems."
user-invocable: false
---

# Preview and Knowledge Modal System (`CONN2FLOW-PREVIEW-MODALS-SYSTEM.md`)

## Preview Inspection with Chrome DevTools MCP

In the local `c2f-agent-visual-inspection` sandbox, get `take_snapshot`, open the preview through the interface and wait for the iframe to load. Capture `take_screenshot` on desktop/mobile; measure modal, overlay and iframe with `getBoundingClientRect()` by `evaluate_script` read-only. Check clipping, scroll, focus, Escape/close and reopen without duplicated overlays or iframes.

Compare the appearance of the isolated content with the original page to detect CSS leak from the panel. Inspect the internal document only when same-origin allows; for cross-origin, evaluate external dimensions, screenshot and console messages. Use `list_console_messages`/`get_console_message` and `list_network_requests`/`get_network_request` to identify CSP, blocked features and HTTP crashes. Register access limitations without deactivating CSP or iframe isolation.

# ⚡ MANDATORY TRIGGER
- **TRIGGER**: Implement or modify modals that render components, templates or pages in preview mode within Gestor.
- **SKIP ONLY IF**: Simple dialog modes (warnings, simple confirmations) that do not render third party HTML content.
- **CONSEQUENCE OF IGNORING**: CSS pollution of the administrative panel on the pre-visualized component, failure in the calculation of height of the iframe or blocks of CORS.

---

See and apply the following conventions for creating and displaying dynamic modals on Conn2Flow:

## 1. Preview Modals in Gestor

* **Purpose**: Display real-time preview of pages, layouts, components or contents generated by AI before final publication.
* **Injection of Modal Semantic IU**:
  ```html
  <div class="ui modal" id="modal-preview-recurso">
      <i class="close icon"></i>
      <div class="header">Pré-visualização do Recurso</div>
      <div class="scrolling content">
          <iframe id="iframe-preview" src="about:blank"></iframe>
      </div>
  </div>
  ```

---

## 2. Call via JavaScript

```javascript
function abrirPreviewRecurso(urlPreview) {
    $('#iframe-preview').attr('src', urlPreview);
    $('#modal-preview-recurso').modal('show');
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.