detect-captcha
Skill8 starsChanged 7 months agoMITView on GitHub
Detects whether the current page contains a captcha challenge (reCAPTCHA, hCaptcha, Cloudflare Turnstile, GeeTest, etc.). Reports detection and stops. Never attempts to solve. See docs/ethics.md.
In this repository14 other files it gives its agents.
- date-picker-widgetSkill
- dismiss-cookie-bannerSkill
- dismiss-newsletter-popupSkill
- exit-tracking-popupSkill
- extract-table-paginationSkill
- fill-multi-step-formSkill
- handle-infinite-scrollSkill
- handle-modal-dialogSkill
- login-flowSkill
- pagination-next-pageSkill
- searchable-dropdownSkill
- search-and-filterSkill
- upload-download-fileSkill
- verify-page-loadedSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Run any time the deterministic recipe of another skill fails on what *looks like* it should have worked, OR proactively before any step …
- Distinctive: line 50
Never. This skill is cheap, deterministic, and side-effect-free.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Detect Captcha
When to invoke
Run any time the deterministic recipe of another skill fails on what looks like it should have worked, OR proactively before any step that involves form submission, login, or rate-sensitive interaction. The matcher runs this when known captcha markers appear in the DOM.
This skill is detect-only. It identifies captcha provider, surfaces metadata, and stops. If you need to bypass a captcha, you are out of scope of this project — see docs/ethics.md. PRs adding solving logic will be closed.
Recipe
- wait_for_dom_ready timeout=3s
- extract_text selector=".g-recaptcha, .h-captcha, .cf-turnstile, iframe[src*='recaptcha'], iframe[src*='hcaptcha'], iframe[src*='challenges.cloudflare.com']" into="$captcha_marker" optional=true
Success criteria
The skill always returns success if the recipe completes. The interesting state is in the returned extracted map:
$captcha_markerpopulated → captcha detected (the value identifies the provider via its container class or iframe URL)$captcha_markernot populated → no captcha present
The caller decides what to do next: stop, prompt the user, switch to a non-captcha-protected URL, etc.
When NOT to use
- Never. This skill is cheap, deterministic, and side-effect-free. Always safe to invoke.
Known failures
- Invisible captchas (~15% of reCAPTCHA v3 deployments): the badge is hidden by default. The challenge only appears on risk-flagged sessions. Detection via the
.grecaptcha-badgeselector covers this case; it's in v0.2.0. - Custom captcha implementations (~5%): sites running bespoke "click the kittens" challenges won't match standard markers. Vision detection would help but vision fallback is forbidden for this skill (see
cost_budget.max_vision_calls: 0). - Captcha loaded post-interaction: the captcha only renders after a form-submit click. Re-invoke this skill after any submit step.
Example usage
Agent task: "Search for foo on site X and grab the first 3 results."
→ invoke_skill("verify-page-loaded") → success
→ invoke_skill("dismiss-cookie-banner") → success
→ invoke_skill("detect-captcha") → success, $captcha_marker = None
→ invoke_skill("search-and-filter") → success
...vs...
→ invoke_skill("detect-captcha") → success, $captcha_marker = "<reCAPTCHA iframe>"
→ agent: "Site X is showing a reCAPTCHA. I cannot continue automatically. Switch to a different source?"Ethical posture
This skill exists to make captcha presence visible to the agent so the agent (and the user) can make an informed decision. The decision is not "now solve it." md](../../DECISIONS.md).
Related skills
verify-page-loaded— captchas often render after page load; run loaded-check firstdetect-rate-limit(v0.2.0) — captchas often appear after rate-limit triggers
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

