Receber por email
← Voltar para o catálogo

inspect-element

Read and return detailed information about selected elements from the Design Mode overlay. Use when the user says 'what did I select', 'inspect element', 'show element details', 'read element', 'what element is that', 'show me element info', or references an element from the overlay.

8estrelas
Atualizado há 2 meses

Ver no GitHub ↗

Como adicionar

/plugin marketplace add harshkedia177/design-mode

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/inspect-element/svg)](https://www.skillteca.com.br/skills/inspect-element)
#ai

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Inspect Element — Read Design Mode State

Read element data from the Design Mode overlay to provide detailed information about selected or specific elements.

Read a Specific Element by Selector

Use mcp__design-mode__read_element with the CSS selector. Returns computed styles, box model, source file mapping, and text content.

Read All Annotations

Use mcp__design-mode__read_annotations. Returns all user annotations with full element data (styles, box model, source info, comments).

Read Selected Elements (via eval)

If you need custom queries, use mcp__design-mode__eval_js:

JSON.stringify((() => {
  if (!window.__designMode) return { error: 'Design Mode not active' };
  const selected = [];
  window.__designMode.elements.forEach((e, id) => {
    if (e.selected) selected.push({ id, selector: e.selector, tagName: e.tagName, componentName: e.componentName, sourceFile: e.sourceFile, text: e.text.slice(0, 50), annotation: e.annotation });
  });
  return selected;
})())

Source File Lookup

To locate the source file for an element, follow the priority order in ../references/source-lookup.md.

Tips

  • Prefer the MCP tools (read_element, read_annotations) over raw eval — they handle errors and are faster.
  • For custom queries beyond what the MCP tools provide, use mcp__design-mode__eval_js.
  • If Design Mode is not active, the MCP tools return a clear error message.
  • Take a screenshot with mcp__design-mode__screenshot to see the current state visually.
Compartilhar X LinkedIn