EZHU331/agent-skills

Envie remoções temporárias de URL do Google Search Console para uma propriedade que o usuário possui, incluindo remoções de URLs exatas e por prefixo, a partir de um CSV. Use quando o usuário solicitar remoção em massa, desindexação ou ocultação de suas próprias URLs na página de Remoções do Search Console, ou para converter uma lista de remoções em novos pedidos.

O que é agent-skills?

Esta habilidade automatiza o envio de remoções temporárias de URLs (que duram cerca de seis meses e não impedem o rastreamento) na página de Remoções do Google Search Console, a partir de uma lista CSV contendo URLs e modos de remoção (prefixo ou exato). Ela é útil para desenvolvedores e proprietários de sites que precisam ocultar rapidamente grandes conjuntos de URLs próprios, sem depender de remoção permanente (que exige 404, 410 ou noindex). A habilidade funciona exclusivamente no Google Search Console e requer que o usuário esteja autenticado como proprietário da propriedade. O processo envolve abrir a página de remoções, definir uma fila de URLs e modos via `window.__GSC_QUEUE`, além de listas de negação (`window.__GSC_DENY`) e hosts permitidos (`window.__GSC_ALLOW_HOSTS`), e então injetar um script (`scripts/submit-removals.js`) que interage com os diálogos da interface – preenchendo o campo de URL, selecionando o modo de remoção e confirmando o envio. A habilidade respeita as regras de diálogo do Search Console, como não enviar remoções já ativas, verificar se a confirmação corresponde ao modo solicitado e não clicar em Cancelar enquanto o diálogo estiver processando. O progresso é mantido em `localStorage`, permitindo retomada posterior, e a execução para após seis falhas consecutivas, reportando contagens e detalhes dos erros. Plataformas suportadas: navegador com perfil autenticado no Google Search Console.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/EZHU331/agent-skills/tree/HEAD/skills/search-console-url-removals

Installed? Explore more Programação e Desenvolvimento skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Search Console URL removals

Submit temporary removals on the signed-in Removals page for a property the user owns. There is no bulk removals endpoint to call from the page. Drive the New Request dialog, and cancel anything whose confirmation does not match the requested mode.

A successful removal lasts about six months. It does not stop crawling. Permanent removal still needs a live 404, 410, or noindex on that URL.

When to use

Use this when the user has a verified Search Console property and a list of their own URLs to hide temporarily.

Do not use it for a property the user does not control. Do not remove an entire host, or a prefix that still contains live pages, unless the user names that exact prefix and confirms it.

Input

Expect a CSV with URL and Removal mode.

  • Remove all URLs with this prefix becomes prefix
  • Remove this URL only becomes exact

Before submitting, collect two lists from the user:

  • deny: prefixes that must not be removed, including live trees that share a path with retired URLs
  • allowHosts: hosts the user explicitly agreed to remove entirely. Leave this empty unless they did

Skip removals already active in the Removals table. An exact removal of a host root is not the same request as a prefix of that host. Do not submit the prefix unless the user asked for it, and do not submit it when the confirmation is not a prefix confirmation.

Run

  1. Open https://search.google.com/search-console/removals?resource_id= plus the property id, on a browser profile that is already signed in as an owner.
  2. Stay on that tab. Do not follow other Search Console navigation while a run is in progress.
  3. Set window.__GSC_QUEUE to { url, mode } objects, window.__GSC_DENY to the deny list, and window.__GSC_ALLOW_HOSTS to the allow list.
  4. Inject scripts/submit-removals.js. If the injection channel is small, assign the queue in chunks, then eval the script.
  5. Leave the tab open until window.__gscState.finished is true. The overlay Stop button sets window.__gscStop.

Search Console requires TrustedHTML. Do not assign innerHTML. Build any status UI with createElement and textContent.

If JavaScript from outside the page is refused, turn on View > Developer > Allow JavaScript from Apple Events, or paste the script in DevTools on that tab. The script only works while that Removals document is open.

Dialog rules

The request dialog is the visible .g3VIld[role=dialog]. Other role=dialog nodes on the page are tooltips and the navigation drawer.

  • Click the [role=button] whose text is NEW REQUEST, NEXT, SUBMIT REQUEST, or CANCEL.
  • Set the URL with the native HTMLInputElement value setter, then dispatch input and change. Writing .value alone leaves Next disabled.
  • The mode control is [role=radio] with empty text. Click its parent, whose text is Remove this URL only or Remove all URLs with this prefix.
  • Submit only when the confirmation contains the exact URL. Prefix mode must also contain Remove all URLs with this prefix?. Exact mode must not.
  • If the confirmation does not match, click Cancel and record a failure. A host-root prefix often confirms as a single URL. Do not submit that as if it were a prefix.
  • Do not click Cancel while the dialog says Submitting request. Wait for it to close.
  • Text that says the URL is already removed counts as done, not as a new failure.

Resume

Progress is stored in localStorage under a key derived from the property id. A later run skips entries that are not failures. Clear that key only when the user wants a clean run.

Stop after six consecutive failures. Report submitted, skipped, and failed counts, plus the failed URLs and the dialog text. Do not invent a quota. If requests start failing, stop and show the error.

Habilidades Relacionadas