What problem does it solve? Writing CloudWatch Logs Insights queries by hand often leads to syntax errors, invalid field references, and commands that silently fail on Infrequent Access log classes. This Skill turns raw log samples and requirements into correct, runnable Logs Insights QL queries with strict validation against AWS syntax rules. ## Core Features & Use Cases - Query construction from log samples: Maps existing fields or extracts new ones with parse (glob or regex), then builds fields, filter, stats, sort, and limit clauses in the correct order. - Syntax and constraint validation: Enforces rules such as the two-stats limit, backtick escaping for special field names, and log class restrictions (pattern, diff, filterIndex, unmask unsupported on Infrequent Access). - Ready-to-adapt query patterns: Includes reference patterns for error trends, p95 latency by route, top endpoints, deduplication, and two-stage stats rollups. - Use Case: Given a JSON application log sample, generate a query that computes p95 latency per endpoint over 5-minute bins, with all inferred field mappings documented. ## Quick Start Ask the agent to build a CloudWatch Logs Insights query from your pasted log sample, specifying the log class, time range, and desired aggregation.