This project now ships with a local Claude Skill:
.claude/skills/spl2cql-detection/SKILL.md
In Claude Code:
- Open this repository as your working directory.
- Ask naturally for SPL -> CQL translation, debug, or review (auto-trigger).
- Or invoke directly with
/spl2cql-detection. - Edit prompts/docs in
ai/anddocs/normally; no copy/sync into.claude/skillsis required.
This project provides a structured, repeatable workflow to: - Translate Splunk SPL → CrowdStrike LogScale (CQL) - Debug failing queries - Review and optimize detections - Build a reusable knowledge base
Designed for Threat Hunters, Detection Engineers, and SOC teams.
Defines model behavior, rules, and domain context.
- translate_query.md
- debug_query.md
- review_query.md
Real-world validated examples.
Knowledge base and mappings.
Automation workflows.
Lifecycle folders: spl, cql, failed, validated
- Translate (use translate_query.md)
- Execute in LogScale
- Debug if needed
- Review query quality
- Store validated queries
python3 scripts/translate_workflow.py translate ...
python3 scripts/translate_workflow.py debug ...
python3 scripts/translate_workflow.py review ...
Add: - Domain context - Detection patterns - Field mappings - Internal standards
Create structured cases in ai/examples/
Add: - Validation rules - Performance constraints - SOC metadata (MITRE, alert names)
- Build detection library
- Store validated queries
- Maintain golden dataset
- Blind translation
- Field assumptions
- Ignoring aggregation differences
- Start with intent
- Use structured prompts
- Iterate continuously
- API integration
- Auto-validation
- Detection scoring
This is a Detection Engineering assistant workflow, not just prompting.
This project includes a reusable VS Code snippet at:
ai/snippets/spl_to_cql.code-snippets
- Open VS Code.
- Run
Preferences: Configure User Snippets. - Select
New Global Snippets file...(or an existing.code-snippetsfile). - Copy the content from
ai/snippets/spl_to_cql.code-snippetsinto that file. - Save.
- Open any Markdown or text file where you draft prompts.
- Type
spl2cql. - Press
Tab(orEnter) to expand the snippet. - Fill placeholders:
$1: SPL query$2: data source$3: relevant fields$4: detection goal
{
"SPL to CQL Translate": {
"prefix": "spl2cql",
"body": [
"Translate the following Splunk SPL into CrowdStrike LogScale CQL.",
"",
"Requirements:",
"- Preserve detection logic",
"- Do not invent fields",
"- If unsure, explicitly state assumptions",
"",
"### SPL",
"```spl",
"$1",
"```",
"",
"### Context",
"- Source: $2",
"- Fields: $3",
"- Goal: $4"
]
}
}