query

query is a command for Claude Code from msadigo/mcp-hayabusa. It costs 22 tokens per session (1,728 once invoked), scanned A, original, MIT.

A command that reads saved scan parameters, runs a Hayabusa scan on local .evtx Windows event-log files, and writes an Obsidian-style investigation note. EVTX is the file format used for Windows Event Logs.

In plain words
What is it for?
Use it to run scans from a parameters file, optionally filter findings by a supplied time range, and document the results.
Why use it?
It turns a saved investigation request into a repeatable scan and written note, without assuming access to Splunk or another SIEM.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/msadigo/mcp-hayabusa/query
Clone the repo
git clone --depth 1 https://github.com/msadigo/mcp-hayabusa

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for query

README.md
[![agentmods](https://agentmods.dev/badge/commands/msadigo/mcp-hayabusa/query.svg)](https://agentmods.dev/commands/msadigo/mcp-hayabusa/query)
Your own site
<a href="https://agentmods.dev/commands/msadigo/mcp-hayabusa/query"><img src="https://agentmods.dev/badge/commands/msadigo/mcp-hayabusa/query.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01728
Opus 5 $0.00011 $0.00864
Sonnet 5 $0.00004 $0.00346
Haiku 4.5 $0.00002 $0.00173

Measured 4d ago against content hash 612c81c14af5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/query.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Query — EVTX investigation from saved parameters

This command runs against real Hayabusa scan data via the scan_evtx MCP tool. It does not use Splunk or any SIEM. This project has no SIEM access — this command adapts the familiar "read a saved query from a file, run it, write up findings" workflow to the data we actually have: local .evtx files scanned with Hayabusa. Do not suggest or fall back to Splunk syntax (index=, SPL, etc.) anywhere in this command.

Arguments

$1 — required. Path to a plain-text parameters file (see format below). $2 — optional. A time range to scope the analysis to, e.g. 2026-07-10..2026-07-15 or last 24h. scan_evtx has no native time-range flag — Hayabusa itself supports -s/-e timeline bounds, but this project's wrapper doesn't expose them (see src/mcp_hayabusa/hayabusa.py). So: if $2 is given, run the scan unbounded as usual, then filter/annotate the analysis step by each record's Timestamp field to stay inside that range — don't try to pass a time flag to the tool. If $2 is omitted, skip time-scoping entirely; don't invent a default window.

Steps

  1. Read the parameters file at $1 with the Read tool. Expect simple key: value lines, e.g.:

    target: sample_evtx/Discovery/T1082_uname/uname.evtx
    rule_filter: discovery
    min_level: medium
    rules_dir: hayabusa/rules
    

    Required: target (path to a .evtx file or a directory of them — set is_file: true when calling the tool if target is a single file). Optional: rule_filter, min_level (informational/low/medium/high/critical), rules_dir (which rule set to scan/filter from — use hayabusa/rules for the full bundled Hayabusa Sigma ruleset, fetched via scripts/download_hayabusa.py and gitignored; omit it, or use rules/custom, to scan only this repo's own authored rules tracked in git). Ignore any other keys but don't error on them. If target is missing or doesn't resolve to an existing path, stop and report that — don't guess a path.

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 106 lines · 22 tokens per session scan A 612c81c14af5

Subscribe to this mod's changes

query is a command published in the GitHub repository msadigo/mcp-hayabusa (0 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 1,728 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.