Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

censys-analyze

БесплатноБез исполняемых скриптовНе проверен

Use when the user wants to do structured post-retrieval analysis on Censys CLI output — e.g. "censys analyze results," "analyze censys data," "censys jq,"…

censysот censys★ 15 звёзд на GitHub

Об этом скилле

censys-analyze

When to use

Use this skill once Censys CLI output already exists (or is about to be produced) and the user wants to filter it, transform it, count/group it, join it against another result set, or run a batch certificate workflow on top of it. Typical asks:

  • "censys analyze results, group by country"
  • "censys jq to pull out all the IPs"
  • "query saved censys data for hosts on port 8443"
  • "censys batch certs — pull every fingerprint from this search"
  • "cross-reference censys results with the enrichment output"

Do not use this to generate the underlying data — that's censys-search, censys-view, censys-enrich, or censys-timeline. This skill is strictly post-retrieval: it assumes CLI output is already sitting in a file (or about to be piped to one) and focuses on what to do with it next.

Precedence: If guidance in this skill conflicts with a command skill (censys-search, censys-view, censys-aggregate, etc.), the command skill wins. Command skills own the facts about their own CLI behavior; this skill owns the analysis methodology.

Core principle

Censys API calls cost credits, count against rate limits, and take time. Save results to files, then analyze locally — never re-query the API for data you already have. Every pattern below operates on a file already on disk, not on a live API call. If a second question comes up about the same data ("now show me just the German ones," "now count by ASN"), reach for jq or SQLite against the saved file before reaching for the CLI again.

Save-and-reuse pattern

censys search "host.services.protocol=SSH" --max-pages 5 -O json > data/ssh_hosts.json
censys view 8.8.8.8 -O json > data/host_detail.json
censys enrich --input-file ips.txt -O json > data/enriched.json
censys history 203.0.113.50 --duration 30d -O json > data/timeline.json

# NDJSON streaming for large result sets (one JSON object per line)
censys search "host.services.port=443" --max-pages -1 --streaming > data/https_hosts.ndjson

Prefer --streaming with NDJSON output for anything over a few thousand results — it avoids buffering the whole array in memory on either end, and NDJSON is easy to process a line at a time with jq -c.

jq recipes

CenQL search fields and JSON output paths differ for some signals (e.g., cert fingerprint is host.services.tls.certificates.leaf_fp_sha_256 in CenQL but .tls.fingerprint_sha256 in JSON output). See censys-cenql for the full mapping table.

Validate first: jq '.' data/ssh_hosts.json > /dev/null — a syntax error here means malformed/truncated JSON, not a bad filter.

# 1. Extract all IPs from search results
jq -r '.[].host.ip' data/ssh_hosts.json

# 2. Filter hosts by country
jq '[.[] | select(.host.location.country_code == "US")]' data/ssh_hosts.json

# 3. Extract unique cert fingerprints across all services
jq -r '[.[].host.services[]? | .tls?.fingerprint_sha256? // empty] | unique | .[]' \
  data/ssh_hosts.json

# 4. Count hosts per country
jq 'group_by(.host.location.country_code) |
    map({country: .[0].host.location.country_code, count: length}) |
    sort_by(-.count)' data/ssh_hosts.json

# 5. Extract a services summary for one host
jq '.[0].services | map({port, protocol, transport_protocol})' data/host_detail.json

# 6. Filter enrichment results by reputation score (score_level observed on cencli 1.1.3, 2026-08)
jq '[.[] | select(.reputation?.score_level != "benign")]' data/enriched.json

# 7. NDJSON processing — one object per line, no top-level array
cat data/https_hosts.ndjson | jq -r '.host.ip' | sort -u
cat data/https_hosts.ndjson | jq -c 'select(.host.location.country_code == "DE")'

SQLite loading

For anything that feels like "group by / join / having" rather than a one-shot filter, load the results into SQLite and use its JSON functions (SQLite 3.38+ required for json_extract/json_each).

# Bulk-load search results using the plugin's loader script
"${CLAUDE_PLUGIN_ROOT}/scripts/censys-to-sqlite.sh" data/ssh_hosts.json data/censys.db
# Loads all records in a single transaction; prints row count on completion.
# Optional third argument sets the table name (default: hosts).

# Count hosts per ASN
sqlite3 data/censys.db <<'SQL'
SELECT json_extract(data, '$.host.autonomous_system.asn') AS asn,
       json_extract(data, '$.host.autonomous_system.name') AS as_name,
       COUNT(*) AS host_count
FROM hosts
GROUP BY asn
ORDER BY host_count DESC
LIMIT 20;
SQL

# Find hosts with a specific port open (unnest the services array with json_each)
sqlite3 data/censys.db <<'SQL'
SELECT json_extract(data, '$.host.ip') AS ip
FROM hosts, json_each(json_extract(data, '$.host.services')) AS svc
WHERE json_extract(svc.value, '$.port') = 8443;
SQL

Reach for SQLite over jq when the query needs a join across two loaded tables, a HAVING-style post-aggregation filter, or repeated ad-hoc queries against the same data — jq recompiles the whole filter each run, SQLite lets yo

Полный SKILL.md на GitHub

Установить censys-analyze в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл censys-analyze?

Use when the user wants to do structured post-retrieval analysis on Censys CLI output — e.g. "censys analyze results," "analyze censys data," "censys jq," "query saved censys data," "censys batch certs," "cross-reference censys results," or "censys post-processing." Teaches saving CLI output to files, jq recipes for filtering/extraction, loading results into SQLite for SQL-style queries, batch certificate workflows, and cross-referencing multiple result sets. Not for generating the underlying data — see censys-search, censys-view, or censys-timeline for that.

Как установить скилл censys-analyze?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл censys-analyze запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить censys-analyze с