netlify-bot-shield
Shut the doors bots knock on, like /.env and /.git/config, on any Netlify site.
Claude Code skill
My Netlify analytics were full of bots asking for /.env, /config/.env and /laravel/.env, files my sites never had. This skill answers those requests before the site's code runs, so they stop filling the not found list and stop starting server functions.
What it does
- Reads the repo's Netlify setup: the base and publish folders, the build's ignore rule, existing edge functions and middleware.
- Checks the build first for secret files that really are public, such as a .env in the public folder, and stops to tell you if it finds one.
- Adds one edge function that answers about 20 kinds of probe, from .env files and .git folders to WordPress logins, PHP pages and backups, with an empty 403.
- Leaves out any pattern that matches a real page or file on your site, and says which.
- Proves it on Netlify's local server with a probe script: every probe blocked, your real pages still loading, lookalike paths untouched.
- Explains how to see real visitors: Netlify Observability's browser filter, and an optional free counter that needs no cookie banner.
How it's built
- It never blocks crawlers or browsers by name, so search engines, AI search and your own scripts keep working.
- The edge function runs only on the probe paths, never on your normal pages, and answers with an empty body, so a probe costs no bandwidth.
- It is honest about analytics: blocking probes clears the not found list, but bots that read your real pages still count as pageviews.
Try it
Install it in Claude Code:
/plugin marketplace add Ibrahim-ElKhansa/claude-code-skills
/plugin install netlify-bot-shield@ibrahim-elkhansa/netlify-bot-shieldShields the repo you are in./netlify-bot-shield <repo path>Shields another repo on your computer.
Installed this way, it runs as /netlify-bot-shield:netlify-bot-shield. You can also copy its folder from GitHub to ~/.claude/skills/netlify-bot-shield/ and run it as /netlify-bot-shield.
More Claude Code skills
study-competitionA market study for a business idea, from competitors to video hooks.
find-leadsLeads for a business idea, checked, each with a first message to send.
explain-n8nAny piece of code, drawn as an n8n workflow you can click through.
open-choicesDozens of options on shelves, for a choice you haven't made yet.
trim-clipThe last 30 seconds of a game clip, ready to share. Or 45, or 60.
legal-reviewA legal review of your project, with every risk ranked and sourced.
session-advisorA second session that reads the first one's work and helps you decide.
toolbarA band above the prompt that shows what Claude is doing.
usage-watchYour limits and cost in chat, and a heads up before you run out.