Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

breach-data

FreeNo executable scriptsNot checked

Checks whether email addresses, domains and passwords appear in known data breaches using the Have I Been Pwned (HIBP) API v3 and the Pwned Passwords range…

TerminalSkillsby TerminalSkills★ 221 GitHub stars

About this skill

Breach Data

Overview

Breach intelligence shows which accounts and which kinds of data (passwords, phone numbers, payment details) have leaked, so a security team can force resets and brief staff. The reference source is Have I Been Pwned (HIBP), API v3 at https://haveibeenpwned.com/api/v3.

What the API needs, per the HIBP documentation:

  • Breach, paste and domain endpoints need a paid API key (hibp-api-key header, 32 hex characters). There is no free production key. Plans differ in requests per minute; read the limit from the subscription status endpoint instead of assuming one.
  • Every request needs a descriptive User-Agent, otherwise HIBP answers 403.
  • Pwned Passwords needs no key and has no rate limit.
  • Domain search only works for domains you have verified in your HIBP account (DNS TXT record or an e-mail to admin, hostmaster, info, security or webmaster at that domain). It returns aliases and breach names, not full addresses.

Only look up addresses and domains your organization owns or that you are explicitly authorized to assess. Never look up other people. This skill documents the HIBP API only; commercial breach-search services (DeHashed, Intelligence X, LeakCheck, Snusbase) have their own contracts and terms, so follow their current documentation and do not paste their keys or results into shared tools.

Instructions

Step 1: Client setup

Keep the key in the environment, never in code.

export HIBP_API_KEY="..."          # from the HIBP dashboard, 32 hex characters
python3 -m pip install requests
import os
import time
import requests

HIBP_BASE = "https://haveibeenpwned.com/api/v3"
HEADERS = {
    "hibp-api-key": os.environ["HIBP_API_KEY"],
    "User-Agent": "northwind-secops-breach-audit/1.1",
}

def hibp_get(endpoint, params=None, retries=3):
    """GET a v3 endpoint. Returns parsed JSON, or None on 404 (nothing found)."""
    for _ in range(retries):
        r = requests.get(f"{HIBP_BASE}/{endpoint}", headers=HEADERS, params=params, timeout=15)
        if r.status_code == 200:
            return r.json()
        if r.status_code == 404:
            return None
        if r.status_code == 429:
            time.sleep(int(r.headers.get("retry-after", 5)) + 1)  # pad the wait
            continue
        r.raise_for_status()
    raise RuntimeError(f"Still rate limited after {retries} tries: {endpoint}")

Status codes: 401 missing or bad key, 403 missing User-Agent or a resource your account cannot use (for example an unverified domain), 404 nothing found, 429 rate limit (wait retry-after seconds), 503 usually a Cloudflare block after persistent overuse.

Step 2: Check your plan and limits

sub = hibp_get("subscription/status")
print(sub["SubscriptionName"], "-", sub["Rpm"], "requests/minute")

The response also lists DomainSearchMaxBreachedAccounts and feature flags such as IncludesStealerLogs. Use Rpm to set the delay in bulk jobs.

Step 3: Check one address you own

from urllib.parse import quote

def check_email(email):
    # truncateResponse defaults to true (names only); false returns the full breach model
    breaches = hibp_get(f"breachedaccount/{quote(email)}", {"truncateResponse": "false"})
    if not breaches:
        print(f"{email}: not found in any breach")
        return []
    print(f"{email}: {len(breaches)} breach(es)")
    for b in sorted(breaches, key=lambda x: x["BreachDate"], reverse=True):
        flags = "" if b["IsVerified"] else " [unverified]"
        print(f"  {b['BreachDate']}  {b['Name']:<25} {b['PwnCount']:>13,} accounts{flags}")
        print(f"      data: {', '.join(b['DataClasses'][:6])}")
    return breaches

Details from the docs: the address is trimmed and case-insensitive; Domain=adobe.com filters to one breached site; unverified breaches are included by default, so pass IncludeUnverified=false to drop them. Sensitive and retired breaches are never returned by this endpoint. To try the code without a real address, HIBP's documented test addresses on hibp-integration-tests.com (for example [email protected]) work with any well-formed 32-character test key.

Step 4: Pastes

def check_pastes(email):
    pastes = hibp_get(f"pasteaccount/{quote(email)}")
    for p in pastes or []:
        print(f"  {p.get('Date')}  {p['Source']}  id={p['Id']}  {p.get('EmailCount', 0)} addresses")
    return pastes or []

The paste Id is source-specific (a Pastebin key, for instance); do not assume it forms a URL for every source.

Step 5: Breached accounts on a verified domain

import sys

def domain_exposure(domain):
    """Needs a verified domain. Returns {alias: [breach names]}."""
    data = hibp_get(f"breacheddomain/{domain}")
    if not data:
        print(f"No breached addresses on {domain}")
        return {}
    by_breach = {}
    for alias, names in data.items():
        for name in names:
Full SKILL.md on GitHub

Install breach-data in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

_scores.json

FAQ

What does the breach-data skill do?

Checks whether email addresses, domains and passwords appear in known data breaches using the Have I Been Pwned (HIBP) API v3 and the Pwned Passwords range API. Use when auditing your own organization's credential exposure, checking a password against breach corpora, reviewing breached accounts on a verified domain, or scoping an authorized phishing simulation.

How do I install the breach-data skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the breach-data skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare breach-data with