censys-aggregate
БесплатноБез исполняемых скриптовНе проверенUse when the user wants to aggregate, bucket, or count censys search results by field, censys break down results by field, censys top ports for a query…
от censys★ 15 звёзд на GitHubОб этом скилле
Censys Aggregate
When to use
Use this skill whenever the user wants bucketed counts of a field's values across matching Censys documents, rather than the raw matching records themselves. This is the CLI equivalent of the Censys Platform Report Builder. Covers requests like:
- "censys aggregate SSH hosts by port"
- "censys break down HTTP services by country"
- "censys top ports for hosts in Germany"
- "censys count by country for port 443"
- "censys distribution of protocols on port 22"
If the user wants the actual matching records (not counts), that's censys-search. If the user has a specific IP, cert SHA-256, or FQDN and wants a single-record lookup, that's censys-view. If the user needs help writing or debugging the CenQL query itself, defer to censys-cenql.
Invocation
Base form:
censys aggregate "<CenQL query>" "<field>" [flags]
The query selects the document set; the field is the dotted field path to bucket on (e.g. host.services.port, host.location.country).
Aggregate-specific flags
| Flag | Alias | Description |
|---|---|---|
--num-buckets |
-n |
Number of buckets to return (default: 25, range: 1-2000; verified on cencli 1.1.3, 2026-08 — lower bound client-side, upper bound server-side 422) |
--count-by-level |
-l |
Document level to count at, for nested fields (e.g. count at the service level vs. the host level) |
--filter-by-query |
-f |
Limit aggregation to field values that also match the query (rather than aggregating across all values present on matching documents) |
--collection-id |
-c |
Aggregate within a specific collection (UUID) |
--interactive |
-i |
Open an interactive TUI table for browsing buckets |
Output format
Unlike most other censys subcommands, aggregate defaults to -O short rather than json. Pass --output-format/-O explicitly with json, yaml, tree, or short to override. -O template is not supported for aggregate and exits with code 2.
Global CLI flags
See ${CLAUDE_SKILL_DIR}/references/cli-globals.md for the full global flags reference (output
format, diagnostics, org-id, and PAT vs OAuth notes). Note: aggregate does
not support -S (streaming) or -O template.
Common patterns
# Top 10 SSH ports
censys aggregate "host.services.protocol=SSH" "host.services.port" -n 10
# Country breakdown for hosts on port 443
censys aggregate "host.services.port: 443" "host.location.country"
# Protocol distribution on port 22, limited to values matching the query
censys aggregate "host.services.port=22" "host.services.protocol" --filter-by-query
# Country breakdown for HTTP hosts, as JSON for downstream processing
censys aggregate "host.services.protocol=HTTP" "host.location.country" -O json
# Interactive TUI table for browsing protocol buckets on port 22
censys aggregate "host.services.port=22" "host.services.protocol" -i
Interpreting results
Each result is a bucket with two fields:
key— the field value for that bucket (e.g. a port number, country name, or protocol string)count— the number of matching documents with that value
Notes on shaping the bucket set:
--count-by-level/-lmatters for nested fields where a host can have multiple services. Counting at the service level counts every matching service occurrence; counting at the host level counts each host once regardless of how many matching services it has. Pick the level that matches what the user actually means by "count" (e.g. "how many hosts run SSH" vs. "how many SSH services exist").--filter-by-query/-frestricts aggregation to field values that also satisfy the query itself, rather than aggregating across every value present on the matching document set. Use this when the user wants the breakdown scoped strictly to the condition they searched for (e.g. protocol distribution only among the ports the query matched), not a broader profile of the matching hosts.--num-buckets/-nis a hard cap on returned buckets, not a sample size — if the true cardinality of the field exceeds-n, only the top buckets by count are returned. Raise-n(up to 2000) if the user wants the long tail.Do not use a bucket sum as a total.
jq '[.[].count] | add'adds only the buckets the server returned.-nlimits that number, and the default is 25. If the field has more distinct values than-n, the sum is lower than the true total. The command gives no warning.Measured on one query (
host.services:pinned to 3 ports and a vendor; from investigation data, 2026):-nSum of buckets True total 8 67 144 20 103 144 50 136 144 200 144 144 The sum at
-n 8is 2.1 times too low. A report that used it stated 67 hosts. The correct number was 144.Rule: use
aggregatefor distribution. Usesearchfor a total. To count the hosts that match a query, page the query:censys search '<query>' -
Установить censys-aggregate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл censys-aggregate?
Use when the user wants to aggregate, bucket, or count censys search results by field, censys break down results by field, censys top ports for a query, censys count by country, censys distribution of a field, or the equivalent of the Censys Platform Report Builder. Wraps the `censys aggregate` CLI subcommand. Trigger phrases include "censys aggregate," "censys break down by," "censys top ports for," "censys count by country," and "censys distribution of." Do not use for returning raw matching records (see censys-search) or for single-record lookup by identifier (see censys-view).
Как установить скилл censys-aggregate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл censys-aggregate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic