/headless-cloud-security:sysdig-posturefrom headless-cloud-security
Authors Sysdig Secure Posture custom controls (Rego) and custom policies, emitting Terraform via the Sysdig provider. Handles the full loop: write Rego, validate with MCP, generate Terraform files.
Ships in headless-cloud-security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Before doing any other work for this skill, follow references/first-run-notice.md exactly.
This skill describes steps by capability, not by tool name: ask a structured question, get explicit confirmation, write a file, run a command. Follow references/agent-capabilities.md for how to do each one with your agent's tools, and what to do when a capability is missing — including when nobody can answer a question.
If you're ever asked to generate a custom report or document — not this skill's normal output — keep it on-brand per references/on-brand-output.md, or hand off to the sysdig-report skill if it's installed. Opt-in guidance, never a requirement.
Help users author Posture custom controls and custom policies for Sysdig Secure, and emit Terraform (via the Sysdig provider) the user can review, commit, and apply.
SYSDIG_SECURE_API_TOKEN and SYSDIG_SECURE_URL for the write path; the hosted MCP server authenticates separately via OAuth (see references/auth-preflight.md) and does not read those env vars..tf. Read the file and pass its content to the test_posture_rego MCP tool to validate. Show diffs and test results in chat, not the full Rego each turn.terraform apply and terraform destroy require explicit user confirmation. init, plan, validate, and read-only MCP tool calls run proactively.>, >>, |, or 2>&1 in the commands you run — permission rules (such as allowed-tools) match the literal command line.Always present this before asking any questions. See references/trust-preamble.md for the full text. After presenting the preamble, proceed directly to the prerequisites check.
Before any other step, run the preflight in references/auth-preflight.md and follow its instructions exactly. If it tells you to abort, abort — do not call any MCP tools or perform other side effects.
If a tool call later fails during normal operation, use the diagnostic checklist in references/mcp-setup.md to identify the specific failure. A denied Sysdig MCP call (the agent refuses it rather than the server erroring) is a permissions issue, not unreachability — apply the "Tool calls come back denied" fix in that reference instead of retrying.
Do not proceed until the MCP server is reachable. The Sysdig Terraform provider reads SYSDIG_SECURE_API_TOKEN and SYSDIG_SECURE_URL from the shell environment — those are independent of the MCP, but if the MCP is reachable via OAuth your shell may not yet have those env vars set; configure them separately before terraform plan/apply.
Run scripts/validate_prereqs.sh before starting. It checks the local tooling needed for the Terraform path:
If ok is false, stop the workflow and report each missing tool using the What / Why / Fix template — name the missing piece, say what it's needed for, give the exact command to install it. For each tool name in missing:
.tf files this skill produces. Install with brew install terraform (macOS) or see https://developer.hashicorp.com/terraform/install."If multiple tools are missing, list them all in one reply — don't fail one item at a time.
The Sysdig Terraform provider needs credentials at plan/apply time. They can come from the agent's shell (SYSDIG_SECURE_URL + SYSDIG_SECURE_API_TOKEN) or from an existing provider "sysdig" block already wired up in the user's IaC repo (tfvars-driven, vault-backed, etc.). MCP availability does not imply env vars are exported locally — the MCP server may be remote and hold its own credentials.
Probe both credential env vars without leaking the token value:
echo "${SYSDIG_SECURE_URL:+SET}"
echo "${SYSDIG_SECURE_API_TOKEN:+SET}"
SET → proceed.provider "sysdig" block that handles credentials its own way:
versions.tf will be skipped at the generation step if their versions.tf already exists.export it in the shell where Terraform will run and re-probe:
SYSDIG_SECURE_API_TOKEN — "Not set. Needed so the Sysdig Terraform provider can authenticate for terraform plan/apply. Set it with export SYSDIG_SECURE_API_TOKEN=<your token> and re-run."SYSDIG_SECURE_URL — "Not set. Needed so the Sysdig provider knows which region to talk to. Set it with export SYSDIG_SECURE_URL=https://secure.sysdig.com (or your regional URL) and re-run."After prerequisites are OK, ask the user what they want to do. Ask a structured question with these options:
input per resource kind family, idioms, limitations.terraform apply, direct the user to assign the policy to a zone via Policies → Posture Policies → [policy name] → Zones in the Sysdig Secure UI.references/agent-capabilities.md (opens in a new tab)references/auth-preflight.md (opens in a new tab)references/first-run-notice.md (opens in a new tab)references/mcp-setup.md (opens in a new tab)references/on-brand-output.md (opens in a new tab)references/policy-model.md (opens in a new tab)references/rego-cheatsheet.md (opens in a new tab)references/trust-preamble.md (opens in a new tab)references/workflow-control.md (opens in a new tab)references/workflow-policy.md (opens in a new tab)scripts/validate_prereqs.sh (opens in a new tab)templates/custom_control.tf (opens in a new tab)templates/custom_policy.tf (opens in a new tab)templates/versions.tf (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sysdig/skills --plugin headless-cloud-security8 skills in this plugin
/sysdig-account-setupBaseline account setup for Sysdig Secure after a tenant is connected. Guided, interactive, modular setup via the Sysdig MCP server: (1) access baseline — teams, users, and roles; (2) vulnerability management policy baseline — Pipeline vs runtime, one policy or split; (3) compliance standards — assign posture policies (CIS, PCI, NIST, …) to zones; (4) runtime threat-detection — enable/disable the recommended managed detection policies. Reviews current state, proposes a structure, and applies changes idempotently with explicit confirmation before anything that mutates the tenant. Use right after onboarding to leave an account usable out of the box. Fine-grained policy tuning is out of scope.
/sysdig-investigateInvestigate and prioritize vulnerable images in a Sysdig-monitored environment via two flows, routed from the user's goal. Plans flow — plan-driven prioritization: pick an admin-configured Plan (or explore ranked jobs under an ad-hoc scope and measure) and walk the prioritized remediation jobs one at a time. Findings flow — ad-hoc findings analysis: filter, regroup, sort, and page vulnerability findings the way the Vulnerability Management UI table does. Hands any chosen image off to /sysdig-remediate, which owns tickets, PRs, job tracking, and job closing. Triggers on: "investigate", "what should I fix", "what should I fix first", "show me my vulnerable images", "prioritize vulnerabilities", "which images are affected by CVE-...", "show me all Critical CVEs in production", "/sysdig-investigate". Not for opening PRs, applying fixes, or creating/updating tickets — use /sysdig-remediate for all of those.
/sysdig-onboardingInteractive onboarding assistant for Sysdig Secure. Guides users through connecting AWS, GCP and Azure cloud accounts, Kubernetes clusters (including Windows nodes), and Linux hosts to Sysdig, plus serverless workload scanning (AWS ECS/Fargate, AWS Lambda, GCP Cloud Run). Presents security capabilities in plain language instead of jargon. Supports guided (interview) and autonomous (all-at-once) modes. Generates Terraform configurations for cloud accounts and Helm values for Kubernetes, validates prerequisites, deploys, and verifies connectivity.
/sysdig-remediateRemediate one specific vulnerable container image and deliver the fix as a PR/MR, a tracking ticket, or both — this skill is the sole ticket creator in the Sysdig vulnerability workflow. Deduplicates existing work (job artifacts, Sysdig-created Jira tickets, external tickets and PRs) read-only, fetches Critical/High CVEs from Sysdig, resolves a safe fix version via chain analysis, opens a PR/MR (GitHub/GitLab) or emits a local patch, creates or updates the Jira ticket, records artifacts on the remediation job, and closes the job once the work is filed. Triggers: "fix the nginx image", "patch CVE-2024-1234 in api-server", "remediate quay.io/org/app:tag", "create a ticket for CVE-2024-9999", "file a Jira ticket for this image", "/sysdig-remediate <image>". Not for: discovery, prioritization, or slicing findings — use /sysdig-investigate.
/sysdig-runtime-investigateUse this skill when investigating a runtime threat detected by Sysdig end-to-end. Surfaces the highest-priority threat, scores vulnerability vs runtime correlations on a 1-5 confidence scale, deep-dives into network blast radius or suspicious-binary VirusTotal lookups depending on the event class, reconstructs the affected workload's activity audit trail (commands, connections, file accesses) as a timeline around the detection, and hands the case off to Jira or PagerDuty. Triggers on: "investigate runtime threat", "what is this Falco alert", "triage this SOC alert", "analyze runtime incident". Not for vulnerability prioritization (use `sysdig-investigate`) or remediation (use `sysdig-remediate`).
/sysdig-runtime-remediateClose the runtime loop on a Sysdig-detected threat: turn the investigation context into proposed response actions, analyse the blast radius on the affected workload, and execute (or file) the actions the user approves — one at a time, with explicit confirmation. Triggers: "remediate this runtime threat", "respond to event <id>", "act on this incident", "isolate / kill / pause that container", "/sysdig-runtime-remediate". Not for vulnerability fixes (use sysdig-remediate) or threat investigation itself (use sysdig-runtime-investigate).
Other plugins' skills for the same job