[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M755C1H157AS3QM1PFFD2885":3,"skill-same:01M755C1H157AS3QM1PFFD2885":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":39,"commitSha":40,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M755C1H157AS3QM1PFFD2885","performing-cloud-log-forensics-with-athena",null,"Uses AWS Athena to query CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs for forensic investigation. Covers CREATE TABLE DDL with partition projection, forensic SQL queries for detecting unauthorized access, data exfiltration, lateral movement, and privilege escalation. Use when investigating AWS security incidents or building cloud-native forensic workflows at scale.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-cloud-log-forensics-with-athena\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-cloud-log-forensics-with-athena\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: performing-cloud-log-forensics-with-athena\ndescription: >\n  Uses AWS Athena to query CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs\n  for forensic investigation. Covers CREATE TABLE DDL with partition projection,\n  forensic SQL queries for detecting unauthorized access, data exfiltration, lateral\n  movement, and privilege escalation. Use when investigating AWS security incidents\n  or building cloud-native forensic workflows at scale.\ndomain: cybersecurity\nsubdomain: cloud-security\ntags: [cloud, forensics, athena, aws, cloudtrail, vpc-flow-logs, s3, alb]\nversion: \"1.0\"\nauthor: mukul975\nlicense: Apache-2.0\n---\n\n# Performing Cloud Log Forensics with AWS Athena\n\n## When to Use\n\n- When investigating AWS security incidents that require querying massive volumes of cloud logs\n- When performing forensic analysis across CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs\n- When building reusable Athena tables with partition projection for ongoing incident response\n- When hunting for indicators of compromise across multiple AWS log sources simultaneously\n- When creating evidence-grade SQL queries for compliance audits or legal proceedings\n\n## Prerequisites\n\n- AWS account with Athena, S3, and Glue permissions\n- CloudTrail configured to deliver logs to an S3 bucket\n- VPC Flow Logs enabled and publishing to S3\n- S3 server access logging enabled on target buckets\n- ALB access logging enabled and publishing to S3\n- Python 3.8+ with boto3 installed\n- Appropriate IAM permissions for Athena queries and S3 access\n\n## Instructions\n\n### Phase 1: Create Athena Database and CloudTrail Table\n\nCreate a dedicated forensics database and CloudTrail table using partition projection\nto automatically discover partitions without manual ALTER TABLE statements.\n\n```sql\nCREATE DATABASE IF NOT EXISTS cloud_forensics;\n\nCREATE EXTERNAL TABLE cloud_forensics.cloudtrail_logs (\n    eventVersion STRING,\n    userIdentity STRUCT\u003C\n        type: STRING,\n        principalId: STRING,\n        arn: STRING,\n        accountId: STRING,\n        invokedBy: STRING,\n        accessKeyId: STRING,\n        userName: STRING,\n        sessionContext: STRUCT\u003C\n            attributes: STRUCT\u003C\n                mfaAuthenticated: STRING,\n                creationDate: STRING>,\n            sessionIssuer: STRUCT\u003C\n                type: STRING,\n                principalId: STRING,\n                arn: STRING,\n                accountId: STRING,\n                userName: STRING>,\n            ec2RoleDelivery: STRING,\n            webIdFederationData: STRUCT\u003C\n                federatedProvider: STRING,\n                attributes: MAP\u003CSTRING, STRING>>>>,\n    eventTime STRING,\n    eventSource STRING,\n    eventName STRING,\n    awsRegion STRING,\n    sourceIPAddress STRING,\n    userAgent STRING,\n    errorCode STRING,\n    errorMessage STRING,\n    requestParameters STRING,\n    responseElements STRING,\n    additionalEventData STRING,\n    requestId STRING,\n    eventId STRING,\n    readOnly STRING,\n    resources ARRAY\u003CSTRUCT\u003C\n        arn: STRING,\n        accountId: STRING,\n        type: STRING>>,\n    eventType STRING,\n    apiVersion STRING,\n    recipientAccountId STRING,\n    serviceEventDetails STRING,\n    sharedEventID STRING,\n    vpcEndpointId STRING,\n    tlsDetails STRUCT\u003C\n        tlsVersion: STRING,\n        cipherSuite: STRING,\n        clientProvidedHostHeader: STRING>\n)\nCOMMENT 'CloudTrail logs with partition projection for forensic analysis'\nPARTITIONED BY (\n    `account` STRING,\n    `region` STRING,\n    `timestamp` STRING\n)\nROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'\nSTORED AS INPUTFORMAT 'com.amazon.emr.cloudtrail.CloudTrailInputFormat'\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION 's3:\u002F\u002FYOUR-CLOUDTRAIL-BUCKET\u002FAWSLogs\u002F'\nTBLPROPERTIES (\n    'projection.enabled' = 'true',\n    'projection.account.type' = 'enum',\n    'projection.account.values' = 'YOUR_ACCOUNT_ID',\n    'projection.region.type' = 'enum',\n    'projection.region.values' = 'us-east-1,us-west-2,eu-west-1',\n    'projection.timestamp.type' = 'date',\n    'projection.timestamp.format' = 'yyyy\u002FMM\u002Fdd',\n    'projection.timestamp.range' = '2023\u002F01\u002F01,NOW',\n    'projection.timestamp.interval' = '1',\n    'projection.timestamp.interval.unit' = 'DAYS',\n    'storage.location.template' = 's3:\u002F\u002FYOUR-CLOUDTRAIL-BUCKET\u002FAWSLogs\u002F${account}\u002FCloudTrail\u002F${region}\u002F${timestamp}'\n);\n```\n\n### Phase 2: Create VPC Flow Logs Table\n\n```sql\nCREATE EXTERNAL TABLE cloud_forensics.vpc_flow_logs (\n    version INT,\n    account_id STRING,\n    interface_id STRING,\n    srcaddr STRING,\n    dstaddr STRING,\n    srcport INT,\n    dstport INT,\n    protocol BIGINT,\n    packets BIGINT,\n    bytes BIGINT,\n    start BIGINT,\n    `end` BIGINT,\n    action STRING,\n    log_status STRING,\n    vpc_id STRING,\n    subnet_id STRING,\n    az_id STRING,\n    sublocation_type STRING,\n    sublocation_id STRING,\n    pkt_srcaddr STRING,\n    pkt_dstaddr STRING,\n    region STRING,\n    pkt_src_aws_service STRING,\n    pkt_dst_aws_service STRING,\n    flow_direction STRING,\n    traffic_path INT\n)\nPARTITIONED BY (\n    `date` STRING\n)\nROW FORMAT DELIMITED\nFIELDS TERMINATED BY ' '\nLOCATION 's3:\u002F\u002FYOUR-VPC-FLOW-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Fvpcflowlogs\u002F'\nTBLPROPERTIES (\n    'skip.header.line.count' = '1',\n    'projection.enabled' = 'true',\n    'projection.date.type' = 'date',\n    'projection.date.format' = 'yyyy\u002FMM\u002Fdd',\n    'projection.date.range' = '2023\u002F01\u002F01,NOW',\n    'projection.date.interval' = '1',\n    'projection.date.interval.unit' = 'DAYS',\n    'storage.location.template' = 's3:\u002F\u002FYOUR-VPC-FLOW-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Fvpcflowlogs\u002Fus-east-1\u002F${date}'\n);\n```\n\n### Phase 3: Create S3 Access Logs Table\n\n```sql\nCREATE EXTERNAL TABLE cloud_forensics.s3_access_logs (\n    bucket_owner STRING,\n    bucket_name STRING,\n    request_datetime STRING,\n    remote_ip STRING,\n    requester STRING,\n    request_id STRING,\n    operation STRING,\n    key STRING,\n    request_uri STRING,\n    http_status INT,\n    error_code STRING,\n    bytes_sent BIGINT,\n    object_size BIGINT,\n    total_time INT,\n    turn_around_time INT,\n    referrer STRING,\n    user_agent STRING,\n    version_id STRING,\n    host_id STRING,\n    signature_version STRING,\n    cipher_suite STRING,\n    authentication_type STRING,\n    host_header STRING,\n    tls_version STRING,\n    access_point_arn STRING,\n    acl_required STRING\n)\nROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'\nWITH SERDEPROPERTIES (\n    'serialization.format' = '1',\n    'input.regex' = '([^ ]*) ([^ ]*) \\\\[(.*?)\\\\] ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) (\\\"[^\\\"]*\\\"|-) (-|[0-9]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) (\\\"[^\\\"]*\\\"|-) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*)'\n)\nSTORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION 's3:\u002F\u002FYOUR-S3-ACCESS-LOGS-BUCKET\u002Flogs\u002F';\n```\n\n### Phase 4: Create ALB Access Logs Table\n\n```sql\nCREATE EXTERNAL TABLE cloud_forensics.alb_access_logs (\n    type STRING,\n    time STRING,\n    elb STRING,\n    client_ip STRING,\n    client_port INT,\n    target_ip STRING,\n    target_port INT,\n    request_processing_time DOUBLE,\n    target_processing_time DOUBLE,\n    response_processing_time DOUBLE,\n    elb_status_code INT,\n    target_status_code STRING,\n    received_bytes BIGINT,\n    sent_bytes BIGINT,\n    request_verb STRING,\n    request_url STRING,\n    request_proto STRING,\n    user_agent STRING,\n    ssl_cipher STRING,\n    ssl_protocol STRING,\n    target_group_arn STRING,\n    trace_id STRING,\n    domain_name STRING,\n    chosen_cert_arn STRING,\n    matched_rule_priority STRING,\n    request_creation_time STRING,\n    actions_executed STRING,\n    redirect_url STRING,\n    lambda_error_reason STRING,\n    target_port_list STRING,\n    target_status_code_list STRING,\n    classification STRING,\n    classification_reason STRING,\n    conn_trace_id STRING\n)\nPARTITIONED BY (\n    `day` STRING\n)\nROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'\nWITH SERDEPROPERTIES (\n    'serialization.format' = '1',\n    'input.regex' = '([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*)[:-]([0-9]*) ([-.0-9]*) ([-.0-9]*) ([-.0-9]*) (|[0-9]*) (-|[0-9]*) ([-0-9]*) ([-0-9]*) \\\"([^ ]*) (.*) (- |[^ ]*)\\\" \\\"([^\\\"]*)\\\" ([A-Z0-9-_]+) ([A-Za-z0-9.-]*) ([^ ]*) \\\"([^\\\"]*)\\\" \\\"([^\\\"]*)\\\" \\\"([^\\\"]*)\\\" ([-.0-9]*) ([^ ]*) \\\"([^\\\"]*)\\\" \\\"([^\\\"]*)\\\" \\\"([^ ]*)\\\" \\\"([^\\\"]*)\\\" \\\"([^ ]*)\\\" \\\"([^ ]*)\\\" \\\"([^ ]*)\\\"'\n)\nSTORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION 's3:\u002F\u002FYOUR-ALB-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Felasticloadbalancing\u002Fus-east-1\u002F'\nTBLPROPERTIES (\n    'projection.enabled' = 'true',\n    'projection.day.type' = 'date',\n    'projection.day.format' = 'yyyy\u002FMM\u002Fdd',\n    'projection.day.range' = '2023\u002F01\u002F01,NOW',\n    'projection.day.interval' = '1',\n    'projection.day.interval.unit' = 'DAYS',\n    'storage.location.template' = 's3:\u002F\u002FYOUR-ALB-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Felasticloadbalancing\u002Fus-east-1\u002F${day}'\n);\n```\n\n### Phase 5: Forensic Investigation Queries\n\n#### Detect Unauthorized API Calls\n\n```sql\nSELECT\n    eventtime,\n    useridentity.arn AS caller_arn,\n    useridentity.accountid AS account,\n    eventsource,\n    eventname,\n    errorcode,\n    errormessage,\n    sourceipaddress,\n    useragent\nFROM cloud_forensics.cloudtrail_logs\nWHERE errorcode IN ('AccessDenied', 'UnauthorizedAccess', 'Client.UnauthorizedAccess')\n    AND timestamp BETWEEN '2024\u002F01\u002F01' AND '2024\u002F12\u002F31'\nORDER BY eventtime DESC\nLIMIT 1000;\n```\n\n#### Detect Privilege Escalation Attempts\n\n```sql\nSELECT\n    eventtime,\n    useridentity.arn AS actor,\n    eventname,\n    eventsource,\n    json_extract_scalar(requestparameters, '$.policyArn') AS policy_arn,\n    json_extract_scalar(requestparameters, '$.roleName') AS role_name,\n    json_extract_scalar(requestparameters, '$.userName') AS target_user,\n    sourceipaddress\nFROM cloud_forensics.cloudtrail_logs\nWHERE eventname IN (\n    'AttachUserPolicy', 'AttachRolePolicy', 'AttachGroupPolicy',\n    'PutUserPolicy', 'PutRolePolicy', 'PutGroupPolicy',\n    'CreatePolicyVersion', 'SetDefaultPolicyVersion',\n    'AddUserToGroup', 'UpdateAssumeRolePolicy',\n    'CreateAccessKey', 'CreateLoginProfile',\n    'UpdateLoginProfile', 'AssumeRole'\n)\n    AND timestamp BETWEEN '2024\u002F01\u002F01' AND '2024\u002F12\u002F31'\nORDER BY eventtime DESC;\n```\n\n#### Detect Data Exfiltration via S3\n\n```sql\nSELECT\n    eventtime,\n    useridentity.arn AS actor,\n    eventname,\n    json_extract_scalar(requestparameters, '$.bucketName') AS bucket,\n    json_extract_scalar(requestparameters, '$.key') AS object_key,\n    sourceipaddress,\n    useragent\nFROM cloud_forensics.cloudtrail_logs\nWHERE eventsource = 's3.amazonaws.com'\n    AND eventname IN ('GetObject', 'CopyObject', 'PutBucketPolicy',\n                      'PutBucketAcl', 'PutObjectAcl', 'SelectObjectContent')\n    AND sourceipaddress NOT LIKE '10.%'\n    AND sourceipaddress NOT LIKE '172.%'\n    AND sourceipaddress NOT LIKE '192.168.%'\n    AND timestamp BETWEEN '2024\u002F01\u002F01' AND '2024\u002F12\u002F31'\nORDER BY eventtime DESC;\n```\n\n#### Detect Lateral Movement via VPC Flow Logs\n\n```sql\nSELECT\n    srcaddr,\n    dstaddr,\n    dstport,\n    protocol,\n    SUM(packets) AS total_packets,\n    SUM(bytes) AS total_bytes,\n    COUNT(*) AS connection_count,\n    MIN(from_unixtime(start)) AS first_seen,\n    MAX(from_unixtime(\"end\")) AS last_seen\nFROM cloud_forensics.vpc_flow_logs\nWHERE action = 'ACCEPT'\n    AND srcaddr LIKE '10.%'\n    AND dstport IN (22, 3389, 5985, 5986, 445, 135, 139)\n    AND date BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nGROUP BY srcaddr, dstaddr, dstport, protocol\nHAVING COUNT(*) > 100\nORDER BY connection_count DESC;\n```\n\n#### Detect Port Scanning Activity\n\n```sql\nSELECT\n    srcaddr,\n    COUNT(DISTINCT dstport) AS unique_ports_scanned,\n    COUNT(DISTINCT dstaddr) AS unique_targets,\n    SUM(packets) AS total_packets,\n    MIN(from_unixtime(start)) AS first_seen,\n    MAX(from_unixtime(\"end\")) AS last_seen\nFROM cloud_forensics.vpc_flow_logs\nWHERE action = 'REJECT'\n    AND date BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nGROUP BY srcaddr\nHAVING COUNT(DISTINCT dstport) > 25\nORDER BY unique_ports_scanned DESC;\n```\n\n#### Detect Suspicious S3 Bulk Downloads\n\n```sql\nSELECT\n    remote_ip,\n    requester,\n    bucket_name,\n    COUNT(*) AS request_count,\n    SUM(bytes_sent) AS total_bytes_downloaded,\n    COUNT(DISTINCT key) AS unique_objects,\n    MIN(request_datetime) AS first_request,\n    MAX(request_datetime) AS last_request\nFROM cloud_forensics.s3_access_logs\nWHERE operation LIKE '%GET%'\n    AND http_status = 200\nGROUP BY remote_ip, requester, bucket_name\nHAVING COUNT(*) > 500\nORDER BY total_bytes_downloaded DESC;\n```\n\n#### Detect ALB-Level Injection Attempts\n\n```sql\nSELECT\n    time,\n    client_ip,\n    request_verb,\n    request_url,\n    elb_status_code,\n    target_status_code,\n    user_agent\nFROM cloud_forensics.alb_access_logs\nWHERE (\n    request_url LIKE '%UNION%SELECT%'\n    OR request_url LIKE '%\u003Cscript%'\n    OR request_url LIKE '%..\u002F..\u002F..\u002F%'\n    OR request_url LIKE '%\u002Fetc\u002Fpasswd%'\n    OR request_url LIKE '%cmd.exe%'\n    OR request_url LIKE '%\u002Fproc\u002Fself%'\n    OR request_url LIKE '%SLEEP(%'\n    OR request_url LIKE '%WAITFOR%'\n)\n    AND day BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nORDER BY time DESC;\n```\n\n### Phase 6: Cross-Log Correlation\n\nCorrelate findings across log sources for comprehensive incident timelines.\n\n```sql\n-- Correlate suspicious CloudTrail actor with VPC Flow Logs\nWITH suspicious_ips AS (\n    SELECT DISTINCT sourceipaddress AS ip\n    FROM cloud_forensics.cloudtrail_logs\n    WHERE errorcode = 'AccessDenied'\n        AND timestamp BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\n)\nSELECT\n    v.srcaddr,\n    v.dstaddr,\n    v.dstport,\n    v.protocol,\n    SUM(v.bytes) AS total_bytes,\n    COUNT(*) AS flow_count\nFROM cloud_forensics.vpc_flow_logs v\nJOIN suspicious_ips s ON v.srcaddr = s.ip\nWHERE v.date BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nGROUP BY v.srcaddr, v.dstaddr, v.dstport, v.protocol\nORDER BY total_bytes DESC;\n```\n\n## Examples\n\n```python\n# Quick-start: run the forensics agent for a full investigation\npython agent.py \\\n    --action full_investigation \\\n    --database cloud_forensics \\\n    --start-date 2024-06-01 \\\n    --end-date 2024-06-30 \\\n    --output forensics_report.json\n\n# Run specific queries only\npython agent.py \\\n    --action privilege_escalation \\\n    --database cloud_forensics \\\n    --start-date 2024-06-15 \\\n    --end-date 2024-06-16\n\n# Create all forensic tables from scratch\npython agent.py \\\n    --action setup_tables \\\n    --cloudtrail-bucket my-cloudtrail-logs \\\n    --vpc-flow-bucket my-vpc-flow-logs \\\n    --s3-access-bucket my-s3-access-logs \\\n    --alb-bucket my-alb-logs \\\n    --account-id 123456789012 \\\n    --regions us-east-1,us-west-2\n```\n","# Performing Cloud Log Forensics with AWS Athena\n\n## When to Use\n\n- When investigating AWS security incidents that require querying massive volumes of cloud logs\n- When performing forensic analysis across CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs\n- When building reusable Athena tables with partition projection for ongoing incident response\n- When hunting for indicators of compromise across multiple AWS log sources simultaneously\n- When creating evidence-grade SQL queries for compliance audits or legal proceedings\n\n## Prerequisites\n\n- AWS account with Athena, S3, and Glue permissions\n- CloudTrail configured to deliver logs to an S3 bucket\n- VPC Flow Logs enabled and publishing to S3\n- S3 server access logging enabled on target buckets\n- ALB access logging enabled and publishing to S3\n- Python 3.8+ with boto3 installed\n- Appropriate IAM permissions for Athena queries and S3 access\n\n## Instructions\n\n### Phase 1: Create Athena Database and CloudTrail Table\n\nCreate a dedicated forensics database and CloudTrail table using partition projection\nto automatically discover partitions without manual ALTER TABLE statements.\n\n```sql\nCREATE DATABASE IF NOT EXISTS cloud_forensics;\n\nCREATE EXTERNAL TABLE cloud_forensics.cloudtrail_logs (\n    eventVersion STRING,\n    userIdentity STRUCT\u003C\n        type: STRING,\n        principalId: STRING,\n        arn: STRING,\n        accountId: STRING,\n        invokedBy: STRING,\n        accessKeyId: STRING,\n        userName: STRING,\n        sessionContext: STRUCT\u003C\n            attributes: STRUCT\u003C\n                mfaAuthenticated: STRING,\n                creationDate: STRING>,\n            sessionIssuer: STRUCT\u003C\n                type: STRING,\n                principalId: STRING,\n                arn: STRING,\n                accountId: STRING,\n                userName: STRING>,\n            ec2RoleDelivery: STRING,\n            webIdFederationData: STRUCT\u003C\n                federatedProvider: STRING,\n                attributes: MAP\u003CSTRING, STRING>>>>,\n    eventTime STRING,\n    eventSource STRING,\n    eventName STRING,\n    awsRegion STRING,\n    sourceIPAddress STRING,\n    userAgent STRING,\n    errorCode STRING,\n    errorMessage STRING,\n    requestParameters STRING,\n    responseElements STRING,\n    additionalEventData STRING,\n    requestId STRING,\n    eventId STRING,\n    readOnly STRING,\n    resources ARRAY\u003CSTRUCT\u003C\n        arn: STRING,\n        accountId: STRING,\n        type: STRING>>,\n    eventType STRING,\n    apiVersion STRING,\n    recipientAccountId STRING,\n    serviceEventDetails STRING,\n    sharedEventID STRING,\n    vpcEndpointId STRING,\n    tlsDetails STRUCT\u003C\n        tlsVersion: STRING,\n        cipherSuite: STRING,\n        clientProvidedHostHeader: STRING>\n)\nCOMMENT 'CloudTrail logs with partition projection for forensic analysis'\nPARTITIONED BY (\n    `account` STRING,\n    `region` STRING,\n    `timestamp` STRING\n)\nROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'\nSTORED AS INPUTFORMAT 'com.amazon.emr.cloudtrail.CloudTrailInputFormat'\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION 's3:\u002F\u002FYOUR-CLOUDTRAIL-BUCKET\u002FAWSLogs\u002F'\nTBLPROPERTIES (\n    'projection.enabled' = 'true',\n    'projection.account.type' = 'enum',\n    'projection.account.values' = 'YOUR_ACCOUNT_ID',\n    'projection.region.type' = 'enum',\n    'projection.region.values' = 'us-east-1,us-west-2,eu-west-1',\n    'projection.timestamp.type' = 'date',\n    'projection.timestamp.format' = 'yyyy\u002FMM\u002Fdd',\n    'projection.timestamp.range' = '2023\u002F01\u002F01,NOW',\n    'projection.timestamp.interval' = '1',\n    'projection.timestamp.interval.unit' = 'DAYS',\n    'storage.location.template' = 's3:\u002F\u002FYOUR-CLOUDTRAIL-BUCKET\u002FAWSLogs\u002F${account}\u002FCloudTrail\u002F${region}\u002F${timestamp}'\n);\n```\n\n### Phase 2: Create VPC Flow Logs Table\n\n```sql\nCREATE EXTERNAL TABLE cloud_forensics.vpc_flow_logs (\n    version INT,\n    account_id STRING,\n    interface_id STRING,\n    srcaddr STRING,\n    dstaddr STRING,\n    srcport INT,\n    dstport INT,\n    protocol BIGINT,\n    packets BIGINT,\n    bytes BIGINT,\n    start BIGINT,\n    `end` BIGINT,\n    action STRING,\n    log_status STRING,\n    vpc_id STRING,\n    subnet_id STRING,\n    az_id STRING,\n    sublocation_type STRING,\n    sublocation_id STRING,\n    pkt_srcaddr STRING,\n    pkt_dstaddr STRING,\n    region STRING,\n    pkt_src_aws_service STRING,\n    pkt_dst_aws_service STRING,\n    flow_direction STRING,\n    traffic_path INT\n)\nPARTITIONED BY (\n    `date` STRING\n)\nROW FORMAT DELIMITED\nFIELDS TERMINATED BY ' '\nLOCATION 's3:\u002F\u002FYOUR-VPC-FLOW-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Fvpcflowlogs\u002F'\nTBLPROPERTIES (\n    'skip.header.line.count' = '1',\n    'projection.enabled' = 'true',\n    'projection.date.type' = 'date',\n    'projection.date.format' = 'yyyy\u002FMM\u002Fdd',\n    'projection.date.range' = '2023\u002F01\u002F01,NOW',\n    'projection.date.interval' = '1',\n    'projection.date.interval.unit' = 'DAYS',\n    'storage.location.template' = 's3:\u002F\u002FYOUR-VPC-FLOW-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Fvpcflowlogs\u002Fus-east-1\u002F${date}'\n);\n```\n\n### Phase 3: Create S3 Access Logs Table\n\n```sql\nCREATE EXTERNAL TABLE cloud_forensics.s3_access_logs (\n    bucket_owner STRING,\n    bucket_name STRING,\n    request_datetime STRING,\n    remote_ip STRING,\n    requester STRING,\n    request_id STRING,\n    operation STRING,\n    key STRING,\n    request_uri STRING,\n    http_status INT,\n    error_code STRING,\n    bytes_sent BIGINT,\n    object_size BIGINT,\n    total_time INT,\n    turn_around_time INT,\n    referrer STRING,\n    user_agent STRING,\n    version_id STRING,\n    host_id STRING,\n    signature_version STRING,\n    cipher_suite STRING,\n    authentication_type STRING,\n    host_header STRING,\n    tls_version STRING,\n    access_point_arn STRING,\n    acl_required STRING\n)\nROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'\nWITH SERDEPROPERTIES (\n    'serialization.format' = '1',\n    'input.regex' = '([^ ]*) ([^ ]*) \\\\[(.*?)\\\\] ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) (\\\"[^\\\"]*\\\"|-) (-|[0-9]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) (\\\"[^\\\"]*\\\"|-) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*)'\n)\nSTORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION 's3:\u002F\u002FYOUR-S3-ACCESS-LOGS-BUCKET\u002Flogs\u002F';\n```\n\n### Phase 4: Create ALB Access Logs Table\n\n```sql\nCREATE EXTERNAL TABLE cloud_forensics.alb_access_logs (\n    type STRING,\n    time STRING,\n    elb STRING,\n    client_ip STRING,\n    client_port INT,\n    target_ip STRING,\n    target_port INT,\n    request_processing_time DOUBLE,\n    target_processing_time DOUBLE,\n    response_processing_time DOUBLE,\n    elb_status_code INT,\n    target_status_code STRING,\n    received_bytes BIGINT,\n    sent_bytes BIGINT,\n    request_verb STRING,\n    request_url STRING,\n    request_proto STRING,\n    user_agent STRING,\n    ssl_cipher STRING,\n    ssl_protocol STRING,\n    target_group_arn STRING,\n    trace_id STRING,\n    domain_name STRING,\n    chosen_cert_arn STRING,\n    matched_rule_priority STRING,\n    request_creation_time STRING,\n    actions_executed STRING,\n    redirect_url STRING,\n    lambda_error_reason STRING,\n    target_port_list STRING,\n    target_status_code_list STRING,\n    classification STRING,\n    classification_reason STRING,\n    conn_trace_id STRING\n)\nPARTITIONED BY (\n    `day` STRING\n)\nROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'\nWITH SERDEPROPERTIES (\n    'serialization.format' = '1',\n    'input.regex' = '([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*)[:-]([0-9]*) ([-.0-9]*) ([-.0-9]*) ([-.0-9]*) (|[0-9]*) (-|[0-9]*) ([-0-9]*) ([-0-9]*) \\\"([^ ]*) (.*) (- |[^ ]*)\\\" \\\"([^\\\"]*)\\\" ([A-Z0-9-_]+) ([A-Za-z0-9.-]*) ([^ ]*) \\\"([^\\\"]*)\\\" \\\"([^\\\"]*)\\\" \\\"([^\\\"]*)\\\" ([-.0-9]*) ([^ ]*) \\\"([^\\\"]*)\\\" \\\"([^\\\"]*)\\\" \\\"([^ ]*)\\\" \\\"([^\\\"]*)\\\" \\\"([^ ]*)\\\" \\\"([^ ]*)\\\" \\\"([^ ]*)\\\"'\n)\nSTORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\nLOCATION 's3:\u002F\u002FYOUR-ALB-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Felasticloadbalancing\u002Fus-east-1\u002F'\nTBLPROPERTIES (\n    'projection.enabled' = 'true',\n    'projection.day.type' = 'date',\n    'projection.day.format' = 'yyyy\u002FMM\u002Fdd',\n    'projection.day.range' = '2023\u002F01\u002F01,NOW',\n    'projection.day.interval' = '1',\n    'projection.day.interval.unit' = 'DAYS',\n    'storage.location.template' = 's3:\u002F\u002FYOUR-ALB-LOGS-BUCKET\u002FAWSLogs\u002FYOUR_ACCOUNT_ID\u002Felasticloadbalancing\u002Fus-east-1\u002F${day}'\n);\n```\n\n### Phase 5: Forensic Investigation Queries\n\n#### Detect Unauthorized API Calls\n\n```sql\nSELECT\n    eventtime,\n    useridentity.arn AS caller_arn,\n    useridentity.accountid AS account,\n    eventsource,\n    eventname,\n    errorcode,\n    errormessage,\n    sourceipaddress,\n    useragent\nFROM cloud_forensics.cloudtrail_logs\nWHERE errorcode IN ('AccessDenied', 'UnauthorizedAccess', 'Client.UnauthorizedAccess')\n    AND timestamp BETWEEN '2024\u002F01\u002F01' AND '2024\u002F12\u002F31'\nORDER BY eventtime DESC\nLIMIT 1000;\n```\n\n#### Detect Privilege Escalation Attempts\n\n```sql\nSELECT\n    eventtime,\n    useridentity.arn AS actor,\n    eventname,\n    eventsource,\n    json_extract_scalar(requestparameters, '$.policyArn') AS policy_arn,\n    json_extract_scalar(requestparameters, '$.roleName') AS role_name,\n    json_extract_scalar(requestparameters, '$.userName') AS target_user,\n    sourceipaddress\nFROM cloud_forensics.cloudtrail_logs\nWHERE eventname IN (\n    'AttachUserPolicy', 'AttachRolePolicy', 'AttachGroupPolicy',\n    'PutUserPolicy', 'PutRolePolicy', 'PutGroupPolicy',\n    'CreatePolicyVersion', 'SetDefaultPolicyVersion',\n    'AddUserToGroup', 'UpdateAssumeRolePolicy',\n    'CreateAccessKey', 'CreateLoginProfile',\n    'UpdateLoginProfile', 'AssumeRole'\n)\n    AND timestamp BETWEEN '2024\u002F01\u002F01' AND '2024\u002F12\u002F31'\nORDER BY eventtime DESC;\n```\n\n#### Detect Data Exfiltration via S3\n\n```sql\nSELECT\n    eventtime,\n    useridentity.arn AS actor,\n    eventname,\n    json_extract_scalar(requestparameters, '$.bucketName') AS bucket,\n    json_extract_scalar(requestparameters, '$.key') AS object_key,\n    sourceipaddress,\n    useragent\nFROM cloud_forensics.cloudtrail_logs\nWHERE eventsource = 's3.amazonaws.com'\n    AND eventname IN ('GetObject', 'CopyObject', 'PutBucketPolicy',\n                      'PutBucketAcl', 'PutObjectAcl', 'SelectObjectContent')\n    AND sourceipaddress NOT LIKE '10.%'\n    AND sourceipaddress NOT LIKE '172.%'\n    AND sourceipaddress NOT LIKE '192.168.%'\n    AND timestamp BETWEEN '2024\u002F01\u002F01' AND '2024\u002F12\u002F31'\nORDER BY eventtime DESC;\n```\n\n#### Detect Lateral Movement via VPC Flow Logs\n\n```sql\nSELECT\n    srcaddr,\n    dstaddr,\n    dstport,\n    protocol,\n    SUM(packets) AS total_packets,\n    SUM(bytes) AS total_bytes,\n    COUNT(*) AS connection_count,\n    MIN(from_unixtime(start)) AS first_seen,\n    MAX(from_unixtime(\"end\")) AS last_seen\nFROM cloud_forensics.vpc_flow_logs\nWHERE action = 'ACCEPT'\n    AND srcaddr LIKE '10.%'\n    AND dstport IN (22, 3389, 5985, 5986, 445, 135, 139)\n    AND date BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nGROUP BY srcaddr, dstaddr, dstport, protocol\nHAVING COUNT(*) > 100\nORDER BY connection_count DESC;\n```\n\n#### Detect Port Scanning Activity\n\n```sql\nSELECT\n    srcaddr,\n    COUNT(DISTINCT dstport) AS unique_ports_scanned,\n    COUNT(DISTINCT dstaddr) AS unique_targets,\n    SUM(packets) AS total_packets,\n    MIN(from_unixtime(start)) AS first_seen,\n    MAX(from_unixtime(\"end\")) AS last_seen\nFROM cloud_forensics.vpc_flow_logs\nWHERE action = 'REJECT'\n    AND date BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nGROUP BY srcaddr\nHAVING COUNT(DISTINCT dstport) > 25\nORDER BY unique_ports_scanned DESC;\n```\n\n#### Detect Suspicious S3 Bulk Downloads\n\n```sql\nSELECT\n    remote_ip,\n    requester,\n    bucket_name,\n    COUNT(*) AS request_count,\n    SUM(bytes_sent) AS total_bytes_downloaded,\n    COUNT(DISTINCT key) AS unique_objects,\n    MIN(request_datetime) AS first_request,\n    MAX(request_datetime) AS last_request\nFROM cloud_forensics.s3_access_logs\nWHERE operation LIKE '%GET%'\n    AND http_status = 200\nGROUP BY remote_ip, requester, bucket_name\nHAVING COUNT(*) > 500\nORDER BY total_bytes_downloaded DESC;\n```\n\n#### Detect ALB-Level Injection Attempts\n\n```sql\nSELECT\n    time,\n    client_ip,\n    request_verb,\n    request_url,\n    elb_status_code,\n    target_status_code,\n    user_agent\nFROM cloud_forensics.alb_access_logs\nWHERE (\n    request_url LIKE '%UNION%SELECT%'\n    OR request_url LIKE '%\u003Cscript%'\n    OR request_url LIKE '%..\u002F..\u002F..\u002F%'\n    OR request_url LIKE '%\u002Fetc\u002Fpasswd%'\n    OR request_url LIKE '%cmd.exe%'\n    OR request_url LIKE '%\u002Fproc\u002Fself%'\n    OR request_url LIKE '%SLEEP(%'\n    OR request_url LIKE '%WAITFOR%'\n)\n    AND day BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nORDER BY time DESC;\n```\n\n### Phase 6: Cross-Log Correlation\n\nCorrelate findings across log sources for comprehensive incident timelines.\n\n```sql\n-- Correlate suspicious CloudTrail actor with VPC Flow Logs\nWITH suspicious_ips AS (\n    SELECT DISTINCT sourceipaddress AS ip\n    FROM cloud_forensics.cloudtrail_logs\n    WHERE errorcode = 'AccessDenied'\n        AND timestamp BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\n)\nSELECT\n    v.srcaddr,\n    v.dstaddr,\n    v.dstport,\n    v.protocol,\n    SUM(v.bytes) AS total_bytes,\n    COUNT(*) AS flow_count\nFROM cloud_forensics.vpc_flow_logs v\nJOIN suspicious_ips s ON v.srcaddr = s.ip\nWHERE v.date BETWEEN '2024\u002F06\u002F01' AND '2024\u002F06\u002F30'\nGROUP BY v.srcaddr, v.dstaddr, v.dstport, v.protocol\nORDER BY total_bytes DESC;\n```\n\n## Examples\n\n```python\n# Quick-start: run the forensics agent for a full investigation\npython agent.py \\\n    --action full_investigation \\\n    --database cloud_forensics \\\n    --start-date 2024-06-01 \\\n    --end-date 2024-06-30 \\\n    --output forensics_report.json\n\n# Run specific queries only\npython agent.py \\\n    --action privilege_escalation \\\n    --database cloud_forensics \\\n    --start-date 2024-06-15 \\\n    --end-date 2024-06-16\n\n# Create all forensic tables from scratch\npython agent.py \\\n    --action setup_tables \\\n    --cloudtrail-bucket my-cloudtrail-logs \\\n    --vpc-flow-bucket my-vpc-flow-logs \\\n    --s3-access-bucket my-s3-access-logs \\\n    --alb-bucket my-alb-logs \\\n    --account-id 123456789012 \\\n    --regions us-east-1,us-west-2\n```\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"subdomain":37,"description":38},[26,27,28,29,30,31,32,33],"cloud","forensics","athena","aws","cloudtrail","vpc-flow-logs","s3","alb","mukul975","cybersecurity","1.0","cloud-security","Uses AWS Athena to query CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs for forensic investigation. Covers CREATE TABLE DDL with partition projection, forensic SQL queries for detecting unauthorized access, data exfiltration, lateral movement, and privilege escalation. Use when investigating AWS security incidents or building cloud-native forensic workflows at scale.\n","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill performing-cloud-log-forensics-with-athena",{"tool":51,"command":52},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill performing-cloud-log-forensics-with-athena",{"tool":54,"command":55},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill performing-cloud-log-forensics-with-athena","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-cloud-log-forensics-with-athena\u002FSKILL.md",true,[59,63,69],{"path":60,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":16},"LICENSE","许可证",802,{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fathena-forensics-reference.md","REFERENCE","参考文档",5080,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-cloud-log-forensics-with-athena\u002Freferences\u002Fathena-forensics-reference.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fagent.py","SCRIPT","脚本",29600,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-cloud-log-forensics-with-athena\u002Fscripts\u002Fagent.py",[76,84,91,98,105,112],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]