Best for
- Use this CLI when you operate ThreatLocker across multiple customer organizations and need to act, not just read - clearing approval backlogs at scale, exporting audit evidence before it ages off, finding unhealthy agen…
Servosity/msp-skills/skills/threatlocker/SKILL.md
Every ThreatLocker Portal API feature, plus the write operations the read-only tools lack and a cross-tenant offline store no other ThreatLocker tool has. Trigger phrases: `triage threatlocker approvals`, `approve this hash across all tenants`, `export the threatlocker audit log`, `which threatlocker agents are offline`, `why is threatlocker returning 401`, `use threatlocker`, `run threatlocker`.
Decision brief
Every ThreatLocker Portal API feature, plus the write operations the read-only tools lack and a cross-tenant offline store no other ThreatLocker tool has. Trigger phrases: `triage threatlocker approvals`, `approve this hash across all tenants`, `export the threatlocker audit log`, `which threatlocker agents are offline`, `why is threatlocker returning 401`,…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/Servosity/msp-skills --skill "skills/threatlocker"Inspect the Agent Skill "threatlocker" from https://github.com/Servosity/msp-skills/blob/30e109db0872897de0b88adb38d81d4c292da3ae/skills/threatlocker/SKILL.md at commit 30e109db0872897de0b88adb38d81d4c292da3ae. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Auth is a raw API token in the Authorization header (NO 'Bearer' prefix) - a 64-character lowercase hex string created in the portal under Administrators API Users Generate API Token. Most calls also need a ManagedOrganizationId header (your tenant GUID); set THREATLOCKERORGID o…
This skill drives the threatlocker-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
Use this CLI when you operate ThreatLocker across multiple customer organizations and need to act, not just read - clearing approval backlogs at scale, exporting audit evidence before it ages off, finding unhealthy agents, or pushing policy across tenants. It is the right tool w…
These capabilities aren't available in any other tool for this API.
Reach for this to clear the morning approval backlog across an entire MSP book without swapping tenant context request-by-request.
Permission review
The documentation asks the agent to run terminal commands or scripts.
npx -y @mvanhorn/printing-press-library install threatlocker --cli-onlyThe documentation asks the agent to run terminal commands or scripts.
go install github.com/mvanhorn/printing-press-library/library/monitoring/threatlocker/cmd/threatlocker-cli@latestThe documentation includes sending, uploading, or posting data to a remote service.
| `webhook:<url>` | POST the output body to the URL (`application/json` or `application/x-ndjson` when `--compact`) |The documentation includes network, browsing, or remote request actions.
| `webhook:<url>` | POST the output body to the URL (`application/json` or `application/x-ndjson` when `--compact`) |Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 15 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
This skill drives the threatlocker-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
$HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:
npx -y @mvanhorn/printing-press-library install threatlocker --cli-only
threatlocker-cli --version$PATH for the agent/runtime that will invoke this skill.If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.4 or newer). This installs into $GOPATH/bin (default $HOME/go/bin), so add that directory to $PATH instead:
go install github.com/mvanhorn/printing-press-library/library/monitoring/threatlocker/cmd/threatlocker-cli@latest
If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.
A single CLI for MSPs running ThreatLocker across many customer tenants. It matches the full read surface of the incumbent MCP server, adds the writes nobody shipped (approve requests, toggle maintenance, push policy), and mirrors every entity into a local SQLite database so you can triage approvals, audit drift, and device health across ALL tenants at once - something the per-tenant API forces you to do one header-swap at a time.
Use this CLI when you operate ThreatLocker across multiple customer organizations and need to act, not just read - clearing approval backlogs at scale, exporting audit evidence before it ages off, finding unhealthy agents, or pushing policy across tenants. It is the right tool when the portal's one-tenant-at-a-time UI or the read-only MCP server is the bottleneck.
These capabilities aren't available in any other tool for this API.
approvals triage - One ranked queue of every pending application approval across all your managed customer tenants, grouped by file hash so duplicate requests collapse into one row.
Reach for this to clear the morning approval backlog across an entire MSP book without swapping tenant context request-by-request.
threatlocker-cli approvals triage --all-tenants --agent
audit drift - One ranked table of security-relevant changes - protection disabled, policy changed, maintenance toggled - across every tenant in a time window.
Use this for the weekly compliance sweep or right after a customer reports something changed unexpectedly.
threatlocker-cli audit drift --since 7d --all-tenants --agent
devices health - Joins computers, online-devices, and last-checkin data to classify every endpoint healthy / offline / stale / isolated, rolled up per tenant.
Reach for this for the daily 'which agents are dark across all customers' sweep and post-patch verification.
threatlocker-cli devices health --all-tenants --agent
applications hunt - Locate a specific file (by hash, certificate, or path) across every tenant and endpoint in one offline query - present, approved, or pending.
Reach for this during incident response to answer 'where does this binary live across my whole book' without swapping tenant context per search.
threatlocker-cli applications hunt --hash 3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b --agent
approvals approve-batch - Approve the same file (by SHA256) across every tenant where it is pending, in one command, with a dry-run plan first.
Use this when one trusted updater is blocked everywhere - approve it once instead of clicking through 30 portals.
threatlocker-cli approvals approve-batch --hash e3b0c44298fc1c149afbf4c8996fb924... --all-tenants --dry-run
audit export - Export the Unified Audit log per-tenant or across all tenants to JSONL/CSV and persist it locally, keeping evidence past ThreatLocker's 31-day retention cliff.
Run this on a schedule so compliance evidence and incident timelines survive the retention window.
threatlocker-cli audit export --all-tenants --since 2026-04-01 --agent
audit retention-check - Reports, per tenant, the oldest audit row you have versus the 31-day cliff and how stale your last export is - flagging tenants about to lose evidence.
Pick this to catch a broken export before the data it should have captured ages off the 31-day window forever.
threatlocker-cli audit retention-check --agent
doctor - Diagnoses the #1 ThreatLocker integration pain: validates the raw 64-hex token format, the no-Bearer Authorization header, the ManagedOrganizationId header, New-vs-Old API mode, pings an authenticated endpoint, and maps a 401 to its exact likely cause.
Run this first whenever a script starts returning 401 - it tells you whether the token expired, the org header is missing, or you're on the deprecated API mode.
threatlocker-cli doctor --agent
application-files - File rules belonging to an application
threatlocker-cli application-files - List the file rules within an application (paginated)applications - Application definitions (custom + built-in) and policies' targets
threatlocker-cli applications create - Create a custom application definitionthreatlocker-cli applications get - Get a single application by idthreatlocker-cli applications match - Match a file (hash/path/cert) to existing applications - used in the approval flowthreatlocker-cli applications research - ThreatLocker security research details (risk ratings, categories, remediation)threatlocker-cli applications search - Search applications (paginated). searchBy: app/full/process/hash/cert/created/categories/countries.threatlocker-cli applications update - Update an application's name/descriptionapprovals - Application-control approval requests (list, inspect, approve)
threatlocker-cli approvals approve - Approve (permit) an application approval request, creating/extending a permit policy. policyLevel: org/group/computer.threatlocker-cli approvals count - Count of pending approval requeststhreatlocker-cli approvals get - Get a single approval requestthreatlocker-cli approvals list - List approval requests. statusId 1=Pending,4=Approved,10=Ignored,13=Escalated. Use --child-orgs to span tenants.threatlocker-cli approvals permit-options - Get the permit options for an approval request (inputs to approve)threatlocker-cli approvals storage - Get storage-control approval request detailsaudit - Unified Audit (ActionLog) - permit/deny events. Default retention 31 days.
threatlocker-cli audit file-history - All audit events for a given file paththreatlocker-cli audit get - Get a single audit entry by idthreatlocker-cli audit search - Search the Unified Audit log. actionId 1=Permit,2=Deny,99=AnyDeny. Requires startDate/endDate.computer-groups - Computer groups
threatlocker-cli computer-groups dropdown - Simple group dropdown (label/value)threatlocker-cli computer-groups list - List computer groups with nested computerscomputers - Manage and inspect protected computers/devices
threatlocker-cli computers baseline-rescan - Restart Baseline (learning) on computersthreatlocker-cli computers checkins - Connection/check-in history for a computer (paginated)threatlocker-cli computers delete - Delete/remove computers by idthreatlocker-cli computers enable-protection - Enable Secured Mode (re-enable protection) on computersthreatlocker-cli computers get - Get a single computer's detail by idthreatlocker-cli computers install-info - Deployment/install info for adding new computersthreatlocker-cli computers list - List/search computers (paginated). searchBy 1-5; orderBy e.g. computername.threatlocker-cli computers maintenance - Enable maintenance mode (disable protection) on computers for a windowthreatlocker-cli computers maintenance-update - Set/extend maintenance mode on a single computerthreatlocker-cli computers move-org - Move computers to another organization (tenant)threatlocker-cli computers restart-service - Restart the ThreatLocker service on computersmaintenance - Maintenance-mode history
threatlocker-cli maintenance - Maintenance-mode history for a computer (paginated)network-policies - Network Control (network access) policies
threatlocker-cli network-policies get - Get a single network access policy by idthreatlocker-cli network-policies list - List network access policies (paginated)online-devices - Currently-online devices
threatlocker-cli online-devices - List currently-online devices (paginated)organizations - Managed (child) organizations - MSP tenants
threatlocker-cli organizations auth-key - Get the installation auth key for the current organizationthreatlocker-cli organizations for-move - List organizations available as computer-move targetsthreatlocker-cli organizations list - List child/managed organizations (paginated)policies - Application Control / Storage / Network policies
threatlocker-cli policies copy - Copy policies from a source org/group to target org(s) - cross-tenant cloningthreatlocker-cli policies create - Create a policy. policyActionId 1=Permit,2=Deny,6=Permit+Ringfence.threatlocker-cli policies delete - Delete policies by idthreatlocker-cli policies deploy - Queue a policy deployment for an organizationthreatlocker-cli policies get - Get a single policy by idthreatlocker-cli policies list-by-app - List policies that target an application (paginated)reports - Reports
threatlocker-cli reports data - Fetch dynamic data for a reportthreatlocker-cli reports list - List report categories and their reportsscheduled-actions - Scheduled agent actions
threatlocker-cli scheduled-actions get - Get a single scheduled action by idthreatlocker-cli scheduled-actions list - List scheduled agent actionsthreatlocker-cli scheduled-actions search - Search scheduled actions (paginated)storage-policies - Storage Control policies
threatlocker-cli storage-policies get - Get a single storage policy by idthreatlocker-cli storage-policies list - List storage policies (paginated)system-audit - Portal system audit (admin actions) + Health Center
threatlocker-cli system-audit health-center - Health Center data for the last N days (1-365)threatlocker-cli system-audit search - Search portal admin/system audit entries. Requires startDate/endDate.tags - Tags
threatlocker-cli tags dropdown - Tag dropdown options (label/value)threatlocker-cli tags get - Get a single tag (with its values) by idversions - ThreatLocker agent versions
threatlocker-cli versions - List available agent versions (label/value/isEnabled/isDefault/osType)When you know what you want to do but not which command does it, ask the CLI directly:
threatlocker-cli which "<capability in your own words>"
which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match - fall back to --help or use a narrower query.
threatlocker-cli approvals triage --all-tenants --agent --select organizationName,fileName,hash,ageHours,duplicateCount
Drain the overnight backlog ranked by age with duplicate hashes collapsed, then batch-approve the trusted ones. Requires a recent sync --resources approvals.
threatlocker-cli audit export --all-tenants --since 2026-04-01 --csv > audit-archive.csv
Persist Unified Audit beyond ThreatLocker's retention window for SIEM and compliance. Requires a recent sync --resources audit - the export materializes from the local archive.
threatlocker-cli audit drift --since 7d --all-tenants --agent
One ranked table of protection-off / policy-change / maintenance events across every customer. Requires a recent sync --resources audit,system-audit.
threatlocker-cli devices health --all-tenants --agent --select organizationName,computerName,healthClass,lastCheckin
Classify every endpoint healthy/offline/stale/isolated across all tenants in one pass. Requires a recent sync --resources computers,online-devices.
threatlocker-cli doctor --agent
Pinpoint whether a 401 is an expired token, a missing org header, or Old-API mode.
Auth is a raw API token in the Authorization header (NO 'Bearer' prefix) - a 64-character lowercase hex string created in the portal under Administrators > API Users > Generate API Token. Most calls also need a ManagedOrganizationId header (your tenant GUID); set THREATLOCKER_ORG_ID or pass --org. Tokens renew on each use and silently expire when idle, so run doctor if you hit a 401.
Run threatlocker-cli doctor to verify setup.
Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.
Pipeable - JSON on stdout, errors on stderr
Filterable - --select keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
threatlocker-cli application-files --application-id 550e8400-e29b-41d4-a716-446655440000 --agent --select id,name,status
Previewable - --dry-run shows the request without sending
Offline-friendly - sync/search commands can use the local SQLite store when available
Non-interactive - never prompts, every input is a flag
Explicit retries - use --idempotent only when an already-existing create should count as success
Commands that read from the local store or the API wrap output in a provenance envelope:
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}
Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set - piped/agent consumers and explicit-format runs get pure JSON on stdout.
When you (or the agent) notice something off about this CLI, record it:
threatlocker-cli feedback "the --since flag is inclusive but docs say exclusive"
threatlocker-cli feedback --stdin < notes.txt
threatlocker-cli feedback list --json --limit 10
Entries are stored locally at ~/.local/share/threatlocker-cli/feedback.jsonl. They are never POSTed unless THREATLOCKER_FEEDBACK_ENDPOINT is set AND either --send is passed or THREATLOCKER_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
| Sink | Effect |
|---|---|
stdout | Default; write to stdout only |
file:<path> | Atomically write output to <path> (tmp + rename) |
webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
threatlocker-cli profile save briefing --json
threatlocker-cli --profile briefing application-files --application-id 550e8400-e29b-41d4-a716-446655440000
threatlocker-cli profile list --json
threatlocker-cli profile show briefing
threatlocker-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 4 | Authentication required |
| 5 | API error (upstream issue) |
| 7 | Rate limited (wait and retry) |
| 10 | Config error |
Parse $ARGUMENTS:
help, or --help → show threatlocker-cli --help outputinstall → ends with mcp → MCP installation; otherwise → see Prerequisites above--agent)go install github.com/mvanhorn/printing-press-library/library/monitoring/threatlocker/cmd/threatlocker-mcp@latest
claude mcp add threatlocker-mcp -- threatlocker-mcp
claude mcp listwhich threatlocker-cli
If not found, offer to install (see Prerequisites at the top of this skill).--agent flag:
threatlocker-cli <command> [subcommand] [args] --agent
threatlocker-cli <command> --help.Alternatives
event4u-app/agent-config
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
K-Dense-AI/scientific-agent-skills
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.
K-Dense-AI/scientific-agent-skills
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.