From lc-advanced-skills
Onboards LimaCharlie organizations by discovering cloud CLIs (GCP, AWS, Azure, DigitalOcean), surveying projects/VMs/logs, deploying EDR via cloud services, creating log adapters, and verifying connectivity. Use for new tenant setup or cloud integration.
npx claudepluginhub refractionpoint/lc-ai --plugin lc-advanced-skillsThis skill is limited to using the following tools:
A comprehensive onboarding wizard that discovers cloud infrastructure, identifies assets for monitoring, and guides through EDR deployment and log source integration for LimaCharlie organizations.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
A comprehensive onboarding wizard that discovers cloud infrastructure, identifies assets for monitoring, and guides through EDR deployment and log source integration for LimaCharlie organizations.
Prerequisites: Run
/init-lcto initialize LimaCharlie context.
All LimaCharlie operations use the limacharlie CLI directly:
limacharlie <noun> <verb> --oid <oid> --output yaml [flags]
For command help and discovery: limacharlie <command> --ai-help
| Rule | Wrong | Right |
|---|---|---|
| CLI Access | Call MCP tools or spawn api-executor | Use Bash("limacharlie ...") directly |
| Output Format | --output json | --output yaml (more token-efficient) |
| Filter Output | Pipe to jq/yq | Use --filter JMESPATH to select fields |
| LCQL Queries | Write query syntax manually | Use limacharlie ai generate-query first |
| Timestamps | Calculate epoch values | Use date +%s or date -d '7 days ago' +%s |
| OID | Use org name | Use UUID (call limacharlie org list if needed) |
Use this skill when:
Common scenarios:
This skill performs a complete onboarding workflow:
| Platform | CLI | VM Deployment Method | Log Sources |
|---|---|---|---|
| GCP | gcloud | OS Config | Cloud Audit Logs, VPC Flow Logs, Cloud Armor, IAM logs |
| AWS | aws | SSM Run Command | CloudTrail, VPC Flow Logs, GuardDuty, IAM logs |
| Azure | az | VM Run Command | Activity Log, Azure AD, NSG Flow Logs, Key Vault |
| DigitalOcean | doctl | SSH (manual) | Audit logs (API-based) |
Ask user to select the target LimaCharlie organization:
limacharlie org list --output yaml
Present available organizations and use AskUserQuestion to let user select one.
Detect installed and authenticated cloud CLIs:
# GCP
which gcloud && gcloud auth list 2>/dev/null | grep -q ACTIVE && echo "GCP: authenticated"
# AWS
which aws && aws sts get-caller-identity 2>/dev/null && echo "AWS: authenticated"
# Azure
which az && az account show 2>/dev/null && echo "Azure: authenticated"
# DigitalOcean
which doctl && doctl account get 2>/dev/null && echo "DigitalOcean: authenticated"
Present discovered CLIs and ask user which platforms to onboard:
AskUserQuestion(
questions=[{
"question": "Which cloud platforms would you like to onboard?",
"header": "Platforms",
"multiSelect": true,
"options": [
{"label": "GCP", "description": "Google Cloud Platform"},
{"label": "AWS", "description": "Amazon Web Services"},
{"label": "Azure", "description": "Microsoft Azure"},
{"label": "DigitalOcean", "description": "DigitalOcean"}
]
}]
)
For each selected platform, discover projects/accounts and resource types.
# List projects
gcloud projects list --format="json"
# For each project, check enabled APIs
gcloud services list --project=PROJECT_ID --enabled --format="json"
Key services to check for security relevance:
logging.googleapis.com - Cloud Logging (audit logs available)compute.googleapis.com - Compute Engine VMscontainer.googleapis.com - GKE clustersiam.googleapis.com - IAM (identity logs)cloudresourcemanager.googleapis.com - Organization-level auditcloudasset.googleapis.com - Asset inventory# Get current account
aws sts get-caller-identity --output json
# List regions with activity
aws ec2 describe-regions --output json
# For each region, list EC2 instances
aws ec2 describe-instances --region REGION --output json
# Check CloudTrail status
aws cloudtrail describe-trails --output json
Key services:
# List subscriptions
az account list --output json
# For each subscription, list resource groups
az group list --subscription SUB_ID --output json
# List VMs
az vm list --subscription SUB_ID --output json
# Check diagnostic settings
az monitor diagnostic-settings list --resource RESOURCE_ID --output json
Key services:
# List droplets
doctl compute droplet list --format json
# List projects
doctl projects list --format json
After surveying, categorize discovered resources:
Present discovered VMs with OS information:
| Platform | Instance ID | Name | OS | Zone/Region | Status |
|---|---|---|---|---|---|
| GCP | instance-1 | web-server | Ubuntu 22.04 | us-central1-a | RUNNING |
| AWS | i-abc123 | api-server | Amazon Linux 2 | us-east-1 | running |
| Azure | vm-001 | database | Windows Server 2022 | eastus | running |
Ask user to confirm which VMs should have EDR installed:
AskUserQuestion(
questions=[{
"question": "Which VMs should have the LimaCharlie EDR installed?",
"header": "VMs",
"multiSelect": true,
"options": [
{"label": "All Linux VMs (Recommended)", "description": "Install EDR on all discovered Linux VMs"},
{"label": "All Windows VMs", "description": "Install EDR on all discovered Windows VMs"},
{"label": "Production VMs only", "description": "Only VMs tagged as production"},
{"label": "Let me select individually", "description": "Choose specific VMs"}
]
}]
)
Identify log sources with security value:
| Priority | Source | Platform | Type | Description |
|---|---|---|---|---|
| High | CloudTrail | AWS | Audit | API activity, authentication |
| High | Cloud Audit Logs | GCP | Audit | Admin and data access logs |
| High | Azure Activity Log | Azure | Audit | Control plane operations |
| High | Azure AD Sign-ins | Azure | Identity | Authentication events |
| Medium | VPC Flow Logs | AWS/GCP | Network | Network traffic metadata |
| Medium | GuardDuty | AWS | Threat Intel | AWS threat findings |
| Medium | NSG Flow Logs | Azure | Network | Network traffic |
| Low | Custom app logs | Various | Application | App-specific logging |
Ask user to confirm log sources:
AskUserQuestion(
questions=[{
"question": "Which log sources should be ingested into LimaCharlie?",
"header": "Log Sources",
"multiSelect": true,
"options": [
{"label": "All high-priority sources (Recommended)", "description": "Audit logs and identity events"},
{"label": "High + Medium priority", "description": "Include network flow logs"},
{"label": "All discovered sources", "description": "Everything including application logs"},
{"label": "Let me select individually", "description": "Choose specific log sources"}
]
}]
)
Create installation keys for each logical segment:
limacharlie installation-key create --oid <org-id> --output yaml
Create separate keys for:
For each confirmed log source, invoke the adapter-assistant skill:
Skill("adapter-assistant")
The adapter-assistant handles:
Deploy EDR to confirmed VMs using cloud-native deployment methods.
CRITICAL - No Reboots or Interruptions
- NEVER use deployment methods that require host reboots (e.g., user data scripts, startup scripts)
- NEVER use methods that would interrupt or disrupt running workloads
- ONLY use live installation methods: OS Config (GCP), SSM Run Command (AWS), VM Run Command (Azure), or direct SSH
- The LimaCharlie sensor installs without requiring a reboot - use methods that execute immediately on running systems
Read EDR installation documentation:
WebFetch(
url="https://raw.githubusercontent.com/refractionPOINT/documentation/docs/windows-agent-installation/docs/limacharlie/doc/Sensors/installation.md",
prompt="Extract installation commands for Windows and Linux"
)
# Create OS Config policy for Linux
gcloud compute os-config os-policy-assignments create lc-edr-linux \
--project=PROJECT_ID \
--location=ZONE \
--file=os-policy-linux.yaml
# OS Policy content
cat > os-policy-linux.yaml << 'EOF'
osPolicies:
- id: install-limacharlie
mode: ENFORCEMENT
resourceGroups:
- resources:
- id: download-installer
exec:
validate:
interpreter: SHELL
script: |
pgrep -x rphcp > /dev/null
enforce:
interpreter: SHELL
script: |
curl -o /tmp/lc-installer https://downloads.limacharlie.io/sensor/linux/64
chmod +x /tmp/lc-installer
/tmp/lc-installer -i INSTALLATION_KEY
rm /tmp/lc-installer
allowNoResourceGroupMatch: false
instanceFilter:
inclusionLabels:
- labels:
lc-edr: "true"
EOF
For Windows, use similar OS Config with PowerShell:
# Validate: check if service is running
if (Get-Service -Name "rphcpsvc" -ErrorAction SilentlyContinue | Where-Object {$_.Status -eq "Running"}) { exit 0 } else { exit 1 }
# Enforce: download and install
Invoke-WebRequest -Uri "https://downloads.limacharlie.io/sensor/windows/64" -OutFile "$env:TEMP\lc-installer.exe"
Start-Process -FilePath "$env:TEMP\lc-installer.exe" -ArgumentList "-i", "INSTALLATION_KEY" -Wait
Remove-Item "$env:TEMP\lc-installer.exe"
# For Linux instances
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--targets "Key=tag:lc-edr,Values=true" \
--parameters 'commands=[
"curl -o /tmp/lc-installer https://downloads.limacharlie.io/sensor/linux/64",
"chmod +x /tmp/lc-installer",
"/tmp/lc-installer -i INSTALLATION_KEY",
"rm /tmp/lc-installer"
]' \
--region REGION
# For Windows instances
aws ssm send-command \
--document-name "AWS-RunPowerShellScript" \
--targets "Key=tag:lc-edr,Values=true" \
--parameters 'commands=[
"Invoke-WebRequest -Uri \"https://downloads.limacharlie.io/sensor/windows/64\" -OutFile \"$env:TEMP\\lc-installer.exe\"",
"Start-Process -FilePath \"$env:TEMP\\lc-installer.exe\" -ArgumentList \"-i\", \"INSTALLATION_KEY\" -Wait",
"Remove-Item \"$env:TEMP\\lc-installer.exe\""
]' \
--region REGION
# For Linux VMs
az vm run-command invoke \
--resource-group RESOURCE_GROUP \
--name VM_NAME \
--command-id RunShellScript \
--scripts '
curl -o /tmp/lc-installer https://downloads.limacharlie.io/sensor/linux/64
chmod +x /tmp/lc-installer
/tmp/lc-installer -i INSTALLATION_KEY
rm /tmp/lc-installer
'
# For Windows VMs
az vm run-command invoke \
--resource-group RESOURCE_GROUP \
--name VM_NAME \
--command-id RunPowerShellScript \
--scripts '
Invoke-WebRequest -Uri "https://downloads.limacharlie.io/sensor/windows/64" -OutFile "$env:TEMP\lc-installer.exe"
Start-Process -FilePath "$env:TEMP\lc-installer.exe" -ArgumentList "-i", "INSTALLATION_KEY" -Wait
Remove-Item "$env:TEMP\lc-installer.exe"
'
After initiating deployments, wait for completion:
# GCP: Check OS Config assignment status
gcloud compute os-config os-policy-assignments describe lc-edr-linux \
--project=PROJECT_ID \
--location=ZONE
# AWS: Check SSM command status
aws ssm list-command-invocations --command-id COMMAND_ID
# Azure: Check run command status (synchronous - waits for completion)
Wait up to 2 minutes for sensors to appear, then verify:
limacharlie sensor list --oid <org-id> --filter "[?iid=='<installation-key-iid>']" --output yaml
Verify sensors are online:
limacharlie sensor list --online --oid <org-id> --filter "[?iid=='<installation-key-iid>']" --output yaml
Verify data is flowing (check for recent events):
# Calculate timestamps
start=$(date -d '5 minutes ago' +%s)
end=$(date +%s)
# Generate LCQL query first - never write LCQL manually
limacharlie ai generate-query --prompt "Find events from sensor <sensor-id> in the last 5 minutes, limit 10" --oid <org-id> --output yaml
limacharlie search run --query "<generated-query>" --start $start --end $end --oid <org-id> --output yaml
For each cloud adapter, verify sensor appears and data flows:
limacharlie cloud-adapter list --oid <org-id> --output yaml
Check for recent events from cloud sensor:
start=$(date -d '10 minutes ago' +%s)
end=$(date +%s)
Use LCQL to query for specific sensor data:
limacharlie ai generate-query --prompt "Find events from sensor with hostname containing 'cloudtrail' in the last 10 minutes" --oid <org-id> --output yaml
Then execute the generated query:
limacharlie search run --query "<GENERATED_QUERY>" --start $start --end $end --oid <org-id> --output yaml
Generate a comprehensive Markdown report:
# Onboarding Report: [Organization Name]
**Date**: [Date]
**Organization ID**: [OID]
## Summary
| Metric | Count |
|--------|-------|
| Cloud Platforms Discovered | N |
| VMs Targeted for EDR | N |
| EDR Sensors Online | N |
| Log Sources Configured | N |
| Adapters Created | N |
## EDR Deployment
### Installation Keys Created
| Key Description | IID | Tags | VMs Using |
|-----------------|-----|------|-----------|
| GCP Linux VMs | abc-123 | gcp, linux | 5 |
| AWS Windows VMs | def-456 | aws, windows | 3 |
### Sensors Deployed
| Hostname | Platform | Status | Data Flowing |
|----------|----------|--------|--------------|
| web-server-1 | linux | Online | Yes |
| db-server-1 | linux | Online | Yes |
| win-server-1 | windows | Offline | Pending |
### Deployment Issues
- win-server-1: SSM agent not responding - requires manual installation
## Cloud Log Sources
### Adapters Created
| Adapter Name | Type | Source | Status |
|--------------|------|--------|--------|
| gcp-audit-logs | Cloud Sensor | GCP Pub/Sub | Active |
| aws-cloudtrail | Cloud Sensor | S3 | Active |
### Data Flow Status
| Source | Last Event | Event Count (1h) |
|--------|------------|------------------|
| gcp-audit-logs | 2 min ago | 423 |
| aws-cloudtrail | 5 min ago | 156 |
## Credentials and Access
### Service Accounts Created
| Platform | Account | Purpose |
|----------|---------|---------|
| GCP | lc-pubsub-reader@proj.iam | Pub/Sub subscription read |
| AWS | LimaCharlieS3Reader | CloudTrail S3 bucket read |
### Secrets Stored in LimaCharlie
| Secret Name | Purpose |
|-------------|---------|
| gcp-service-account | GCP service account key |
| aws-access-key | AWS access credentials |
## Recommended Next Steps
1. **Configure Detection Rules**: Set up D&R rules for the new log sources
2. **Review Sensor Coverage**: Ensure all critical assets have EDR
3. **Set Up Outputs**: Configure SIEM forwarding if needed
4. **Enable Extensions**: Consider enabling threat intel extensions
## Commands for Reference
### Check Sensor Status
```bash
# Using LimaCharlie CLI
limacharlie sensor list --oid [OID] --tag auto-onboarded --output yaml
Generated by LimaCharlie Onboard New Org Skill
## Error Handling
### Common Issues
| Issue | Cause | Resolution |
|-------|-------|------------|
| CLI not authenticated | Token expired | Run `gcloud auth login`, `aws configure`, etc. |
| Permission denied | Insufficient IAM roles | Check required permissions below |
| VM deployment failed | SSM agent not running | Install SSM agent first |
| Sensor not appearing | Firewall blocking | Check outbound HTTPS to *.limacharlie.io |
### Required Permissions
#### GCP
- `compute.instances.list` - List VMs
- `osconfig.osPolicyAssignments.create` - Deploy OS Config
- `pubsub.topics.create` - Create Pub/Sub topics
- `logging.sinks.create` - Create log sinks
#### AWS
- `ec2:DescribeInstances` - List EC2 instances
- `ssm:SendCommand` - Run SSM commands
- `s3:GetObject` - Read CloudTrail logs
- `cloudtrail:DescribeTrails` - List CloudTrail configuration
#### Azure
- `Microsoft.Compute/virtualMachines/read` - List VMs
- `Microsoft.Compute/virtualMachines/runCommand/action` - Run commands
- `Microsoft.EventHub/namespaces/read` - Event Hub access
## Related Skills
- `adapter-assistant` - For detailed adapter configuration
- `sensor-coverage` - For monitoring sensor health after onboarding
- `detection-engineering` - For creating detection rules
## Reference
- EDR Installation: https://doc.limacharlie.io/docs/sensors/
- Cloud Sensors: https://doc.limacharlie.io/docs/sensors/cloud-sensors/
- Adapters: https://doc.limacharlie.io/docs/sensors/adapters/