Agent skill

Shodan

by SpecterOps in SpecterOps/skills

Query Shodan for reconnaissance, target enrichment, and exposed service discovery.

Apache-2.0Auto-check passedSecurity

Install Shodan

skills CLI
$ npx skills add SpecterOps/skills --skill shodan -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SpecterOps/skills shodan --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SpecterOps/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ops-reconnaissance/skills/shodan .claude/skills/shodan && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shodan
GitHub stars
702
Token cost
~2k tokens
SKILL.md length
612 words
Files
4 (incl. assets)
Skills in repo
38
Repo updated
First seen
Licence
Apache-2.0

At a glance

Query Shodan for reconnaissance, target enrichment, and exposed service discovery.

  • Works in 5 steps: Build the query from the user's input → Execute: shodan search --fields… → Parse and format results into a table → …
  • Tasks that involve OSINT
  • SKILL.md covers Prerequisites, Actions, Python API Fallback and Output Formatting
  • Calls pip and uv; needs SHODAN_API_KEY

What it does

Shodan is an agent skill from SpecterOps/skills. Query Shodan for reconnaissance, target enrichment, and exposed service discovery. Builds queries, parses results, and highlights interesting findings. Requires SHODANAPIKEY environment variable.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including assets (for example `agents/openai.yaml`).

It sits in Security, covering OSINT. The repository describes itself as: A marketplace for LLM skills. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve OSINT

Example prompts

  • “/shodan”

Requirements

  • Python 3
  • A credential in SHODAN_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Build the query from the user's input
  2. Execute: shodan search --fields ip_str,port,org,hostnames,product,version,os "" --limit 100
  3. Parse and format results into a table
  4. Highlight interesting findings
  5. Group results by service type when there are many results

What it can do on your machine

Read from SKILL.md and the folder at commit e655f93. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SHODAN_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shodan loads about 2k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 612 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SpecterOps/skills at commit e655f93, republished under its Apache-2.0 licence (© SpecterOps). 612 words, ~1,997 tokens.

Download SKILL.mdSave it as .claude/skills/shodan/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
shodan
description
Query Shodan for reconnaissance, target enrichment, and exposed service discovery. Builds queries, parses results, and highlights interesting findings. Requires SHODAN_API_KEY environment variable.
metadata.author
GhostWorks

Shodan Reconnaissance Skill

Query Shodan for exposed services, target enrichment, and attack surface discovery.

Parse the user's input to determine the action:

  • $shodan search "org:Acme port:443" → run a Shodan search query
  • $shodan target 203.0.113.1 → enrich a specific IP
  • $shodan target example.com → enrich a domain (DNS + per-IP lookup)
  • $shodan dorking "Acme Corp" → build advanced Shodan dorks for a target
  • $shodan monitor "Acme Corp" → exposure report for an organization
  • $shodan cve CVE-2024-3400 → find hosts vulnerable to a specific CVE
  • $shodan cve CVE-2024-3400 "Acme Corp" → CVE search scoped to an org

Prerequisites

  • API key: Set SHODAN_API_KEY environment variable
    • Free tier: limited searches, good for IP lookups
    • Membership ($49 one-time): unlocks search filters, bulk lookups
    • Small Business+: monitor, alerts, on-demand scanning
  • CLI: Install with pip install shodan or uv add shodan
  • Verify access: shodan info (shows query/scan credits remaining)

If the API key is not set, inform the user and show how to set it:

bash
export SHODAN_API_KEY="your-key-here"
# Or add to ~/.zshrc for persistence
echo 'export SHODAN_API_KEY="your-key-here"' >> ~/.zshrc

Actions

search — Run a Shodan query
  1. Build the query from the user's input

  2. Execute: shodan search --fields ip_str,port,org,hostnames,product,version,os "<query>" --limit 100

  3. Parse and format results into a table:

    IP              Port   Service          Version    Org              Hostnames
    ─────────────────────────────────────────────────────────────────────────────
    203.0.113.1     443    nginx            1.25.3     Target Corp      www.target.com
    203.0.113.2     22     OpenSSH          8.9p1      Target Corp      ssh.target.com
  4. Highlight interesting findings:

    • Critical: Known vulnerable versions, default credentials services, exposed admin panels
    • Interesting: Uncommon ports, development/staging services, database ports, ICS/SCADA
    • Note: Self-signed certs, expired certs, outdated software
  5. Group results by service type when there are many results

target — Enrich a specific IP or domain
  1. For IPs: shodan host <ip>

  2. For domains: shodan domain <domain> then lookup each IP found

  3. Collect and present:

    Host Summary:

    • IP, ASN, organization, ISP, country/city
    • Open ports and services (with versions)
    • Hostnames and reverse DNS
    • Last scan date
    • Known vulnerabilities (CVEs) Shodan has flagged
    • SSL/TLS certificate details (issuer, expiry, SANs)
    • Technologies detected

    Domain Summary (if domain provided):

    • DNS records (A, AAAA, MX, NS, TXT, CNAME)
    • Subdomains discovered
    • Per-IP breakdown of services
  4. Flag anything juicy:

    • Ports that shouldn't be public (3389, 5900, 27017, 6379, 9200, 5432, 3306, 445)
    • Services with known CVEs
    • Expired or self-signed SSL certs
    • Development/staging environments exposed
    • Default pages or install wizards
dorking — Build advanced Shodan queries

Based on what the user describes, build targeted Shodan dorks.

Query building reference:

# Organization targeting
org:"Target Corp"
org:"Target Corp" port:443

# Network range
net:203.0.113.0/24
net:203.0.113.0/24 port:22

# Service-specific
product:"Apache httpd" version:"2.4.49"    # Path traversal CVE-2021-41773
product:"Microsoft Exchange" port:443       # Exchange servers
product:"OpenSSH" version:"7.6"            # Older SSH
"Server: Apache/2.4.49"                    # Raw banner match

# Exposed services (shouldn't be public)
org:"Target" port:3389                     # RDP
org:"Target" port:445                      # SMB
org:"Target" port:27017                    # MongoDB
org:"Target" port:6379                     # Redis
org:"Target" port:9200                     # Elasticsearch
org:"Target" port:5432                     # PostgreSQL
org:"Target" port:3306                     # MySQL
org:"Target" port:11211                    # Memcached
org:"Target" "port:2379"                   # etcd

# Web technologies
org:"Target" http.title:"Dashboard"
org:"Target" http.title:"Login"
org:"Target" http.title:"Index of /"       # Directory listing
org:"Target" http.component:"WordPress"
org:"Target" http.component:"Jira"
org:"Target" http.component:"Jenkins"
org:"Target" http.component:"Grafana"
org:"Target" http.favicon.hash:           # Favicon hash matching

# SSL/TLS
org:"Target" ssl.cert.expired:true
org:"Target" ssl.cert.issuer.cn:"Let's Encrypt"
ssl.cert.subject.cn:"target.com"          # Find all IPs for a cert

# Vulnerable services
vuln:CVE-2021-44228                       # Log4Shell
vuln:CVE-2023-22515                       # Confluence
vuln:CVE-2024-3400                        # PAN-OS

# ICS/SCADA (if in scope)
org:"Target" tag:ics
org:"Target" port:502                     # Modbus
org:"Target" port:44818                   # EtherNet/IP

# Cloud metadata
org:"Amazon" http.title:"Target"
"X-Powered-By" org:"Target"

# Country/city filtering
org:"Target" country:"US" city:"New York"

# Screenshot available
org:"Target" has_screenshot:true

# Honeypot detection
org:"Target" tag:honeypot

Present 5-10 relevant queries for the scenario with explanations of what each finds and why it matters.

Show full SKILL.md (248 more words)Show less
monitor — Check exposure for an organization
  1. Run multiple targeted queries for the org:

    bash
    shodan search 'org:"<org_name>"' --fields ip_str,port,product,version --limit 500
  2. Build an exposure report:

    Attack Surface Summary:

    • Total IPs discovered
    • Total open ports
    • Unique services and versions

    Exposed Services by Risk:

    RiskServiceCountDetails
    CriticalRDP (3389)3Direct RDP exposure to internet
    CriticalMongoDB (27017)1No auth likely
    HighSSH (22)15Check for password auth
    HighExpired SSL4Trust issues, possible neglect
    InfoHTTPS (443)42Normal

    Version Intelligence:

    • Outdated software detected (with CVE references)
    • End-of-life products

    Recommendations:

    • Prioritized list of what to investigate or report
  3. If the user asks, save the full report as markdown

cve — Find hosts vulnerable to a specific CVE
  1. Search: shodan search "vuln:<cve_id>" (or if targeting an org: shodan search "vuln:<cve_id> org:\"<org>\"")
  2. If Shodan doesn't index that CVE, fall back to service/version matching:
    • Look up affected product/versions for the CVE
    • Build a query matching those versions
  3. Present results with:
    • Affected hosts and their details
    • CVE description and severity
    • Whether exploitation requires authentication or special conditions
    • Suggested next steps (verify, exploit, report)

Python API Fallback

If the Shodan CLI isn't available or for complex queries, use the Python API:

python
import shodan
import os

api = shodan.Shodan(os.environ["SHODAN_API_KEY"])

# Search
results = api.search("org:\"Target Corp\" port:443")
for result in results["matches"]:
    print(f"{result['ip_str']}:{result['port']} - {result.get('product', 'unknown')}")

# Host lookup
host = api.host("203.0.113.1")
print(f"Ports: {host['ports']}")
print(f"Vulns: {host.get('vulns', [])}")

# DNS lookup
dns = api.dns.domain_info("target.com")

Output Formatting

  • Default: Rich tables to terminal with color-coded severity
  • With --output <file>: Markdown report file with full details
  • Always include the Shodan query used so the user can repeat or modify it
  • Note the scan date — Shodan data can be days/weeks old

© SpecterOps, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (assets) in plugins/ops-reconnaissance/skills/shodan of SpecterOps/skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/icon.png
  • assets/icon.svg

Open the folder on GitHubat commit e655f93

Compare with similar skills

Shodan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shodan compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shodan this skillSpecterOps/skills702—~2kAutomated safety check: PassApache-2.0
Metabigor OSINT Reconj3ssie/metabigor1.9k—~2.4kAutomated safety check: PassMIT
Ctf Osintljagiello/ctf-skills3.4k2 repos~2.3kAutomated safety check: NotesMIT
ShadowBroker Intelligence ClientBigBodyCobain/Shadowbroker11k—~8.9kAutomated safety check: WarnAGPL-3.0
Awesome Osint Operatorshoyann/RZK-The-Hunter140—~4.8kAutomated safety check: PassCC-BY-SA-4.0
Run Claude Osintelementalsouls/Claude-OSINT2.8k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Metabigor OSINT Recon

    j3ssie/metabigor

    Operates the metabigor CLI to map a target's network ranges, subdomains, ports, related domains, CDNs and archived URLs from free sources without API keys.

    1.9k GitHub stars~2.4k tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Ctf Osint

    ljagiello/ctf-skills

    Provides open source intelligence techniques for CTF challenges.

    3.4k GitHub starsUsed in 2 repos~2.3k tokens
    SecurityAuto-check: notes
  • ShadowBroker Intelligence Client

    BigBodyCobain/Shadowbroker

    Lets an agent query a ShadowBroker OSINT platform for tracked flights, ships, satellites and news, and place its findings on the map as intel pins.

    11k GitHub stars~8.9k tokensUpdated yesterday
    SecurityAuto-check: warnings
  • Awesome Osint Operator

    shoyann/RZK-The-Hunter

    Ethical, evidence-first OSINT planning, tool selection, verification, monitoring, reporting, and guarded official wanted/fugitive-person location intelligence using a structured catalog adapted from…

    140 GitHub stars~4.8k tokensUpdated 17 days ago
    SecurityAuto-check passed
  • Run Claude Osint

    elementalsouls/Claude-OSINT

    Build, validate, and run the claude-osint skills repo — check SKILL.md frontmatter, run the secretscan.py and h1reference.py helpers, run sync-skill-content.sh, run the smoke test.

    2.8k GitHub stars~1.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Osint

    smixs/osint-skill

    Conduct deep OSINT research on individuals. An agent skill from smixs/osint-skill.

    140 GitHub stars~5.5k tokensUpdated 7 mo ago
    SecurityAuto-check passed

More from SpecterOps/skills

All 38 skills in this repo
  • Codex Activity Report

    SpecterOps/skills

    Generate a normalized UTC timeline and evidence-based narrative from Codex activity artifacts.

    702 GitHub stars~805 tokensUpdated 14 days ago
    Auto-check passed
  • Com Proxy Triage

    SpecterOps/skills

    A skill your agent uses when the user wants to triage Windows COM proxy/hijack candidates by capturing HKCU\Software\Classes\CLSID\{...}\InProcServer32 NAME NOT FOUND lookups for a process, mapping…

    702 GitHub stars~1.5k tokensUpdated 14 days ago
    Auto-check passed
  • Cwe Code Review

    SpecterOps/skills

    Perform CWE-grounded security code reviews and precise weakness mapping using a locally derived MITRE CWE corpus, relationship graphs, mapping notes, detection methods, mitigations, and schema…

    702 GitHub stars~2.4k tokensUpdated 14 days ago
    Auto-check passed
  • Ghostwriter Oplog

    SpecterOps/skills

    A skill your agent uses for Ghostwriter operation log entries from Codex, including config guidance, quick notes, evidence-backed entries, and guided oplog capture through the Ghostwriter MCP tools.

    702 GitHub stars~665 tokensUpdated 14 days ago
    Auto-check passed
  • Nmap Parse

    SpecterOps/skills

    Parse nmap scan output and generate actionable recon notes. An agent skill from SpecterOps/skills.

    702 GitHub stars~738 tokensUpdated 14 days ago
    Auto-check passed
  • Osint Recon

    SpecterOps/skills

    Perform OSINT and external reconnaissance for approved targets.

    702 GitHub stars~813 tokensUpdated 14 days ago
    Auto-check passed

Categories

Questions about Shodan

What does Shodan do?

Query Shodan for reconnaissance, target enrichment, and exposed service discovery. Shodan is an agent skill from SpecterOps/skills. Query Shodan for reconnaissance, target enrichment, and exposed service discovery.

When should I use Shodan?

Shodan fits situations like: tasks that involve OSINT.

How do I install Shodan in Claude Code?

Run `npx skills add SpecterOps/skills --skill shodan -a claude-code`. Or copy the skill folder (plugins/ops-reconnaissance/skills/shodan in SpecterOps/skills) into .claude/skills/shodan in your project. Claude Code loads it when a task matches its description.

How do I install Shodan in Codex?

Run `npx skills add SpecterOps/skills --skill shodan -a codex`. Or copy the skill folder (plugins/ops-reconnaissance/skills/shodan in SpecterOps/skills) into .agents/skills/shodan in your project. Codex loads it when a task matches its description.

Can I use Shodan in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SpecterOps/skills --skill shodan -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shodan, .gemini/skills/shodan, .github/skills/shodan and .opencode/skills/shodan in your project.

What does Shodan need to run?

Going by SKILL.md and its folder, Shodan needs the command-line tools its instructions call (pip and uv) and credentials named SHODAN_API_KEY. Our summary lists: Python 3; A credential in SHODAN_API_KEY.

Does Shodan access the network?

SKILL.md contains no URLs. Its commands use pip and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Shodan safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shodan use?

Shodan is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shodan use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Shodan?

Skills that share tags, products or a category with Shodan: Metabigor OSINT Recon (j3ssie/metabigor, 1.9k stars), Ctf Osint (ljagiello/ctf-skills, 3.4k stars), ShadowBroker Intelligence Client (BigBodyCobain/Shadowbroker, 11k stars) and Awesome Osint Operator (shoyann/RZK-The-Hunter, 140 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shodan?

SpecterOps (a GitHub organization) maintains it in SpecterOps/skills, which has 702 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on September 23, 2026.

Source: SpecterOps/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.