Skills

Haveibeenpwned

Check if an email address or username appears in known data breaches using the Have I...

Install

npx skills add taracodlabs/aiden --skill haveibeenpwned -g -a claude-code -y
Repository
taracodlabs/aiden868
Category
Engineering
Updated
16d ago
License
Apache-2.0
Context cost
Lightabout 814 tokens
Runs scripts
Yes, review before use

What it does

Check if an email address or username appears in known data breaches using the Have I Been Pwned v3 API

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

  • User wants to know if their email was part of a data breach
  • User wants a list of breaches an email was found in
  • User is auditing accounts before a security review
  • User asks "was my email leaked" or "has X been pwned"

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"
Read the whole SKILL.md on GitHub

More in Engineering