# Powerquery

> Powerquery is an open-source agent skill for security. Write, debug and run SentinelOne PowerQuery hunts, investigations and detection rules. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Sentinel-One/ai-siem/tree/main/plugins/s1-secops-skills/skills/powerquery
- **Repository:** https://github.com/sentinel-one/ai-siem
- **GitHub stars:** 105
- **License:** AGPL-3.0
- **Skill name:** powerquery
- **Collection:** https://github.com/Sentinel-One/ai-siem
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This skill teaches an agent to author, explain, optimise and run SentinelOne PowerQuery, the pipeline query language used on the Singularity Data Lake. It covers Deep Visibility and Event Search hunts, investigation queries, scheduled detection rule bodies and dashboard panels, and it converts Sigma rules into PowerQuery form.

The skill is built around a long list of verified grammar rules and banned function names, so the agent avoids syntax that the engine rejects or silently answers with zero rows. It points queries at the Long Running Query API through an s1-secops-mcp runner, including time slicing and merging for long windows, and it describes the constraints that apply to scheduled rule bodies and alert row limits.

Running queries needs a SentinelOne console URL and API token supplied through that MCP server, and the skill includes reference files on fields, functions, lookups, joins and detection rule APIs. The SKILL.md is also designed to hand off baselining work to a companion mgmt-console-api skill.

## When your agent uses it

> Use any time the user wants to author, debug, optimize, explain, or run a SentinelOne PowerQuery (PQ): Deep Visibility / Event Search queries, XDR/EDR threat hunting, investigations, STAR / Custom Detection rule bodies (including converted Sigma rules), PowerQuery Alerts, or Singularity Data Lake dashboard panels. Trigger on PowerQuery, PQ, pq, query, Event Search, Deep Visibility, S1QL, SDL, STAR rule, Custom Detection rule, PowerQuery Alert; on queries using fields like `event.type`, `src.process.*`, `tgt.file.*`, `indicator.*`, `agent.uuid`; on pipes like `| group`, `| filter`, `| let`, `| join`, `| parse`, `| columns`, `| compare`, `| top`, `| union`, `| lookup`, `| savelookup`, `| dataset`. Also trigger when asked to hunt a TTP, IOC, behaviour, or alert pattern on a SentinelOne tenant, even casually ("find powershell reaching out to the internet", "write a detection for lsass access"). Explicitly NOT Microsoft Power Query / M / Excel and NOT Splunk SPL; this is SentinelOne's pipeline query language.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/Sentinel-One/ai-siem/tree/HEAD/plugins/s1-secops-skills/skills/powerquery)
- [No network calls found in its scripts](https://github.com/Sentinel-One/ai-siem/tree/HEAD/plugins/s1-secops-skills/skills/powerquery)
- [License: AGPL-3.0](https://github.com/Sentinel-One/ai-siem/tree/HEAD/plugins/s1-secops-skills/skills/powerquery)

## Features

- **Query grammar and operators:** Explains PowerQuery pipeline structure, initial filters, text operators and the commands used to filter, group, join and sort events.
- **Banned function reference:** Lists function names and forms that do not exist in PowerQuery, with the working replacement for each.
- **Long Running Query execution:** Runs queries through the LRQ API with time slicing, merge rules for long windows and optional file output.
- **Detection rule authoring:** Guides writing scheduled, single-event and correlation detection rules, including entity mapping and rule limits.
- **Ready-made hunt examples:** Provides investigation queries for PowerShell outbound traffic, lateral movement, credential access and similar patterns.
- **Sigma and KQL conversion:** Describes how to port Sigma rules and KQL or SPL hunts into PowerQuery and what to verify in converter output.

## Good for

- Hunt for PowerShell that reaches out to external IP addresses on an endpoint
- Write a detection rule for suspicious LSASS access
- Convert a Sigma rule into a SentinelOne PowerQuery scheduled rule
- Debug a PowerQuery that returns zero rows or a syntax error
- Build a per-user login baseline over a 30-day window

## Install

### Claude Code

This skill ships in the `s1-secops-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Sentinel-One/ai-siem
/plugin install s1-secops-skills@sentinelone
```

Or copy only this skill to `~/.claude/skills/powerquery`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Sentinel-One/ai-siem.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/powerquery &&
cp -R "$tmp/plugins/s1-secops-skills/skills/powerquery" ~/.claude/skills/powerquery &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/powerquery` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/powerquery` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Sentinel-One/ai-siem.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/powerquery &&
cp -R "$tmp/plugins/s1-secops-skills/skills/powerquery" ~/.agents/skills/powerquery &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/powerquery` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/powerquery` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Sentinel-One/ai-siem.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/powerquery &&
cp -R "$tmp/plugins/s1-secops-skills/skills/powerquery" ~/.cursor/skills/powerquery &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/powerquery` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Sentinel-One/ai-siem.git --path plugins/s1-secops-skills/skills/powerquery
```

Or copy the folder to `~/.gemini/skills/powerquery` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/powerquery`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Sentinel-One/ai-siem.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/powerquery &&
cp -R "$tmp/plugins/s1-secops-skills/skills/powerquery" ~/.copilot/skills/powerquery &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/powerquery` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Sentinel-One/ai-siem.git
```

Then copy `ai-siem/plugins/s1-secops-skills/skills/powerquery` into your agent's skills folder as `powerquery`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Powerquery work with Microsoft Power Query or Splunk SPL?

No. The skill states it is explicitly not for Microsoft Power Query, M or Excel, and not for Splunk SPL. It covers SentinelOne's pipeline query language only.

### What does the agent need to run queries against a tenant?

Queries are run through the s1-secops-mcp MCP tools, which reach the tenant's console URL and read credentials from environment variables or the OS keychain. The skill notes that Python runners are host-only.

### When does the skill trigger?

It is described as triggering on PowerQuery, PQ, Event Search, Deep Visibility, S1QL, SDL, STAR rules, PowerQuery Alerts and similar terms, and on requests to hunt a TTP, IOC or behaviour on a SentinelOne tenant.

### What license is the source repository under?

The repository is licensed under AGPL-3.0.

### How do I install Powerquery in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/powerquery to use it in all your projects, or to .claude/skills/powerquery in one project. Or install the s1-secops-skills plugin, which includes it: /plugin marketplace add Sentinel-One/ai-siem, then /plugin install s1-secops-skills@sentinelone.

### Does Powerquery run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Powerquery?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Powerquery?

The closest alternatives to Powerquery are Sdl API, Mgmt console API, Soc investigator, Sdl dashboard and Detection as code.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Sdl API](https://ai-powered.com/skills/sdl-api): Sdl API is an open-source agent skill for security.
- [Mgmt console API](https://ai-powered.com/skills/mgmt-console-api): Mgmt console API is an open-source agent skill for security.
- [Soc investigator](https://ai-powered.com/skills/soc-investigator): Soc investigator is an open-source agent skill for security.
- [Sdl dashboard](https://ai-powered.com/skills/sdl-dashboard): Sdl dashboard is an open-source agent skill for analytics and data.
- [Detection as code](https://ai-powered.com/skills/detection-as-code): Detection as code is an open-source agent skill for security.
- [Azure kusto irql](https://ai-powered.com/skills/azure-kusto-irql): Azure kusto irql is an open-source agent skill for cloud and infrastructure.
- [Sh detection rules](https://ai-powered.com/skills/sh-detection-rules): Sh detection rules is an open-source agent skill for security.
- [Sh kb sqli](https://ai-powered.com/skills/sh-kb-sqli): Sh kb sqli is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/powerquery
