[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AD03VGJJS9AAK7GYZ5R6W3":3,"skill-same:01M7AD03VGJJS9AAK7GYZ5R6W3":143},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7AD03VGJJS9AAK7GYZ5R6W3","ssm-patch-operator",null,"Operates SSM Patch Manager workflows safely — patch baseline authoring (AWS-managed and custom), patch group tag targeting, AWS-RunPatchBaseline Scan and Install operations, maintenance window task scheduling, and patch compliance reporting. Runs deterministic pre-checks (instance managed-status, SSM Agent health, baseline association, free disk space, reboot tolerance, maintenance-window target membership, rate-control budget), executes the patching operation behind a CONFIRM gate, and emits a verdict (READY | BLOCKED | COMPLETED) per operation with the exact send-command sequence, expected side-effects (reboot, compliance delta), and post-verification. Use when running a security patch sweep, scheduling a maintenance-window patch task, diagnosing a NON_COMPLIANT instance, planning a fleet-wide Install with rate-control, or building a custom baseline with approval rules.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ssm-patch-operator\ndescription: Operates SSM Patch Manager workflows safely — patch baseline authoring (AWS-managed and custom), patch group tag targeting, AWS-RunPatchBaseline Scan and Install operations, maintenance window task scheduling, and patch compliance reporting. Runs deterministic pre-checks (instance managed-status, SSM Agent health, baseline association, free disk space, reboot tolerance, maintenance-window target membership, rate-control budget), executes the patching operation behind a CONFIRM gate, and emits a verdict (READY | BLOCKED | COMPLETED) per operation with the exact send-command sequence, expected side-effects (reboot, compliance delta), and post-verification. Use when running a security patch sweep, scheduling a maintenance-window patch task, diagnosing a NON_COMPLIANT instance, planning a fleet-wide Install with rate-control, or building a custom baseline with approval rules.\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws ssm describe-instance-information, describe-patch-baseline, describe-patch-baselines, describe-patch-states, list-compliance-items, send-command (AWS-RunPatchBaseline), get-command-invocation, create-association, update-association, create-maintenance-window, register-task-with-maintenance-window, and aws ec2 describe-instances...\nmetadata:\n  domain: aws-cloudops\n  complexity: medium\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Management\n  task_type: operate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY | BLOCKED | COMPLETED\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  tags: ssm, systems-manager, patch-manager, management, patching, compliance, maintenance-window, operate\n  dependencies: aws-orchestrator\n  keywords: Systems Manager, SSM, Patch Manager, patch baseline, AWS-RunPatchBaseline, AWS-ApplyPatchBaseline, patch group, Scan, Install, compliance, NON_COMPLIANT, maintenance window, rate-control, ApprovalRules, ApproveAfterDays, AmazonSSMManagedInstanceCore, AmazonLinux2, Ubuntu, Windows, macOS, kernel panic, reboot, NoReboot, SSM Quick Setup\n  when_to_use: Running a security patch sweep against an EC2 or hybrid fleet, creating or modifying a custom patch baseline with approval rules, scheduling a maintenance-window task that runs AWS-RunPatchBaseline with Operation=Install, diagnosing a NON_COMPLIANT instance, planning a fleet-wide Install with rate-control and max-errors, switching an association from Scan to Install, or pre-checking a host before the next patch window.\n  activation_triggers: patch this instance, run AWS-RunPatchBaseline, scan for missing patches, install missing patches, create patch baseline, custom patch baseline rules, patch group tag, schedule patching maintenance window, diagnose NON_COMPLIANT patch, Operation=Install, Operation=Scan, rate-control patching, approve after days, NoReboot patch install\n  invocation_schema: 'Input: either (a) a patch operation request (operation=scan|install| create-baseline|update-baseline|create-mw|register-task) paired with instance(s), patch baseline, and optional maintenance-window context, OR (b) an instance-id \u002F baseline-id \u002F maintenance-window-id for live- account execution. Output: deterministic OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002F STEPS\u002FPOST_VERIFY block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.'\n---\n\n# SSM Patch Operator\n\n## What this skill does\n\nExecutes SSM Patch Manager operations on EC2 and hybrid (`mi-*`) fleets\ncorrectly and safely. Runs deterministic pre-checks (instance managed\nstatus, SSM Agent health, baseline association, free disk space, reboot\ntolerance, maintenance-window target membership), plans the exact\n`aws ssm send-command` \u002F association \u002F maintenance-window sequence, and\nverifies the result via compliance items and command invocations. Every\nstate-changing operation runs behind a CONFIRM gate — `Operation=Install`\ncan reboot hosts and restart services, never auto-trigger.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds + pre-check priority order + OS-by-OS baseline matrix | Before any operation |\n| **§ Mindset** | Why pre-checks matter, the Scan-vs-Install trap, the reboot surprise | Understanding the safety model |\n| **§ Pre-flight** | Instance metadata gate — managed status, agent, baseline, free disk | Before executing any CLI |\n| **§ Process** | Per-operation planning: scan, install, baseline author, maintenance window | When choosing which operation to run |\n| **§ Output format** | Structured VERDICT block with COMMANDS, COMPLIANCE_DELTA, REBOOT | Formatting the response |\n| **§ Anti-Patterns** | NEVER list — common mistakes that reboot fleets or miss compliance drift | Review before any Install |\n| **§ Pre-flight safety** | CONFIRM gate, rate-control, snapshot pre-state, rollback | Defense-in-depth |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (instance UNMANAGED, agent offline, no baseline associated, free disk \u003C 2 GB on root, instance-state not `running`, maintenance-window target empty, baseline auto-approves more than expected) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator `yes` |\n| `COMPLETED` | Operation finished and post-verification passed (command `Success`, compliance delta verified, host back online if rebooted) | Emit compliance summary, side-effects, follow-ups |\n\n**Priority order for pre-checks (apply in this sequence, all must pass for\nREADY):**\n\n1. **Managed status** — instance must appear in `describe-instance-information`\n   with `PingStatus: Active` and `LastPingDateTime` \u003C 30 min ago. Downstream\n   pre-checks are noise on an unreachable host.\n2. **IAM role** — EC2 instance profile (or hybrid activation role) must carry\n   `AmazonSSMManagedInstanceCore` (or verified-equivalent) so the agent can\n   run `AWS-RunPatchBaseline`.\n3. **Disk space** — `AWS-RunPatchBaseline` with `Operation=Install` needs\n   roughly 2 GB free on the root volume (and on Windows `%SystemDrive%`) to\n   stage packages and backups. Install on a full disk fails mid-way and\n   leaves the package manager in a broken state.\n4. **Patch baseline association** — instance must reach a baseline either via\n   the regional default, a `Patch Group` tag, or an explicit\n   `AWS-ApplyPatchBaseline`\u002F`AWS-RunPatchBaseline` association. No baseline →\n   Scan returns zero findings (silent false-clean), Install no-ops.\n5. **Baseline scope** — surface what the baseline auto-approves. A custom\n   baseline with `ApproveAfterDays: 0` and broad classifications will install\n   far more than the operator expects. Always dump `describe-patch-baseline`\n   before the first Install.\n6. **Reboot tolerance & maintenance window** — Install may reboot the host;\n   if the instance is in an ASG without ELB grace, in a Multi-AZ RDS primary\n   pair, or outside the maintenance window, BLOCK until the operator confirms.\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#costtime-baselines-2026).\n> Scan ~30 s-5 min\u002Fhost, Install minutes to ~1 h\u002Fhost (Windows cumulative updates dominate), baseline export\u002Fimport metadata-only, in-region command output free.\n\n## OS-by-OS baseline matrix\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#os-by-os-baseline-matrix).\n> Default baseline, default document, and reboot-on-Install semantics for AL2\u002FAL2023, Ubuntu, RHEL, SLES, Windows, macOS; default only applies when no custom default and no Patch Group tag matches.\n\n## Mindset\n\n**One-line takeaway:** `Operation=Scan` writes a compliance record without\ntouching packages; `Operation=Install` mutates the host and may reboot it.\nDriven by three Patch Manager realities:\n\n- **Scan is non-destructive, Install is state-changing.** A bare\n  `send-command AWS-RunPatchBaseline` defaults to `Operation=Scan`. Many\n  operators assume the association they \"enabled\" is patching; in reality\n  the default is to *report* compliance, not remediate it. A fleet can sit\n  `NON_COMPLIANT` for years while every association shows `Success` — the\n  scan knew about the gap and nothing installed patches.\n- **Baseline scope is the install contract.** `ApprovalRules` decide what\n  the Install actually applies. `ApproveAfterDays: 0` approves every patch\n  on release (aggressive); `ApproveAfterDays: 7` waits a week.\n  Classification + Severity filters narrow which package classes are in\n  scope. An Install without first dumping the baseline's\n  `ApprovalRules.PatchRules[]` is \"sign without reading\".\n- **Patch Group is a tag, not an association.** Instances link to a custom\n  baseline via the case-sensitive tag key `Patch Group` (space, capital G).\n  Without the tag, the instance falls back to the regional default baseline\n  — silently. A \"patched\" fleet with no `Patch Group` tags may be patching\n  against the wrong baseline entirely.\n\n## Pre-flight: instance metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#pagination-and-live-account-pre-flight).\n> Pagination limits (50\u002Fpage describe-instance-information, 100\u002Fpage describe-patch-states) and the 9 live-account pre-flight probes: managed status, EC2 state, custom\u002FAWS baselines, effective baseline, patch states, compliance rows, associations, MW executions, free-disk check.\n\n**Malformed input:** if the input JSON is invalid or missing required fields,\nemit `VERDICT: ERROR` with `REASON: Instance\u002Foperation configuration is not\nvalid JSON or is missing required fields — cannot plan.` and\n`REMEDIATION: Re-fetch with aws ssm describe-instance-information\n--instance-information-filter-list Key=InstanceIds,ValueSet=\u003Cid> --output\njson and aws ssm get-patch-baseline-for-instance --instance-id \u003Cid>\n--output json, then re-plan.`\n\n| Instance attribute | Effect on operation |\n|---|---|\n| `PingStatus: Active` + `LastPingDateTime` \u003C 30 min | Pre-check passes. |\n| `PingStatus: ConnectionLost` \u002F `Inactive` | BLOCKED — host unreachable. Classify UNMANAGED and stop. |\n| `ResourceType: EC2Instance`, no `IamInstanceProfile` | BLOCKED — no SSM role. |\n| `ResourceType: ManagedInstance` (`mi-*`), role lacks `AmazonSSMManagedInstanceCore` | BLOCKED — hybrid activation role gap. |\n| `PlatformType: Linux` \u002F `Windows` \u002F `macOS` | Selects the OS-family default baseline and the patch-filter taxonomy. |\n| `IsLatestVersion: false` | WARN — old agent; may misreport compliance. Surface but do not BLOCK. |\n| No `Patch Group` tag AND no explicit association | Falls back to the regional default. Surface as a CONFIG_GAP-style note, not a BLOCKED unless the operator's intent is to use a custom baseline. |\n| Instance `State: stopped`, `stopping`, `shutting-down` | BLOCKED — patch execution requires `running`. |\n| Free disk \u003C 2 GB on root (Linux) \u002F `%SystemDrive%` (Windows) | BLOCKED for Install; Scan can still proceed. |\n| `AWS-RunPatchBaseline` association with `Operation=Scan` only | Install will not run on schedule; surface for explicit Install command or association update. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Patch Manager behaviors\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-0-expert-knowledge--non-obvious-patch-manager-behaviors).\n> Run-vs-Apply documents, Scan-only default, NoReboot deferral, Patch Group case sensitivity, dead custom baselines, AND\u002FOR rule logic, ApproveAfterDays counted from patch release, effective-baseline reporting, fleet rate-control, MW target membership timing, OS-native reboot, agent not auto-updated, eventual consistency after Scan, manual cross-account\u002Fregion replication, Ubuntu Snapshot Ids holds.\n\n### Step 1: Pre-check gate — BLOCKED if any check fails\n\nRun ALL of the following pre-checks. If ANY fails, the verdict is BLOCKED\nwith the failed checks enumerated in PRE_CHECKS. Do NOT execute the\noperation.\n\n**For ALL operations:**\n1. Instance is `running` (`ec2 describe-instances`) and `PingStatus: Active`\n   with `LastPingDateTime` \u003C 30 min (`ssm describe-instance-information`).\n2. IAM role includes `AmazonSSMManagedInstanceCore` (or verified equivalent\n   that grants `ssm:SendCommand`, `ssm:GetCommandInvocation`,\n   `ssm:StartSession`, and the patch-related SSM actions).\n3. The caller (operator role) holds `ssm:SendCommand`,\n   `ssm:GetCommandInvocation`, `ssm:DescribePatch*`,\n   `ssm:ListComplianceItems`, and (for Install) `ssm:StartAssociationsOnce`.\n4. No concurrent command on the instance (`ssm list-commands --filters\n   Key=InstanceId,Values=\u003Cid> Key=Status,Values=Pending,InProgress`).\n   Default per-instance concurrency is 1; a second command returns\n   `TargetNotConnected` or `InvalidInstanceId`.\n\n**For Scan (`send-command AWS-RunPatchBaseline Operation=Scan`):**\n5. The instance's effective baseline is non-empty (verify via\n   `get-patch-baseline-for-instance`). A baseline with zero rules produces\n   a Scan that returns zero findings — silent false-clean.\n6. SSM Agent version is recent enough for the OS (Amazon Linux 2023 needs\n   agent v3.x+).\n\n**For Install (`send-command AWS-RunPatchBaseline Operation=Install`):**\n5. ALL of the Scan pre-checks.\n6. Free disk on root (Linux) \u002F `%SystemDrive%` (Windows) >= 2 GB. Verify\n   via a quick `AWS-RunShellScript \"df -m \u002F\"` (Linux) or\n   `Get-PSDrive C` (Windows) before the Install command.\n7. Snapshot pre-state for rollback: tag the AMI or capture\n   `describe-instances` JSON. Patch Manager does NOT auto-snapshot.\n8. Reboot tolerance confirmed: instance is NOT in an active ALB target\n   without deregistration, is NOT a Multi-AZ RDS primary's only EC2\n   dependency, and IS inside the maintenance window (if applicable).\n9. Baseline `ApprovalRules` reviewed and matches operator intent. A\n   custom baseline with `ApproveAfterDays: 0` and broad classifications\n   will install far more than expected. Dump\n   `aws ssm describe-patch-baseline --baseline-id \u003Cid>` and surface the\n   approval scope in NOTES.\n10. (Optional but recommended) Pre-Install snapshot:\n    `aws ec2 create-snapshot --volume-id \u003Croot-volume-id>\n    --description \"pre-patch $(date -u +%FT%TZ)\"`.\n\n**For create\u002Fupdate patch baseline:**\n5. The baseline payload references valid `OperatingSystem`, `Product`\n   values (`AmazonLinux2`, `AmazonLinux2023`, `Ubuntu2004`, `Ubuntu2204`,\n   `Ubuntu2404`, `RedhatEnterpriseLinux7`\u002F`8`\u002F`9`, `Suse15`,\n   `WindowsServer2019`, `WindowsServer2022`, `macOS12.5` etc.).\n6. `ApprovalRules.PatchRules[]` `PatchFilterGroup` values match the\n   supported classification\u002Fseverity taxonomy for that OS.\n7. The baseline is being set as default OR has a `Patch Group` tag value\n   mapped to its name. Otherwise the baseline is dead configuration.\n8. (For update) `--baseline-version` is being incremented intentionally;\n   the previous version is preserved in baseline history but not auto-\n   rolled back.\n\n**For maintenance window create \u002F register-task:**\n5. `--schedule` cron expression is valid and points to the intended time\n   zone (`--schedule-timezone`, default UTC).\n6. `--duration 2` (hours) and `--cutoff 1` (hours) leave a safe buffer.\n7. `--targets` resolves to a non-empty set at the planned execution time\n   (verify via `aws ssm describe-maintenance-window-targets --window-id\n   \u003Cid>` after registration).\n8. The task's `--task-parameters` reference `Operation=Install` (or\n   `Scan`), the right `Snapshot Ids`, and `NoReboot` as intended.\n9. The maintenance window's IAM service role (`--service-role-arn`) trusts\n   `ssm.amazonaws.com` and has `AmazonSSMAutomationRole` or equivalent.\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI sequence\nand the CONFIRM gate. The plan includes:\n\n- The exact AWS CLI command with all flags populated from the baseline +\n  instance configuration.\n- The expected duration (Scan: 30 s – 5 min; Install: minutes to ~1 hour;\n  maintenance window: until scheduled end).\n- The expected side-effects (compliance delta for Scan; potential reboot +\n  `InstalledPending` count for Install).\n- The CONFIRM gate prompt.\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (Install, association update to Install, baseline create\u002Fupdate, MW\n  create\u002Fregister-task), emit:\n  `CONFIRM: About to \u003Coperation> on \u003Cinstance-id or fleet-tag> in account\n  \u003Caccount> region \u003Cregion>. This will \u003Cconsequence, e.g. install patches\n  and may reboot the host(s)>. Proceed? (yes\u002Fno)`.\n- Capture pre-state for rollback: tag the AMI or run\n  `aws ec2 create-create-snapshot --volume-id \u003Croot> --description\n  \"pre-patch $(date -u +%FT%TZ)\"` for Install.\n- Execute the CLI. Capture the `CommandId`.\n- For long-running commands, poll\n  `aws ssm get-command-invocation --command-id \u003Cid> --instance-id \u003Cid>`\n  until `Status` is `Success` \u002F `Failed` \u002F `TimedOut` \u002F `Cancelled`.\n- For maintenance window task, capture the `WindowTaskId` and poll\n  `describe-maintenance-window-executions`.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter the operation finishes, run post-verification. ALL checks must pass\nfor `COMPLETED`.\n\n1. `get-command-invocation` returns `Status: Success` (or the maintenance\n   window execution `Status: COMPLETED`).\n2. For Scan: re-fetch `describe-patch-states --instance-ids \u003Cid>` and\n   verify the `OperationEndTime` is fresh. Surface the missing-count delta.\n3. For Install: re-fetch `list-compliance-items` and verify\n   `ComplianceStatus: COMPLIANT` (or surface remaining\n   `NON_COMPLIANT` items by severity).\n4. Verify the host came back online after any reboot:\n   `describe-instance-information` `PingStatus: Active` AND\n   `ec2 describe-instances` `State: running`.\n5. For Windows `NoReboot=true` Installs: surface the\n   `InstalledPending` count and the explicit next-reboot requirement.\n6. Surface side-effects: changed services, applied patch list (from the\n   command output's `InstalledPatches` field), reboot happened Y\u002FN.\n7. Plan follow-up: re-scan in 24 h to catch reverted patches; remove\n   pre-patch snapshots after the verification window (e.g., 7 days).\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure details\n— do not claim COMPLETED.\n\n## Output format (per operation)\n\n```text\nOPERATION: \u003Cscan | install | create-baseline | update-baseline | create-mw | register-mw-task>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Cinstance-id | tag:Patch Group,Values=\u003Cgroup> | baseline-id | window-id>\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. \u003CCLI command with flags populated>\n  2. \u003Cwait \u002F poll command>\n  3. \u003Cnext step>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\n  - [FAIL] \u003Cverification description> — \u003Creason>\nCOMPLIANCE_DELTA: \u003Cbefore: missing X \u002F after: missing Y>\nREBOOT: \u003Cyes | no | deferred>\nNOTES: \u003Crate-control, snapshot, caveats, follow-ups>\n```\n\n### Worked example — Install on a single Linux host\n\n```text\nOPERATION: install\nVERDICT: READY\nTARGET: i-0abc123def456789a\nPRE_CHECKS:\n  - [PASS] i-0abc123def456789a PingStatus Active, LastPingDateTime 2 min ago\n  - [PASS] IAM role AmazonSSMManagedInstanceCore-Role includes\n    AmazonSSMManagedInstanceCore\n  - [PASS] EC2 State running\n  - [PASS] Free disk on \u002F is 18 GB (>= 2 GB)\n  - [PASS] Effective baseline pb-0aaa1234 (custom prod-linux-critical)\n    via Patch Group tag \"prod-linux-critical\"\n  - [PASS] Baseline ApprovalRules: Classification=Security,\n    Severity=Critical+Important, ApproveAfterDays=3 — 14 patches qualify\n  - [PASS] No concurrent command in flight\n  - [PASS] Instance is in maintenance window mw-0aaa (cutoff in 95 min)\nSTEPS:\n  1. CONFIRM: About to send-command AWS-RunPatchBaseline Operation=Install\n     on i-0abc123def456789a in account 111111111111 region us-east-1.\n     This will install up to 14 Security patches (Critical+Important) and\n     MAY REBOOT the host if a kernel update is in scope. Proceed? (yes\u002Fno)\n  2. aws ec2 create-snapshot --volume-id vol-0root123 \\\n       --description \"pre-patch $(date -u +%FT%TZ)\"\n  3. aws ssm send-command \\\n       --instance-ids i-0abc123def456789a \\\n       --document-name \"AWS-RunPatchBaseline\" \\\n       --parameters '{\"Operation\":[\"Install\"],\"SnapshotIds\":[\"\"],\"RebootOption\":[\"NoReboot\"]}' \\\n       --comment \"Install Security\u002FCritical+Important on prod host\" \\\n       --output-s3-bucket-name audit-ssm-output \\\n       --output-s3-key-prefix patch-install\u002F$(date -u +%Y\u002F%m\u002F%d)\n  4. aws ssm get-command-invocation \\\n       --command-id \u003CCommandId from step 3> \\\n       --instance-id i-0abc123def456789a\n     (poll until Status is Success \u002F Failed \u002F TimedOut)\nPOST_VERIFY:\n  - (pending execution)\nCOMPLIANCE_DELTA: (before: 14 missing \u002F after: pending)\nREBOOT: deferred (NoReboot=true; kernel patch will activate on next reboot,\n  host is running stale kernel until then)\nNOTES:\n  - The host will report COMPLIANT only after the next reboot activates the\n    kernel patch. Plan a reboot via maintenance window or ASG instance\n    refresh within the next 7 days.\n  - Re-scan in 24 h to catch any patches reverted by package-manager hooks.\n  - Pre-patch snapshot snap-0prepatch123 retained for 7 days; delete after\n    the verification window.\n  - Rate-control: single-instance target — no --max-concurrency needed.\n    For fleet Installs, add `--max-errors 0 --max-concurrency \"10%\"`.\n```\n\n### Worked example — Scan-only association missing patches\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--scan-only-association-missing-patches).\n> Full BLOCKED block: no Patch Group tag so the effective baseline is the AWS default; remediation via create-tags Key=\"Patch Group\" or set-default-patch-baseline.\n\n### Worked example — Maintenance window register-task\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--maintenance-window-register-task).\n> Full READY block: register-task-with-maintenance-window with tag targets, NoReboot, max-concurrency 10% \u002F max-errors 0, weekly target-membership verification.\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER run `Operation=Install` without first dumping the effective\n  baseline's `ApprovalRules.PatchRules[]` via `describe-patch-baseline`.\n  A baseline with `ApproveAfterDays: 0` and broad classifications will\n  install far more than the operator expects — including major-version\n  package upgrades that break applications.\n\n- NEVER assume `NoReboot=true` means \"no reboot needed.\" It suppresses the\n  Patch Manager-initiated reboot, but kernel patches on Linux and\n  cumulative updates on Windows still require a reboot to activate. The\n  host runs stale code until the next reboot; compliance will show\n  `InstalledPending` until then.\n\n- NEVER issue a fleet-wide `Operation=Install` via `send-command\n  --instance-ids i-a,i-b,...,i-z` without `--max-errors 0\n  --max-concurrency \"10%\"`. Without rate-control, every target reboots\n  in parallel — a fleet-wide outage from a single bad patch.\n\n- NEVER trust an association `Status: Success` as proof of patch\n  compliance. A `Success` association with `Operation=Scan` reports\n  green while leaving the host `NON_COMPLIANT` — the scan ran, the\n  patches are still missing. Always cross-check\n  `list-compliance-items` `ComplianceStatus`.\n\n- NEVER tag instances with `patch group`, `PatchGroup`, or `patch-group`.\n  The recognized tag key is `Patch Group` (space, capital G). Wrong-case\n  tags silently fall back to the default baseline.\n\n- NEVER create a custom patch baseline without either setting it as the\n  regional default OR mapping a `Patch Group` tag to its name. A\n  baseline that is neither is dead configuration — the operator thinks\n  they have custom rules in effect, but instances use the default.\n\n- NEVER delete an association as the first remediation step. Modify-then-\n  test (`update-association` to change `Operation=Scan` to `Install`)\n  preserves targeting and schedule; deleting loses the configuration\n  context.\n\n- NEVER rely on `describe-patch-baselines --filters Key=OWNER,Values=Self`\n  to find the *effective* baseline for an instance. Use\n  `get-patch-baseline-for-instance` — it resolves the regional default,\n  the `Patch Group` tag, and any explicit association in priority order.\n\n- NEVER evaluate patch compliance on an instance with `PingStatus:\n  ConnectionLost` or `Inactive`. Downstream data is stale; reporting it\n  produces noise. Restore coverage first, re-scan, then evaluate.\n\n- NEVER assume `AmazonEC2RoleforSSM` (legacy) is equivalent to\n  `AmazonSSMManagedInstanceCore` (modern). The legacy policy lacks\n  several patch and inventory permissions and breaks Session Manager.\n  Flag instances still on the legacy policy.\n\n- NEVER run an Install in a private subnet without confirming the SSM VPC\n  endpoints (`ssm`, `ssmmessages`, `ec2messages`) are present. Without\n  them, the agent cannot return command output and the Install appears\n  to hang.\n\n- NEVER auto-execute `Operation=Install` during business hours without a\n  maintenance window. Even `NoReboot=true` Installs restart services\n  (httpd, nginx, docker) that can drop in-flight requests.\n\n- NEVER use `--targets Key=InstanceIds,Values=*` or a tag-based wildcard\n  for an Install without explicit operator confirmation. Always scope to\n  a known `Patch Group` value or an explicit instance-id list.\n\n- NEVER skip the free-disk check before Install. A full root volume\n  causes the package manager to fail mid-Install, leaving the host in a\n  broken state that requires manual rescue.\n\n- NEVER assume Scan results are immediately visible. `describe-patch-states`\n  and `list-compliance-items` are eventually consistent after a Scan\n  (~30 s – 2 min). Re-poll before declaring the result.\n\n- NEVER assume `AWS-RunPatchBaseline` is the same as `AWS-ApplyPatchBaseline`.\n  `Apply` is the legacy Windows-only document; `Run` is the modern cross-\n  OS document. New associations should always use `Run`.\n\n- NEVER claim \"fully patched\" based on a single Scan. Re-scan in 24 h to\n  catch reverted patches, package-manager hook rollbacks, and Windows\n  cumulative-update supersession.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`send-command Operation=Install`, `update-association` to `Install`,\n  `create\u002Fupdate-patch-baseline`, `set-default-patch-baseline`,\n  `create\u002Fregister-task-with-maintenance-window`), emit:\n  `CONFIRM: About to \u003Coperation> on \u003Ctarget> in account \u003Caccount> region\n  \u003Cregion>. This will \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT execute\n  until the operator confirms.\n\n- **Capture pre-state for rollback.** Before any Install:\n  `aws ec2 create-snapshot --volume-id \u003Croot> --description \"pre-patch\n  $(date -u +%FT%TZ)\"`. Patch Manager does NOT auto-snapshot. An AMI is\n  even safer for fleet operations.\n\n- **Always pass explicit `--instance-ids \u003Cid>` or a scoped\n  `--targets Key=tag:\"Patch Group\",Values=\u003Cgroup>`** for Installs.\n  Wildcards and `Values=*` are fleet-outage vectors.\n\n- **Rate-control is MANDATORY for fleet Installs.** Set\n  `--max-errors 0` (halt on first error) and `--max-concurrency \"10%\"`\n  (or `\"1\"` for high-risk patches). Halting on first error contains a\n  bad patch to the first batch.\n\n- **Verify target membership before the maintenance window opens.**\n  `describe-maintenance-window-targets --window-id \u003Cid>` — empty targets\n  means the window will no-op.\n\n- **Verify the baseline scope before the first Install on a new custom\n  baseline.** Run a Scan on a single instance; review the\n  `InstalledPendingCount` and `MissingCount` deltas before fleet-wide\n  Install.\n\n- **Prefer reversible changes.** For baseline updates, increment the\n  baseline version (`--baseline-version`) so the previous version is\n  preserved in baseline history. For association updates, snapshot\n  `describe-association --association-id \u003Cid>` first.\n\n- **Test patches on a single instance before fleet rollout.** Use a\n  \"canary\" `Patch Group` (e.g., `prod-linux-canary`) targeting one or\n  two hosts; observe for 24-48 h; then promote to the production group.\n\n## Recent AWS features (2024-2026)\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#recent-aws-features-2024-2026).\n> Quick Setup org-wide patching, Patch Manager for macOS, AL2023 baseline, Ubuntu 24.04 snap holds, SSM document versioning, PatchBaseline CloudFormation resources, Config PatchCompliance reporting.\n\n## References (load on demand)\n\n- [advanced-patterns](references\u002Fadvanced-patterns.md) — OS-by-OS baseline matrix, cost\u002Ftime baselines, Step 0 expert knowledge (non-obvious Patch Manager behaviors), Recent AWS features (2024-2026)\n- [diagnostic-commands](references\u002Fdiagnostic-commands.md) — pagination limits and the nine live-account pre-flight probes moved from SKILL.md\n- [patch-baseline-design](references\u002Fpatch-baseline-design.md) — baseline archetypes, approval-rule shapes, OS product taxonomy, Patch Group targeting, maintenance-window task contract\n- [worked-examples](references\u002Fworked-examples.md) — BLOCKED scan-only-association and READY maintenance-window register-task examples moved from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F Systems Manager Patch Manager Operations & Compliance.\n\n## AWS documentation\n\n- **AWS Systems Manager User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fwhat-is-systems-manager.html\n- **AWS Systems Manager Patch Manager** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsystems-manager-patch.html\n- **Working with patch baselines** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-patch-baselines.html\n- **About the AWS-RunPatchBaseline document** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-patch-runbaseline.html\n- **Working with maintenance windows** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-maintenance.html\n- **Patch compliance** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-compliance.html\n- **AWS Systems Manager Quick Setup** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fquick-setup.html\n- **AWS CLI Command Reference: ssm** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fssm\u002F\n","# SSM Patch Operator\n\n## What this skill does\n\nExecutes SSM Patch Manager operations on EC2 and hybrid (`mi-*`) fleets\ncorrectly and safely. Runs deterministic pre-checks (instance managed\nstatus, SSM Agent health, baseline association, free disk space, reboot\ntolerance, maintenance-window target membership), plans the exact\n`aws ssm send-command` \u002F association \u002F maintenance-window sequence, and\nverifies the result via compliance items and command invocations. Every\nstate-changing operation runs behind a CONFIRM gate — `Operation=Install`\ncan reboot hosts and restart services, never auto-trigger.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds + pre-check priority order + OS-by-OS baseline matrix | Before any operation |\n| **§ Mindset** | Why pre-checks matter, the Scan-vs-Install trap, the reboot surprise | Understanding the safety model |\n| **§ Pre-flight** | Instance metadata gate — managed status, agent, baseline, free disk | Before executing any CLI |\n| **§ Process** | Per-operation planning: scan, install, baseline author, maintenance window | When choosing which operation to run |\n| **§ Output format** | Structured VERDICT block with COMMANDS, COMPLIANCE_DELTA, REBOOT | Formatting the response |\n| **§ Anti-Patterns** | NEVER list — common mistakes that reboot fleets or miss compliance drift | Review before any Install |\n| **§ Pre-flight safety** | CONFIRM gate, rate-control, snapshot pre-state, rollback | Defense-in-depth |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (instance UNMANAGED, agent offline, no baseline associated, free disk \u003C 2 GB on root, instance-state not `running`, maintenance-window target empty, baseline auto-approves more than expected) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator `yes` |\n| `COMPLETED` | Operation finished and post-verification passed (command `Success`, compliance delta verified, host back online if rebooted) | Emit compliance summary, side-effects, follow-ups |\n\n**Priority order for pre-checks (apply in this sequence, all must pass for\nREADY):**\n\n1. **Managed status** — instance must appear in `describe-instance-information`\n   with `PingStatus: Active` and `LastPingDateTime` \u003C 30 min ago. Downstream\n   pre-checks are noise on an unreachable host.\n2. **IAM role** — EC2 instance profile (or hybrid activation role) must carry\n   `AmazonSSMManagedInstanceCore` (or verified-equivalent) so the agent can\n   run `AWS-RunPatchBaseline`.\n3. **Disk space** — `AWS-RunPatchBaseline` with `Operation=Install` needs\n   roughly 2 GB free on the root volume (and on Windows `%SystemDrive%`) to\n   stage packages and backups. Install on a full disk fails mid-way and\n   leaves the package manager in a broken state.\n4. **Patch baseline association** — instance must reach a baseline either via\n   the regional default, a `Patch Group` tag, or an explicit\n   `AWS-ApplyPatchBaseline`\u002F`AWS-RunPatchBaseline` association. No baseline →\n   Scan returns zero findings (silent false-clean), Install no-ops.\n5. **Baseline scope** — surface what the baseline auto-approves. A custom\n   baseline with `ApproveAfterDays: 0` and broad classifications will install\n   far more than the operator expects. Always dump `describe-patch-baseline`\n   before the first Install.\n6. **Reboot tolerance & maintenance window** — Install may reboot the host;\n   if the instance is in an ASG without ELB grace, in a Multi-AZ RDS primary\n   pair, or outside the maintenance window, BLOCK until the operator confirms.\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#costtime-baselines-2026).\n> Scan ~30 s-5 min\u002Fhost, Install minutes to ~1 h\u002Fhost (Windows cumulative updates dominate), baseline export\u002Fimport metadata-only, in-region command output free.\n\n## OS-by-OS baseline matrix\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#os-by-os-baseline-matrix).\n> Default baseline, default document, and reboot-on-Install semantics for AL2\u002FAL2023, Ubuntu, RHEL, SLES, Windows, macOS; default only applies when no custom default and no Patch Group tag matches.\n\n## Mindset\n\n**One-line takeaway:** `Operation=Scan` writes a compliance record without\ntouching packages; `Operation=Install` mutates the host and may reboot it.\nDriven by three Patch Manager realities:\n\n- **Scan is non-destructive, Install is state-changing.** A bare\n  `send-command AWS-RunPatchBaseline` defaults to `Operation=Scan`. Many\n  operators assume the association they \"enabled\" is patching; in reality\n  the default is to *report* compliance, not remediate it. A fleet can sit\n  `NON_COMPLIANT` for years while every association shows `Success` — the\n  scan knew about the gap and nothing installed patches.\n- **Baseline scope is the install contract.** `ApprovalRules` decide what\n  the Install actually applies. `ApproveAfterDays: 0` approves every patch\n  on release (aggressive); `ApproveAfterDays: 7` waits a week.\n  Classification + Severity filters narrow which package classes are in\n  scope. An Install without first dumping the baseline's\n  `ApprovalRules.PatchRules[]` is \"sign without reading\".\n- **Patch Group is a tag, not an association.** Instances link to a custom\n  baseline via the case-sensitive tag key `Patch Group` (space, capital G).\n  Without the tag, the instance falls back to the regional default baseline\n  — silently. A \"patched\" fleet with no `Patch Group` tags may be patching\n  against the wrong baseline entirely.\n\n## Pre-flight: instance metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n> Moved to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md#pagination-and-live-account-pre-flight).\n> Pagination limits (50\u002Fpage describe-instance-information, 100\u002Fpage describe-patch-states) and the 9 live-account pre-flight probes: managed status, EC2 state, custom\u002FAWS baselines, effective baseline, patch states, compliance rows, associations, MW executions, free-disk check.\n\n**Malformed input:** if the input JSON is invalid or missing required fields,\nemit `VERDICT: ERROR` with `REASON: Instance\u002Foperation configuration is not\nvalid JSON or is missing required fields — cannot plan.` and\n`REMEDIATION: Re-fetch with aws ssm describe-instance-information\n--instance-information-filter-list Key=InstanceIds,ValueSet=\u003Cid> --output\njson and aws ssm get-patch-baseline-for-instance --instance-id \u003Cid>\n--output json, then re-plan.`\n\n| Instance attribute | Effect on operation |\n|---|---|\n| `PingStatus: Active` + `LastPingDateTime` \u003C 30 min | Pre-check passes. |\n| `PingStatus: ConnectionLost` \u002F `Inactive` | BLOCKED — host unreachable. Classify UNMANAGED and stop. |\n| `ResourceType: EC2Instance`, no `IamInstanceProfile` | BLOCKED — no SSM role. |\n| `ResourceType: ManagedInstance` (`mi-*`), role lacks `AmazonSSMManagedInstanceCore` | BLOCKED — hybrid activation role gap. |\n| `PlatformType: Linux` \u002F `Windows` \u002F `macOS` | Selects the OS-family default baseline and the patch-filter taxonomy. |\n| `IsLatestVersion: false` | WARN — old agent; may misreport compliance. Surface but do not BLOCK. |\n| No `Patch Group` tag AND no explicit association | Falls back to the regional default. Surface as a CONFIG_GAP-style note, not a BLOCKED unless the operator's intent is to use a custom baseline. |\n| Instance `State: stopped`, `stopping`, `shutting-down` | BLOCKED — patch execution requires `running`. |\n| Free disk \u003C 2 GB on root (Linux) \u002F `%SystemDrive%` (Windows) | BLOCKED for Install; Scan can still proceed. |\n| `AWS-RunPatchBaseline` association with `Operation=Scan` only | Install will not run on schedule; surface for explicit Install command or association update. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Patch Manager behaviors\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#step-0-expert-knowledge--non-obvious-patch-manager-behaviors).\n> Run-vs-Apply documents, Scan-only default, NoReboot deferral, Patch Group case sensitivity, dead custom baselines, AND\u002FOR rule logic, ApproveAfterDays counted from patch release, effective-baseline reporting, fleet rate-control, MW target membership timing, OS-native reboot, agent not auto-updated, eventual consistency after Scan, manual cross-account\u002Fregion replication, Ubuntu Snapshot Ids holds.\n\n### Step 1: Pre-check gate — BLOCKED if any check fails\n\nRun ALL of the following pre-checks. If ANY fails, the verdict is BLOCKED\nwith the failed checks enumerated in PRE_CHECKS. Do NOT execute the\noperation.\n\n**For ALL operations:**\n1. Instance is `running` (`ec2 describe-instances`) and `PingStatus: Active`\n   with `LastPingDateTime` \u003C 30 min (`ssm describe-instance-information`).\n2. IAM role includes `AmazonSSMManagedInstanceCore` (or verified equivalent\n   that grants `ssm:SendCommand`, `ssm:GetCommandInvocation`,\n   `ssm:StartSession`, and the patch-related SSM actions).\n3. The caller (operator role) holds `ssm:SendCommand`,\n   `ssm:GetCommandInvocation`, `ssm:DescribePatch*`,\n   `ssm:ListComplianceItems`, and (for Install) `ssm:StartAssociationsOnce`.\n4. No concurrent command on the instance (`ssm list-commands --filters\n   Key=InstanceId,Values=\u003Cid> Key=Status,Values=Pending,InProgress`).\n   Default per-instance concurrency is 1; a second command returns\n   `TargetNotConnected` or `InvalidInstanceId`.\n\n**For Scan (`send-command AWS-RunPatchBaseline Operation=Scan`):**\n5. The instance's effective baseline is non-empty (verify via\n   `get-patch-baseline-for-instance`). A baseline with zero rules produces\n   a Scan that returns zero findings — silent false-clean.\n6. SSM Agent version is recent enough for the OS (Amazon Linux 2023 needs\n   agent v3.x+).\n\n**For Install (`send-command AWS-RunPatchBaseline Operation=Install`):**\n5. ALL of the Scan pre-checks.\n6. Free disk on root (Linux) \u002F `%SystemDrive%` (Windows) >= 2 GB. Verify\n   via a quick `AWS-RunShellScript \"df -m \u002F\"` (Linux) or\n   `Get-PSDrive C` (Windows) before the Install command.\n7. Snapshot pre-state for rollback: tag the AMI or capture\n   `describe-instances` JSON. Patch Manager does NOT auto-snapshot.\n8. Reboot tolerance confirmed: instance is NOT in an active ALB target\n   without deregistration, is NOT a Multi-AZ RDS primary's only EC2\n   dependency, and IS inside the maintenance window (if applicable).\n9. Baseline `ApprovalRules` reviewed and matches operator intent. A\n   custom baseline with `ApproveAfterDays: 0` and broad classifications\n   will install far more than expected. Dump\n   `aws ssm describe-patch-baseline --baseline-id \u003Cid>` and surface the\n   approval scope in NOTES.\n10. (Optional but recommended) Pre-Install snapshot:\n    `aws ec2 create-snapshot --volume-id \u003Croot-volume-id>\n    --description \"pre-patch $(date -u +%FT%TZ)\"`.\n\n**For create\u002Fupdate patch baseline:**\n5. The baseline payload references valid `OperatingSystem`, `Product`\n   values (`AmazonLinux2`, `AmazonLinux2023`, `Ubuntu2004`, `Ubuntu2204`,\n   `Ubuntu2404`, `RedhatEnterpriseLinux7`\u002F`8`\u002F`9`, `Suse15`,\n   `WindowsServer2019`, `WindowsServer2022`, `macOS12.5` etc.).\n6. `ApprovalRules.PatchRules[]` `PatchFilterGroup` values match the\n   supported classification\u002Fseverity taxonomy for that OS.\n7. The baseline is being set as default OR has a `Patch Group` tag value\n   mapped to its name. Otherwise the baseline is dead configuration.\n8. (For update) `--baseline-version` is being incremented intentionally;\n   the previous version is preserved in baseline history but not auto-\n   rolled back.\n\n**For maintenance window create \u002F register-task:**\n5. `--schedule` cron expression is valid and points to the intended time\n   zone (`--schedule-timezone`, default UTC).\n6. `--duration 2` (hours) and `--cutoff 1` (hours) leave a safe buffer.\n7. `--targets` resolves to a non-empty set at the planned execution time\n   (verify via `aws ssm describe-maintenance-window-targets --window-id\n   \u003Cid>` after registration).\n8. The task's `--task-parameters` reference `Operation=Install` (or\n   `Scan`), the right `Snapshot Ids`, and `NoReboot` as intended.\n9. The maintenance window's IAM service role (`--service-role-arn`) trusts\n   `ssm.amazonaws.com` and has `AmazonSSMAutomationRole` or equivalent.\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI sequence\nand the CONFIRM gate. The plan includes:\n\n- The exact AWS CLI command with all flags populated from the baseline +\n  instance configuration.\n- The expected duration (Scan: 30 s – 5 min; Install: minutes to ~1 hour;\n  maintenance window: until scheduled end).\n- The expected side-effects (compliance delta for Scan; potential reboot +\n  `InstalledPending` count for Install).\n- The CONFIRM gate prompt.\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (Install, association update to Install, baseline create\u002Fupdate, MW\n  create\u002Fregister-task), emit:\n  `CONFIRM: About to \u003Coperation> on \u003Cinstance-id or fleet-tag> in account\n  \u003Caccount> region \u003Cregion>. This will \u003Cconsequence, e.g. install patches\n  and may reboot the host(s)>. Proceed? (yes\u002Fno)`.\n- Capture pre-state for rollback: tag the AMI or run\n  `aws ec2 create-create-snapshot --volume-id \u003Croot> --description\n  \"pre-patch $(date -u +%FT%TZ)\"` for Install.\n- Execute the CLI. Capture the `CommandId`.\n- For long-running commands, poll\n  `aws ssm get-command-invocation --command-id \u003Cid> --instance-id \u003Cid>`\n  until `Status` is `Success` \u002F `Failed` \u002F `TimedOut` \u002F `Cancelled`.\n- For maintenance window task, capture the `WindowTaskId` and poll\n  `describe-maintenance-window-executions`.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter the operation finishes, run post-verification. ALL checks must pass\nfor `COMPLETED`.\n\n1. `get-command-invocation` returns `Status: Success` (or the maintenance\n   window execution `Status: COMPLETED`).\n2. For Scan: re-fetch `describe-patch-states --instance-ids \u003Cid>` and\n   verify the `OperationEndTime` is fresh. Surface the missing-count delta.\n3. For Install: re-fetch `list-compliance-items` and verify\n   `ComplianceStatus: COMPLIANT` (or surface remaining\n   `NON_COMPLIANT` items by severity).\n4. Verify the host came back online after any reboot:\n   `describe-instance-information` `PingStatus: Active` AND\n   `ec2 describe-instances` `State: running`.\n5. For Windows `NoReboot=true` Installs: surface the\n   `InstalledPending` count and the explicit next-reboot requirement.\n6. Surface side-effects: changed services, applied patch list (from the\n   command output's `InstalledPatches` field), reboot happened Y\u002FN.\n7. Plan follow-up: re-scan in 24 h to catch reverted patches; remove\n   pre-patch snapshots after the verification window (e.g., 7 days).\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure details\n— do not claim COMPLETED.\n\n## Output format (per operation)\n\n```text\nOPERATION: \u003Cscan | install | create-baseline | update-baseline | create-mw | register-mw-task>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Cinstance-id | tag:Patch Group,Values=\u003Cgroup> | baseline-id | window-id>\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. \u003CCLI command with flags populated>\n  2. \u003Cwait \u002F poll command>\n  3. \u003Cnext step>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\n  - [FAIL] \u003Cverification description> — \u003Creason>\nCOMPLIANCE_DELTA: \u003Cbefore: missing X \u002F after: missing Y>\nREBOOT: \u003Cyes | no | deferred>\nNOTES: \u003Crate-control, snapshot, caveats, follow-ups>\n```\n\n### Worked example — Install on a single Linux host\n\n```text\nOPERATION: install\nVERDICT: READY\nTARGET: i-0abc123def456789a\nPRE_CHECKS:\n  - [PASS] i-0abc123def456789a PingStatus Active, LastPingDateTime 2 min ago\n  - [PASS] IAM role AmazonSSMManagedInstanceCore-Role includes\n    AmazonSSMManagedInstanceCore\n  - [PASS] EC2 State running\n  - [PASS] Free disk on \u002F is 18 GB (>= 2 GB)\n  - [PASS] Effective baseline pb-0aaa1234 (custom prod-linux-critical)\n    via Patch Group tag \"prod-linux-critical\"\n  - [PASS] Baseline ApprovalRules: Classification=Security,\n    Severity=Critical+Important, ApproveAfterDays=3 — 14 patches qualify\n  - [PASS] No concurrent command in flight\n  - [PASS] Instance is in maintenance window mw-0aaa (cutoff in 95 min)\nSTEPS:\n  1. CONFIRM: About to send-command AWS-RunPatchBaseline Operation=Install\n     on i-0abc123def456789a in account 111111111111 region us-east-1.\n     This will install up to 14 Security patches (Critical+Important) and\n     MAY REBOOT the host if a kernel update is in scope. Proceed? (yes\u002Fno)\n  2. aws ec2 create-snapshot --volume-id vol-0root123 \\\n       --description \"pre-patch $(date -u +%FT%TZ)\"\n  3. aws ssm send-command \\\n       --instance-ids i-0abc123def456789a \\\n       --document-name \"AWS-RunPatchBaseline\" \\\n       --parameters '{\"Operation\":[\"Install\"],\"SnapshotIds\":[\"\"],\"RebootOption\":[\"NoReboot\"]}' \\\n       --comment \"Install Security\u002FCritical+Important on prod host\" \\\n       --output-s3-bucket-name audit-ssm-output \\\n       --output-s3-key-prefix patch-install\u002F$(date -u +%Y\u002F%m\u002F%d)\n  4. aws ssm get-command-invocation \\\n       --command-id \u003CCommandId from step 3> \\\n       --instance-id i-0abc123def456789a\n     (poll until Status is Success \u002F Failed \u002F TimedOut)\nPOST_VERIFY:\n  - (pending execution)\nCOMPLIANCE_DELTA: (before: 14 missing \u002F after: pending)\nREBOOT: deferred (NoReboot=true; kernel patch will activate on next reboot,\n  host is running stale kernel until then)\nNOTES:\n  - The host will report COMPLIANT only after the next reboot activates the\n    kernel patch. Plan a reboot via maintenance window or ASG instance\n    refresh within the next 7 days.\n  - Re-scan in 24 h to catch any patches reverted by package-manager hooks.\n  - Pre-patch snapshot snap-0prepatch123 retained for 7 days; delete after\n    the verification window.\n  - Rate-control: single-instance target — no --max-concurrency needed.\n    For fleet Installs, add `--max-errors 0 --max-concurrency \"10%\"`.\n```\n\n### Worked example — Scan-only association missing patches\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--scan-only-association-missing-patches).\n> Full BLOCKED block: no Patch Group tag so the effective baseline is the AWS default; remediation via create-tags Key=\"Patch Group\" or set-default-patch-baseline.\n\n### Worked example — Maintenance window register-task\n\n> Moved to [references\u002Fworked-examples.md](references\u002Fworked-examples.md#worked-example--maintenance-window-register-task).\n> Full READY block: register-task-with-maintenance-window with tag targets, NoReboot, max-concurrency 10% \u002F max-errors 0, weekly target-membership verification.\n\n## Anti-Patterns — NEVER do these things\n\n- NEVER run `Operation=Install` without first dumping the effective\n  baseline's `ApprovalRules.PatchRules[]` via `describe-patch-baseline`.\n  A baseline with `ApproveAfterDays: 0` and broad classifications will\n  install far more than the operator expects — including major-version\n  package upgrades that break applications.\n\n- NEVER assume `NoReboot=true` means \"no reboot needed.\" It suppresses the\n  Patch Manager-initiated reboot, but kernel patches on Linux and\n  cumulative updates on Windows still require a reboot to activate. The\n  host runs stale code until the next reboot; compliance will show\n  `InstalledPending` until then.\n\n- NEVER issue a fleet-wide `Operation=Install` via `send-command\n  --instance-ids i-a,i-b,...,i-z` without `--max-errors 0\n  --max-concurrency \"10%\"`. Without rate-control, every target reboots\n  in parallel — a fleet-wide outage from a single bad patch.\n\n- NEVER trust an association `Status: Success` as proof of patch\n  compliance. A `Success` association with `Operation=Scan` reports\n  green while leaving the host `NON_COMPLIANT` — the scan ran, the\n  patches are still missing. Always cross-check\n  `list-compliance-items` `ComplianceStatus`.\n\n- NEVER tag instances with `patch group`, `PatchGroup`, or `patch-group`.\n  The recognized tag key is `Patch Group` (space, capital G). Wrong-case\n  tags silently fall back to the default baseline.\n\n- NEVER create a custom patch baseline without either setting it as the\n  regional default OR mapping a `Patch Group` tag to its name. A\n  baseline that is neither is dead configuration — the operator thinks\n  they have custom rules in effect, but instances use the default.\n\n- NEVER delete an association as the first remediation step. Modify-then-\n  test (`update-association` to change `Operation=Scan` to `Install`)\n  preserves targeting and schedule; deleting loses the configuration\n  context.\n\n- NEVER rely on `describe-patch-baselines --filters Key=OWNER,Values=Self`\n  to find the *effective* baseline for an instance. Use\n  `get-patch-baseline-for-instance` — it resolves the regional default,\n  the `Patch Group` tag, and any explicit association in priority order.\n\n- NEVER evaluate patch compliance on an instance with `PingStatus:\n  ConnectionLost` or `Inactive`. Downstream data is stale; reporting it\n  produces noise. Restore coverage first, re-scan, then evaluate.\n\n- NEVER assume `AmazonEC2RoleforSSM` (legacy) is equivalent to\n  `AmazonSSMManagedInstanceCore` (modern). The legacy policy lacks\n  several patch and inventory permissions and breaks Session Manager.\n  Flag instances still on the legacy policy.\n\n- NEVER run an Install in a private subnet without confirming the SSM VPC\n  endpoints (`ssm`, `ssmmessages`, `ec2messages`) are present. Without\n  them, the agent cannot return command output and the Install appears\n  to hang.\n\n- NEVER auto-execute `Operation=Install` during business hours without a\n  maintenance window. Even `NoReboot=true` Installs restart services\n  (httpd, nginx, docker) that can drop in-flight requests.\n\n- NEVER use `--targets Key=InstanceIds,Values=*` or a tag-based wildcard\n  for an Install without explicit operator confirmation. Always scope to\n  a known `Patch Group` value or an explicit instance-id list.\n\n- NEVER skip the free-disk check before Install. A full root volume\n  causes the package manager to fail mid-Install, leaving the host in a\n  broken state that requires manual rescue.\n\n- NEVER assume Scan results are immediately visible. `describe-patch-states`\n  and `list-compliance-items` are eventually consistent after a Scan\n  (~30 s – 2 min). Re-poll before declaring the result.\n\n- NEVER assume `AWS-RunPatchBaseline` is the same as `AWS-ApplyPatchBaseline`.\n  `Apply` is the legacy Windows-only document; `Run` is the modern cross-\n  OS document. New associations should always use `Run`.\n\n- NEVER claim \"fully patched\" based on a single Scan. Re-scan in 24 h to\n  catch reverted patches, package-manager hook rollbacks, and Windows\n  cumulative-update supersession.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation\n  (`send-command Operation=Install`, `update-association` to `Install`,\n  `create\u002Fupdate-patch-baseline`, `set-default-patch-baseline`,\n  `create\u002Fregister-task-with-maintenance-window`), emit:\n  `CONFIRM: About to \u003Coperation> on \u003Ctarget> in account \u003Caccount> region\n  \u003Cregion>. This will \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT execute\n  until the operator confirms.\n\n- **Capture pre-state for rollback.** Before any Install:\n  `aws ec2 create-snapshot --volume-id \u003Croot> --description \"pre-patch\n  $(date -u +%FT%TZ)\"`. Patch Manager does NOT auto-snapshot. An AMI is\n  even safer for fleet operations.\n\n- **Always pass explicit `--instance-ids \u003Cid>` or a scoped\n  `--targets Key=tag:\"Patch Group\",Values=\u003Cgroup>`** for Installs.\n  Wildcards and `Values=*` are fleet-outage vectors.\n\n- **Rate-control is MANDATORY for fleet Installs.** Set\n  `--max-errors 0` (halt on first error) and `--max-concurrency \"10%\"`\n  (or `\"1\"` for high-risk patches). Halting on first error contains a\n  bad patch to the first batch.\n\n- **Verify target membership before the maintenance window opens.**\n  `describe-maintenance-window-targets --window-id \u003Cid>` — empty targets\n  means the window will no-op.\n\n- **Verify the baseline scope before the first Install on a new custom\n  baseline.** Run a Scan on a single instance; review the\n  `InstalledPendingCount` and `MissingCount` deltas before fleet-wide\n  Install.\n\n- **Prefer reversible changes.** For baseline updates, increment the\n  baseline version (`--baseline-version`) so the previous version is\n  preserved in baseline history. For association updates, snapshot\n  `describe-association --association-id \u003Cid>` first.\n\n- **Test patches on a single instance before fleet rollout.** Use a\n  \"canary\" `Patch Group` (e.g., `prod-linux-canary`) targeting one or\n  two hosts; observe for 24-48 h; then promote to the production group.\n\n## Recent AWS features (2024-2026)\n\n> Moved to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md#recent-aws-features-2024-2026).\n> Quick Setup org-wide patching, Patch Manager for macOS, AL2023 baseline, Ubuntu 24.04 snap holds, SSM document versioning, PatchBaseline CloudFormation resources, Config PatchCompliance reporting.\n\n## References (load on demand)\n\n- [advanced-patterns](references\u002Fadvanced-patterns.md) — OS-by-OS baseline matrix, cost\u002Ftime baselines, Step 0 expert knowledge (non-obvious Patch Manager behaviors), Recent AWS features (2024-2026)\n- [diagnostic-commands](references\u002Fdiagnostic-commands.md) — pagination limits and the nine live-account pre-flight probes moved from SKILL.md\n- [patch-baseline-design](references\u002Fpatch-baseline-design.md) — baseline archetypes, approval-rule shapes, OS product taxonomy, Patch Group targeting, maintenance-window task contract\n- [worked-examples](references\u002Fworked-examples.md) — BLOCKED scan-only-association and READY maintenance-window register-task examples moved from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F Systems Manager Patch Manager Operations & Compliance.\n\n## AWS documentation\n\n- **AWS Systems Manager User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fwhat-is-systems-manager.html\n- **AWS Systems Manager Patch Manager** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsystems-manager-patch.html\n- **Working with patch baselines** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-patch-baselines.html\n- **About the AWS-RunPatchBaseline document** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-patch-runbaseline.html\n- **Working with maintenance windows** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-maintenance.html\n- **Patch compliance** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-compliance.html\n- **AWS Systems Manager Quick Setup** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fquick-setup.html\n- **AWS CLI Command Reference: ssm** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fssm\u002F\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":43},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"dependencies":37,"requires_llm":38,"verdict_shape":39,"lifecycle_status":40,"invocation_schema":41,"supports_pipeline":38,"activation_triggers":42},"ssm, systems-manager, patch-manager, management, patching, compliance, maintenance-window, operate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Management","0.1.0","Systems Manager, SSM, Patch Manager, patch baseline, AWS-RunPatchBaseline, AWS-ApplyPatchBaseline, patch group, Scan, Install, compliance, NON_COMPLIANT, maintenance window, rate-control, ApprovalRules, ApproveAfterDays, AmazonSSMManagedInstanceCore, AmazonLinux2, Ubuntu, Windows, macOS, kernel panic, reboot, NoReboot, SSM Quick Setup","operate","medium","false","capability","Running a security patch sweep against an EC2 or hybrid fleet, creating or modifying a custom patch baseline with approval rules, scheduling a maintenance-window task that runs AWS-RunPatchBaseline with Operation=Install, diagnosing a NON_COMPLIANT instance, planning a fleet-wide Install with rate-control and max-errors, switching an association from Scan to Install, or pre-checking a host before the next patch window.","aws-orchestrator","true","READY | BLOCKED | COMPLETED","active","Input: either (a) a patch operation request (operation=scan|install| create-baseline|update-baseline|create-mw|register-task) paired with instance(s), patch baseline, and optional maintenance-window context, OR (b) an instance-id \u002F baseline-id \u002F maintenance-window-id for live- account execution. Output: deterministic OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002F STEPS\u002FPOST_VERIFY block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.","patch this instance, run AWS-RunPatchBaseline, scan for missing patches, install missing patches, create patch baseline, custom patch baseline rules, patch group tag, schedule patching maintenance window, diagnose NON_COMPLIANT patch, Operation=Install, Operation=Scan, rate-control patching, approve after days, NoReboot patch install","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws ssm describe-instance-information, describe-patch-baseline, describe-patch-baselines, describe-patch-states, list-compliance-items, send-command (AWS-RunPatchBaseline), get-command-invocation, create-association, update-association, create-maintenance-window, register-task-with-maintenance-window, and aws ec2 describe-instances...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fssm-patch-operator",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill ssm-patch-operator",{"tool":58,"command":59},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill ssm-patch-operator",{"tool":61,"command":62},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill ssm-patch-operator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002FSKILL.md",true,[66,72,76,80,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",8142,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Feval\u002Ftest-cases.yaml",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fbaselines\u002Finstall-blocked-disk-full.md",478,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fbaselines\u002Finstall-blocked-disk-full.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fbaselines\u002Finstall-blocked-no-patch-group.md",513,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fbaselines\u002Finstall-blocked-no-patch-group.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Finstall-single-host-ready.md","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fbaselines\u002Finstall-single-host-ready.md",{"path":84,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Fmw-register-task-ready.md",696,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fbaselines\u002Fmw-register-task-ready.md",{"path":88,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Fscan-association-missing-patches.md",543,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fbaselines\u002Fscan-association-missing-patches.md",{"path":92,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1853,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4700,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fevals.json",{"path":100,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Finstall-blocked-disk-full.md",1538,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fprompts\u002Finstall-blocked-disk-full.md",{"path":104,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Finstall-blocked-no-patch-group.md",1383,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fprompts\u002Finstall-blocked-no-patch-group.md",{"path":108,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Finstall-single-host-ready.md",1678,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fprompts\u002Finstall-single-host-ready.md",{"path":112,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Fmw-register-task-ready.md",1153,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fprompts\u002Fmw-register-task-ready.md",{"path":116,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Fscan-association-missing-patches.md",1431,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fevals\u002Fprompts\u002Fscan-association-missing-patches.md",{"path":120,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002FREADME.md",11201,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fexamples\u002FREADME.md",{"path":124,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",9024,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fdiagnostic-commands.md",2185,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Freferences\u002Fdiagnostic-commands.md",{"path":132,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Fpatch-baseline-design.md",11281,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Freferences\u002Fpatch-baseline-design.md",{"path":136,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Fworked-examples.md",3673,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Freferences\u002Fworked-examples.md",{"path":140,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":141,"sourceHtmlUrl":142},"skill.usf.yaml",4463,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fssm-patch-operator\u002Fskill.usf.yaml",[144,151,158,165,172,179],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]