search-and-query
Querying data in LimaCharlie — LCQL generation, validation, execution, cost estimation, saved queries, detection listing, and event schema exploration. Use when searching telemetry, analyzing detections, exploring event types, or running LCQL queries.
What this skill does
# Search & Query How to query and explore data in LimaCharlie using LCQL, detection listing, and event schema tools. ## Critical Rule: NEVER Write LCQL Manually LCQL uses a unique pipe-based syntax validated against org-specific schemas. **LLMs do NOT know correct LCQL syntax.** Any manually written LCQL will be invalid. **ALWAYS use the generation + validation workflow below.** ## LCQL Workflow ### Step 1: Generate Query Convert natural language to LCQL: ```bash limacharlie ai generate-query --prompt "Find all NEW_PROCESS events with encoded PowerShell commands in the last hour" --oid <oid> --output yaml ``` ### Step 2: Validate Query **Mandatory for ALL queries** — even generated ones, user-provided ones, or saved queries: ```bash limacharlie search validate --query "<query>" --oid <oid> --output yaml ``` ### Step 3: Execute Query ```bash start=$(date -d '1 hour ago' +%s) && end=$(date +%s) limacharlie search run --query "<validated_query>" --start $start --end $end --oid <oid> --output yaml ``` Valid `--stream` values: `event`, `detect`, `audit`. ### Cost Estimation (Queries Beyond 30 Days) For queries older than 30 days (paid queries), estimate cost first: ```bash limacharlie search estimate --query "<query>" --start <ts> --end <ts> --oid <oid> --output yaml ``` Show the estimated cost to the user. If estimate > 0, ask for approval before running. ### On Validation Failure Re-call `limacharlie ai generate-query` with the error message in the prompt. Never fix LCQL syntax manually. After 3 failures, report to user. ## Timestamp Rules **NEVER calculate timestamps manually.** LLMs consistently produce incorrect values. ```bash date +%s # Current time (seconds) date -d '1 hour ago' +%s # 1 hour ago date -d '7 days ago' +%s # 7 days ago date -d '2025-01-15 00:00:00 UTC' +%s # Specific date ``` **Milliseconds vs seconds:** - Detection/event data timestamps: **milliseconds** (13 digits) - API parameters (--start, --end): **seconds** (10 digits) - **Always divide by 1000** when using detection timestamps for API queries ## Event Schema Exploration ### List Available Event Types ```bash limacharlie event types --oid <oid> --output yaml # Platform-specific: limacharlie event types --platform windows --oid <oid> --output yaml ``` ### Get Event Schema ```bash limacharlie event schema --event-type NEW_PROCESS --oid <oid> --output yaml ``` ### Check Data Availability ```bash limacharlie event retention --sid <sid> --start <epoch> --end <epoch> --oid <oid> --output yaml ``` ### List Events from a Sensor ```bash start=$(date -d '1 hour ago' +%s) && end=$(date +%s) limacharlie event list --sid <sid> --start $start --end $end --oid <oid> --output yaml ``` ### Get a Specific Event by Atom ```bash limacharlie event get --sid <sid> --atom <atom> --oid <oid> --output yaml ``` ### Get Child Events ```bash limacharlie event children --sid <sid> --atom <atom> --oid <oid> --output yaml ``` ## Detection Listing ### List Detections ```bash start=$(date -d '7 days ago' +%s) && end=$(date +%s) limacharlie detection list --start $start --end $end --oid <oid> --output yaml ``` Filter by category: ```bash limacharlie detection list --start $start --end $end --filter "[?cat=='suspicious_process']" --oid <oid> --output yaml ``` ### Get a Specific Detection ```bash limacharlie detection get --id <detect_id> --oid <oid> --output yaml ``` ## IOC Search Search for indicators of compromise across all sensors in an org: ```bash limacharlie ioc search --type <type> --value "<value>" --oid <oid> --output yaml ``` Valid IOC types: `ip`, `domain`, `file_hash`, `file_path`, `file_name`, `user`, `service_name`, `package_name`. ## Saved Queries ### List Saved Queries ```bash limacharlie search saved-list --oid <oid> --output yaml ``` ### Create Saved Query ```bash limacharlie search saved-create --name <name> --query "<lcql_query>" --stream event --oid <oid> --output yaml ``` ### Run Saved Query ```bash limacharlie search saved-run --name <name> --start <ts> --end <ts> --oid <oid> --output yaml ``` ### Delete Saved Query ```bash limacharlie search saved-delete --name <name> --oid <oid> --output yaml ``` ## Data Streams LimaCharlie has four data streams, each queryable differently: | Stream | Content | Query Method | |--------|---------|-------------| | `event` | Real-time telemetry (processes, DNS, network, files) | LCQL, event list | | `detection` | Alerts from D&R rules | detection list, LCQL | | `audit` | Platform management events | LCQL | | `deployment` | Sensor lifecycle events | LCQL | ## Downloading Large Results When API calls return a `resource_link` URL: ```bash # curl handles decompression automatically — do NOT pipe through gunzip curl -sS "<resource_link_url>" | jq '.' ```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.