CommunityCoding & Developmentgithub.com

EZHU331/agent-skills

>- Submit temporary Google Search Console URL removals for a property the user owns, including exact URLs and prefix removals, from a CSV. Use when the user asks to bulk-remove, deindex, or hide their own URLs in Search Console Removals, or to turn a removal list into New Request submissions.

What is agent-skills?

agent-skills is a Claude Code agent skill that >- Submit temporary Google Search Console URL removals for a property the user owns, including exact URLs and prefix removals, from a CSV. Use when the user asks to bulk-remove, deindex, or hide their own URLs in Search Console Removals, or to turn a removal list into New Request submissions.

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

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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.

Related Skills