Deploy a temporary LimaCharlie EDR agent on the local Linux or Mac OS host for testing. Downloads and runs the LC sensor in a temp directory with automatic cleanup. Use for testing detection rules, investigating sensor behavior, or development. Requires selecting or creating a LimaCharlie organization first.
Deploys a temporary LimaCharlie EDR sensor on Linux or Mac for testing detection rules and sensor behavior.
/plugin marketplace add refractionPOINT/lc-ai/plugin install refractionpoint-lc-essentials-marketplace-plugins-lc-essentials@refractionPOINT/lc-aiThis skill is limited to using the following tools:
Deploy a temporary LimaCharlie EDR sensor on the local Linux or Mac OS host for testing purposes. The sensor runs in the background with automatic cleanup when stopped.
Prerequisites: Run
/init-lcto initialize LimaCharlie context.
All LimaCharlie API calls go through the limacharlie-api-executor sub-agent:
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: <function-name>
- Parameters: {<params>}
- Return: RAW | <extraction instructions>
- Script path: {skill_base_directory}/../../scripts/analyze-lc-result.sh"
)
| Rule | Wrong | Right |
|---|---|---|
| MCP Access | Call mcp__* directly | Use limacharlie-api-executor sub-agent |
| LCQL Queries | Write query syntax manually | Use generate_lcql_query() first |
| Timestamps | Calculate epoch values | Use date +%s or date -d '7 days ago' +%s |
| OID | Use org name | Use UUID (call list_user_orgs if needed) |
Use this skill when:
This skill performs a two-phase deployment:
The sensor:
Before starting, ensure you have:
First, get the list of available organizations:
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: list_user_orgs
- Parameters: {}
- Return: RAW"
)
This returns your available organizations. Use AskUserQuestion to let the user select one, or if they need a new org, use the limacharlie-call skill to create one with create_org.
Check for existing "Test EDR" installation key:
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: list_installation_keys
- Parameters: {\"oid\": \"<SELECTED_ORG_ID>\"}
- Return: Look for key with description 'Test EDR' and return its key and iid"
)
If "Test EDR" key exists: Extract the key value from the response.
If not exists: Create one:
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: create_installation_key
- Parameters: {\"oid\": \"<SELECTED_ORG_ID>\", \"description\": \"Test EDR\", \"tags\": [\"test-edr\", \"temporary\"]}
- Return: The key and iid of the created installation key"
)
Save the returned key value for the next phase.
Step 1: Detect platform and create temp directory:
OS_TYPE=$(uname -s)
ARCH=$(uname -m)
TEMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/lc-edr-test-XXXXXX")
echo "Platform: $OS_TYPE ($ARCH), Temp dir: $TEMP_DIR"
Step 2: Download the appropriate sensor binary:
if [ "$OS_TYPE" = "Darwin" ]; then
if [ "$ARCH" = "arm64" ]; then
DOWNLOAD_URL="https://downloads.limacharlie.io/sensor/mac/arm64"
else
DOWNLOAD_URL="https://downloads.limacharlie.io/sensor/mac/64"
fi
else
DOWNLOAD_URL="https://downloads.limacharlie.io/sensor/linux/64"
fi
curl -sSL "$DOWNLOAD_URL" -o "$TEMP_DIR/lc_sensor"
chmod +x "$TEMP_DIR/lc_sensor"
echo "Sensor downloaded to: $TEMP_DIR"
Step 3: Run the sensor in background (as root):
if [ "$OS_TYPE" = "Darwin" ]; then
sudo nohup "$TEMP_DIR/lc_sensor" -d <INSTALLATION_KEY> > /dev/null 2>&1 &
else
sudo setsid "$TEMP_DIR/lc_sensor" -d <INSTALLATION_KEY> > /dev/null 2>&1 &
fi
echo "Sensor started in $TEMP_DIR"
Important:
setsid to create a new session and fully detach from the terminalnohup which achieves similar process detachmentTEMP_DIR path for cleanup laterlc_sensor - use this for stoppingAfter starting, the sensor should appear in your LimaCharlie organization within a few seconds. Verify by listing sensors with a selector that matches the installation key's iid (Installation ID, a UUID):
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: list_sensors
- Parameters: {\"oid\": \"<SELECTED_ORG_ID>\", \"selector\": \"iid == `<INSTALLATION_KEY_IID>`\"}
- Return: RAW"
)
Replace <INSTALLATION_KEY_IID> with the iid UUID from the installation key used. This selector fetches only the sensor enrolled with that specific installation key, rather than listing all sensors in the organization.
When the user wants to stop the test EDR:
Single command to stop and clean up (recommended):
sudo pkill -9 -f lc_sensor; sudo rm -rf <TEMP_DIR>; echo "Cleanup complete"
Important notes:
-9 (SIGKILL) for reliable termination of detached processes; instead of && - pkill returns non-zero exit codes even on success (e.g., 144 when the signal is delivered)KillShell to stop the sensor - always use pkillVerify cleanup succeeded:
ps aux | grep "[l]c_sensor" || echo "Sensor stopped"
The [l] bracket trick prevents grep from matching itself in the output.
User: "I want to test the LimaCharlie EDR on my machine"
Steps:
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: list_user_orgs
- Parameters: {}
- Return: RAW"
)
Response shows: [{"name": "My Test Org", "oid": "abc123-def456-..."}]
Ask user to select org (via AskUserQuestion)
Check for existing installation key:
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: list_installation_keys
- Parameters: {\"oid\": \"abc123-def456-...\"}
- Return: Look for key with description 'Test EDR' and return its key and iid"
)
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: create_installation_key
- Parameters: {\"oid\": \"abc123-def456-...\", \"description\": \"Test EDR\", \"tags\": [\"test-edr\", \"temporary\"]}
- Return: The key and iid of the created installation key"
)
Returns: {"iid": "test-edr", "key": "abc123:def456:..."}
OS_TYPE=$(uname -s)
ARCH=$(uname -m)
TEMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/lc-edr-test-XXXXXX")
if [ "$OS_TYPE" = "Darwin" ]; then
if [ "$ARCH" = "arm64" ]; then
DOWNLOAD_URL="https://downloads.limacharlie.io/sensor/mac/arm64"
else
DOWNLOAD_URL="https://downloads.limacharlie.io/sensor/mac/64"
fi
else
DOWNLOAD_URL="https://downloads.limacharlie.io/sensor/linux/64"
fi
curl -sSL "$DOWNLOAD_URL" -o "$TEMP_DIR/lc_sensor"
chmod +x "$TEMP_DIR/lc_sensor"
if [ "$OS_TYPE" = "Darwin" ]; then
sudo nohup "$TEMP_DIR/lc_sensor" -d "abc123:def456:..." > /dev/null 2>&1 &
else
sudo setsid "$TEMP_DIR/lc_sensor" -d "abc123:def456:..." > /dev/null 2>&1 &
fi
echo "Sensor started in $TEMP_DIR"
iid:Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: list_sensors
- Parameters: {\"oid\": \"abc123-def456-...\", \"selector\": \"iid == `<IID_FROM_INSTALLATION_KEY>`\"}
- Return: RAW"
)
sudo pkill -f lc_sensor).User: "Stop the test EDR"
Steps:
sudo pkill -9 -f lc_sensor; sudo rm -rf /tmp/lc-edr-test-XXXXXX; echo "Cleanup complete"
ps aux | grep "[l]c_sensor" || echo "Sensor stopped"
Task(
subagent_type="lc-essentials:limacharlie-api-executor",
model="haiku",
prompt="Execute LimaCharlie API call:
- Function: delete_sensor
- Parameters: {\"oid\": \"abc123-def456-...\", \"sid\": \"<SENSOR_ID>\"}
- Return: RAW"
)
test-edr and temporary tags for easy identification; not && when chaining cleanup commands since pkill returns non-zero exit codes even on successlimacharlie-call: For creating organizations or other API operationsdetection-engineering: For creating D&R rules to test with the sensorsensor-health: To check if your test sensor is reporting properlyinvestigation-creation: To investigate events from your test sensorThis skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.