Haveibeenpwned

From taracodlabs/aiden · View interactive version

Haveibeenpwned is an AI agent skill from the GitHub repository taracodlabs/aiden. Check if an email address or username appears in known data breaches using the Have I Been Pwned v3 API

How to use this skill

Skill file

Have I Been Pwned — Breach Checker

Look up whether an email address has appeared in any publicly known data breaches. Uses the Have I Been Pwned v3 API.

Requires: HIBP_API_KEY in .env — $3.50/month subscription at haveibeenpwned.com/API/Key

When to Use

How to Use

Check a single email for breaches

$email = "user@example.com"
$key   = $env:HIBP_API_KEY
$url   = "https://haveibeenpwned.com/api/v3/breachedaccount/$([Uri]::EscapeDataString($email))?truncateResponse=false"

$result = Invoke-RestMethod -Uri $url -Headers @{ "hibp-api-key" = $key } -ErrorAction SilentlyContinue

if ($null -eq $result) {
    Write-Host "✅ $email was NOT found in any known data breaches."
} else {
    Write-Host "⚠️  $email found in $($result.Count) breach(es):"
    $result | ForEach-Object {
        Write-Host "   • $($_.Name) ($($_.BreachDate)) — $($_.DataClasses -join ', ')"
    }
}

Check which passwords were exposed (pastes)

$email = "user@example.com"
$key   = $env:HIBP_API_KEY
$url   = "https://haveibeenpwned.com/api/v3/pasteaccount/$([Uri]::EscapeDataString($email))"

$result = Invoke-RestMethod -Uri $url -Headers @{ "hibp-api-key" = $key } -ErrorAction SilentlyContinue

if ($null -eq $result) {
    Write-Host "✅ No paste exposures found for $email"
} else {
    Write-Host "Found in $($result.Count) paste(s):"
    $result | Select-Object Source, Title, Date | Format-Table
}

Bulk check a list of emails from a file

$key   = $env:HIBP_API_KEY
$emails = Get-Content "emails.txt"

foreach ($email in $emails) {
    Start-Sleep -Milliseconds 1600   # respect 1 req/1.5s rate limit
    $url = "https://haveibeenpwned.com/api/v3/breachedaccount/$([Uri]::EscapeDataString($email))"
    $res = Invoke-RestMethod -Uri $url -Headers @{ "hibp-api-key" = $key } -ErrorAction SilentlyContinue
    $status = if ($res) { "PWNED ($($res.Count) breaches)" } else { "Clean" }
    Write-Host "$email — $status"
}

Examples

"Check if test@example.com has been in any breaches"

→ Run the single-email check above with that address.

"Was my email leaked in the Adobe breach?"

→ Run the single check; then filter: $result | Where-Object Name -eq 'Adobe'

"Check all emails in a file for breaches"

→ Use the bulk check snippet — it respects the 1.5s rate limit automatically.

Cautions

Requirements

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.