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.
npx skills add Liberty91LTD/cti-skills --skill kql-writinggit clone --depth 1 https://github.com/Liberty91LTD/cti-skillsWrote 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.
[](https://agentmods.dev/skills/liberty91ltd/cti-skills/kql-writing)<a href="https://agentmods.dev/skills/liberty91ltd/cti-skills/kql-writing"><img src="https://agentmods.dev/badge/skills/liberty91ltd/cti-skills/kql-writing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/liberty91ltd/cti-skills/kql-writing"><img src="https://agentmods.dev/badge/skills/liberty91ltd/cti-skills/kql-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.01609 |
| Opus 5 | $0.00028 | $0.00805 |
| Sonnet 5 | $0.00011 | $0.00322 |
| Haiku 4.5 | $0.00006 | $0.00161 |
Grade A, and why
kql-writing 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
KQL Writing Guide — Microsoft Sentinel
KQL (Kusto Query Language) is used in Microsoft Sentinel, Microsoft Defender, and Azure Data Explorer for querying security logs and building detection rules.
Core Syntax
Table references
SecurityEvent // Windows Security Events
DeviceProcessEvents // Defender for Endpoint
DeviceNetworkEvents // Network connections
DeviceFileEvents // File operations
EmailEvents // Defender for Office 365
SigninLogs // Azure AD sign-ins
AuditLogs // Azure AD audit
CommonSecurityLog // CEF/Syslog
ThreatIntelligenceIndicator // TI feed indicators
Operators
| where TimeGenerated > ago(24h) // Time filter
| where EventID == 4688 // Exact match
| where ProcessCommandLine contains "-enc" // Substring
| where ProcessCommandLine matches regex @".*-e(nc)?.*" // Regex
| where SourceIP !in ("10.0.0.1", "10.0.0.2") // Not in list
| where isnotempty(AccountName) // Not null/empty
| extend NewColumn = extract(@"pattern", 1, SourceField) // Extract
| project TimeGenerated, Account, Computer // Select columns
| summarize count() by bin(TimeGenerated, 1h), Account // Aggregate
| sort by TimeGenerated desc // Sort
| take 100 // Limit results
| join kind=inner (OtherTable) on CommonField // Join
String operators
| Operator | Description | Case-sensitive |
|---|---|---|
== |
Exact match | Yes |
=~ |
Exact match | No |
contains |
Substring | No |
contains_cs |
Substring | Yes |
startswith |
Starts with | No |
endswith |
Ends with | No |
matches regex |
Regex match | Yes |
has |
Word boundary match | No |
in |
In list | Yes |
in~ |
In list | No |
Common Detection Patterns
Suspicious process execution (T1059)
DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where FileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe")
| where ProcessCommandLine contains_cs "-enc"
or ProcessCommandLine contains "bypass"
or ProcessCommandLine contains "downloadstring"
| project TimeGenerated, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName
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.
- 12d ago First seen · 158 lines · 56 tokens per session scan A 276fbca52752
kql-writing is a skill published in the GitHub repository Liberty91LTD/cti-skills (18 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 1,609 once invoked, about $0.0003 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-30.
Other skills, from other repositories
ai-ab-testing
An AI-assisted guide for designing A/B tests, which compare two versions to see which performs better. The description gives no further details about its operation.
ai-accessibility
A Chinese-language assistant for diagnosing accessibility and ease-of-use problems in a page or service. Accessibility means making digital products usable by people with different abilities and needs.
ai-account-research-sales-card
A sales-growth assistant for understanding why a customer is not moving a deal forward. It uses the information you provide to organize the situation and recommend actions.
ai-account-research
A customer-research assistant for breaking down a potential customer and deciding how to approach them. It uses the materials you provide to shape a sales plan.
ai-ad-copy-compliance-review
A risk-review assistant for advertising and sales copy. It examines provided material for possible concerns and suggests actions.
ai-ad-creative
An advertising-creative review assistant for assessing whether an ad idea is likely to attract attention. It examines the material you provide and suggests improvements.