[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A6516KQTF9RYPZBWQJN9KY":3,"skill-same:01M7A6516KQTF9RYPZBWQJN9KY":148},{"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},"01M7A6516KQTF9RYPZBWQJN9KY","cognito-user-pool-deployer",null,"Provisions Amazon Cognito user pools with secure defaults — user pool attributes (standard and custom), password policy, MFA (SMS\u002FTOTP), app clients (OAuth code+PKCE, client credentials), hosted UI customization, identity providers (SAML\u002FOIDC\u002FSocial), Lambda triggers (pre-signup, post-confirmation, custom message, pre-token-generation), user pool groups, resource servers with custom scopes, domain (Cognito or custom), advanced security features (ASF ENFORCED), and hosted UI branding. Runs pre-checks (attribute schema, MFA SNS prerequisites, Lambda ARNs, custom domain ACM cert, IdP metadata, IAM permissions), emits create-user-pool and create-user-pool-client CLIs behind a CONFIRM gate, verifies via describe-user-pool. Emits READY_TO_DEPLOY | PREREQUISITES_MISSING. Use when creating user pools, configuring OAuth clients, federating SAML\u002FOIDC, or enabling advanced security features.","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\u002Fcognito-user-pool-deployer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cognito-user-pool-deployer\ndescription: Provisions Amazon Cognito user pools with secure defaults — user pool attributes (standard and custom), password policy, MFA (SMS\u002FTOTP), app clients (OAuth code+PKCE, client credentials), hosted UI customization, identity providers (SAML\u002FOIDC\u002FSocial), Lambda triggers (pre-signup, post-confirmation, custom message, pre-token-generation), user pool groups, resource servers with custom scopes, domain (Cognito or custom), advanced security features (ASF ENFORCED), and hosted UI branding. Runs pre-checks (attribute schema, MFA SNS prerequisites, Lambda ARNs, custom domain ACM cert, IdP metadata, IAM permissions), emits create-user-pool and create-user-pool-client CLIs behind a CONFIRM gate, verifies via describe-user-pool. Emits READY_TO_DEPLOY | PREREQUISITES_MISSING. Use when creating user pools, configuring OAuth clients, federating SAML\u002FOIDC, or enabling advanced security features.\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 cognito-idp create-user-pool, create-user-pool-client, create-identity-provider, create-resource-server, create-group, create-user-pool-domain, update-user-pool, describe-user-pool (AWS CLI v2, SSO or key-based credentials).\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '1'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Security\n  task_type: deploy\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  tags: cognito, security, identity, mfa, oauth, saml, oidc, deploy, user-pool, hosted-ui\n  dependencies: aws-orchestrator\n  keywords: Cognito, user pool, identity provider, IdP, MFA, TOTP, SMS MFA, password policy, app client, OAuth, code flow, PKCE, client credentials, SAML, OIDC, social login, hosted UI, branding, Lambda triggers, pre-signup, post-confirmation, custom message, pre-token-generation, resource server, custom scopes, user pool groups, custom domain, advanced security features, ASF, cognito-idp\n  when_to_use: Creating a new Cognito user pool, configuring an OAuth app client, federating with SAML\u002FOIDC\u002Fsocial identity providers, setting up hosted UI branding, wiring Lambda triggers (pre-signup, post- confirmation, custom message, pre-token-generation), enabling advanced security features (ASF ENFORCED), or registering a custom domain for the hosted UI.\n  activation_triggers: create Cognito user pool, provision user pool, deploy Cognito, OAuth app client, code flow with PKCE, client credentials grant, SAML federation, OIDC identity provider, social login, hosted UI, Cognito branding, pre-signup trigger, post-confirmation trigger, custom message trigger, pre-token-generation trigger, resource server custom scopes, user pool groups, custom domain Cognito, advanced security features, cognito-idp create-user-pool\n  invocation_schema: 'Input: either (a) a user pool deployment intent (create, update) with target pool name, attribute schema, password policy, MFA mode, app client OAuth config, identity providers, Lambda triggers, resource servers, groups, and domain; OR (b) a user pool id for live-account update or validation. Output: deterministic POOL\u002FVERDICT\u002FPRE_CHECKS\u002F STEPS\u002FPOST_VERIFY block per operation, where VERDICT is one of READY_TO_DEPLOY, PREREQUISITES_MISSING.'\n---\n\n# Cognito User Pool Deployer\n\n## What this skill does\n\nProvisions Amazon Cognito user pools with secure identity defaults —\ncorrect attribute schema, password policy, MFA (TOTP preferred over SMS),\nOAuth code flow with PKCE (never implicit), SRP-only auth flows,\n`PreventUserExistenceErrors: ENABLED`, and Advanced Security Features\n(ASF) in ENFORCED mode. Runs deterministic pre-checks before any\nstate-changing CLI (does the SMS-MFA SNS role exist? is the custom domain\nACM cert in us-east-1 and ISSUED? does the SAML IdP metadata resolve?\ndoes the operator hold `cognito-idp:CreateUserPool`?), emits the exact\n`create-user-pool` and `create-user-pool-client` CLIs behind a CONFIRM\ngate, and verifies the pool via `describe-user-pool`. Every pool plan\nsurfaces the implicit-flow block, the ADMIN auth flow block, the deletion\nprotection default, and the token validity ceiling.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **Quick reference** | Verdict thresholds + pre-check priority order + pool config matrix | Before any operation |\n| **Mindset** | Why defaults matter; Cognito silent-failure modes; overwrite traps | Understanding the deployment model |\n| **Pre-flight** | Pool metadata gate — IdP metadata, ACM cert, SNS role, Lambda ARNs | Before executing any CLI |\n| **Process** | Per-operation planning: create, update, add IdP, register domain | When choosing which operation |\n| **Common patterns** | Production user pool \u002F SAML federation \u002F client credentials \u002F custom domain boilerplate | Boilerplate lookup |\n| **STRICT output contract** | Required POOL\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY block | Formatting the response |\n| **NEVER (top 5)** | Hard rules that prevent common insecure patterns | Review before deploy |\n| **Expert heuristic** | When MFA mode is acceptable per use case | Choosing MFA strategy |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `PREREQUISITES_MISSING` | Any pre-check failed (SNS role missing for SMS MFA, ACM cert wrong region\u002FISSUED pending, IdP metadata unresolvable, Lambda ARN invalid, IAM permission missing, Implicit OAuth flow requested, ADMIN auth flow requested, duplicate pool\u002Fclient name, custom attribute deviates from `custom:` prefix, deletion protection inactive on update) | List failures, do NOT execute |\n| `READY_TO_DEPLOY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence with full pool config, wait for operator yes |\n\n**Priority order for pre-checks (apply in this sequence, all must pass for\nREADY_TO_DEPLOY):**\n\n1. **Pool name uniqueness** — `list-user-pools` returns no pool with the\n   target name (for create) or matches exactly one (for update).\n2. **Deletion protection** — for update operations, the existing pool has\n   `DeletionProtection: ACTIVE`. Updating a pool with `INACTIVE` deletion\n   protection blocks production-grade deploys.\n3. **Attribute schema** — every standard attribute referenced in\n   `RequiredAttributes` is in `Schema` (auto-added by Cognito but\n   explicitly declared is safer). Custom attributes use `custom:` prefix\n   and the type is consistent.\n4. **Password policy** — minimum length >= 12, contains uppercase,\n   lowercase, numbers, symbols. `TemporaryPasswordValidityDays` \u003C= 7.\n5. **MFA prerequisites** — if `MfaConfiguration: ON` with SMS:\n   `sms_configuration.SnsCallerArn` resolves to an IAM role in the\n   account; if TOTP only: no SNS role required.\n6. **App client auth flows** — only `ALLOW_USER_SRP_AUTH` and\n   `ALLOW_REFRESH_TOKEN_AUTH` allowed. `ALLOW_ADMIN_USER_PASSWORD_AUTH`\n   and `ALLOW_USER_PASSWORD_AUTH` are blocked.\n7. **OAuth flows** — only `code` grant allowed. `implicit` grant is\n   blocked. `client-credentials` requires a resource server with scopes\n   and `GenerateClientSecret: true`.\n8. **PreventUserExistenceErrors** — set to `ENABLED` (default for new\n   pools). `LEGACY` is blocked.\n9. **Advanced Security Features** — `UserPoolAddOns.AdvancedSecurityMode`\n   is `ENFORCED` (not `AUDIT` or `OFF`).\n10. **Token validity** — `AccessTokenValidity` 5 min - 1 hour,\n    `IdTokenValidity` 5 min - 1 hour, `RefreshTokenValidity` 1-3650 days.\n11. **Identity provider metadata** — for SAML: metadata document or\n    metadata URL resolves; for OIDC: issuer URL, authorize\u002Fauth\u002Fuserinfo\n    endpoints resolve and client credentials provided.\n12. **Lambda triggers** — every ARN in `LambdaConfig` resolves via\n    `lambda:get-function` and the pool has `lambda:InvokeFunction`\n    permission via resource-based policy.\n13. **Custom domain ACM cert** — if `CustomDomainConfig` is set, the ACM\n    certificate ARN is in us-east-1 and status is `ISSUED`. The cert\n    subject\u002Falt names cover the domain.\n14. **IAM permissions** — the operator principal holds\n    `cognito-idp:CreateUserPool` (and `iam:PassRole` if SMS SNS role\n    configured).\n\n**Cognito limits (2026):**\n\n- User pools per account (default): 1000 (soft limit).\n- App clients per user pool: 1000.\n- Identity providers per user pool: 100.\n- Resource servers per user pool: 100.\n- Custom attributes per pool: 25.\n- User pool groups per pool: 1000.\n- Hosted UI domain name length: 63 chars, alphanumeric + hyphen.\n- RefreshTokenValidity max: 3650 days.\n\n## Mindset\n\n**One-line takeaway:** Cognito silently accepts insecure configurations.\nA pool with `MfaConfiguration: OFF`, an app client with\n`ALLOW_USER_PASSWORD_AUTH`, or an OAuth `implicit` grant will all deploy\nsuccessfully and operate — until a credential is leaked or an attacker\nenumerates users. The skill enforces the secure-by-default stance by\nblocking these patterns at the pre-check gate rather than at runtime.\n\nDriven by three Cognito realities:\n\n- **create-user-pool is all-or-nothing on the schema.** The\n  `Schema` array can be set only at pool creation. Adding a required\n  attribute to an existing pool requires migration to a new pool.\n  Pre-flight attribute schema validation is non-negotiable — missing an\n  attribute at create time means a multi-week user migration to fix.\n\n- **MFA configuration is per-pool, but MFA factors are per-user.**\n  `MfaConfiguration: ON` requires every user to set up MFA, but\n  `ENABLED` (optional) lets users skip. SMS MFA requires an SNS caller\n  role — if the role is missing, the pool will deploy and users will\n  receive sign-in errors at the moment they try to set up SMS. The\n  pre-flight gate catches this at deploy time.\n\n- **App client settings silently downgrade security.** An app client\n  with `GenerateClientSecret: false` (public client) is valid for\n  mobile\u002FSPA scenarios, but combined with `ALLOW_USER_PASSWORD_AUTH` it\n  leaks credentials to the client. The skill blocks this combination\n  at the pre-check gate rather than at runtime.\n\n## Pre-flight: user pool metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n**Malformed input:** if the pool spec is missing required fields\n(`PoolName`, `Policies.PasswordPolicy`, or `MfaConfiguration`), emit\n`VERDICT: PREREQUISITES_MISSING` with `REASON: Pool spec missing required\nfield — PoolName, PasswordPolicy, or MfaConfiguration. Cannot plan.` and\n`REMEDIATION: Provide the full pool configuration per\nhttps:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-create-ing-cli.html.`\n\n| Attribute | Effect on operation |\n|---|---|\n| Pool name already exists | Update operation. Must snapshot existing config first. Schema changes will be rejected. |\n| SMS MFA without SNS caller role | Users will see \"Invalid SMS role\" at sign-up. PREREQUISITES_MISSING. |\n| Custom attribute without `custom:` prefix | Cognito rejects the schema. PREREQUISITES_MISSING. |\n| OAuth `implicit` grant requested | Token leakage via URL fragment. PREREQUISITES_MISSING — blocked at pre-check. |\n| `ALLOW_ADMIN_USER_PASSWORD_AUTH` requested | Bypasses SRP, leaks admin creds. PREREQUISITES_MISSING — blocked at pre-check. |\n| ACM cert in non-us-east-1 region | Custom domain will not validate. PREREQUISITES_MISSING. |\n| Lambda trigger ARN not invocable | Trigger silently does not fire. PREREQUISITES_MISSING. |\n| ASF mode `AUDIT` only | Adaptive protection logs but does not enforce. Flag in NOTES, allow if user-acknowledged. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Cognito behaviors\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 1: Pre-check gate — PREREQUISITES_MISSING if any check fails\n\nRun ALL of the following pre-checks. If ANY fails, the verdict is\nPREREQUISITES_MISSING with the failed checks enumerated in PRE_CHECKS.\nDo NOT execute.\n\n**For ALL operations:**\n1. Pool name is set, \u003C= 128 chars, matches `[\\w\\s+=,.@-]+`.\n2. Password policy minimum length >= 12, all character classes true,\n   `TemporaryPasswordValidityDays` \u003C= 7.\n3. `MfaConfiguration` is one of `OFF`, `ON`, `OPTIONAL`.\n4. `PreventUserExistenceErrors: ENABLED`.\n5. `DeletionProtection: ACTIVE`.\n6. `UserPoolAddOns.AdvancedSecurityMode: ENFORCED`.\n7. IAM principal holds `cognito-idp:CreateUserPool`.\n\n**For create-user-pool:**\n8. Pool name does not collide with an existing pool (`list-user-pools`).\n9. Schema: each custom attribute prefixed with `custom:`, type matches.\n10. RequiredAttributes is a subset of Schema (or auto-added standard\n    attributes).\n11. `UsernameAttributes` is either `[\"email\"]`, `[\"phone_number\"]`, or\n    `[\"email\",\"phone_number\"]`. Empty = username (alias) mode.\n12. `AccountRecoverySetting`Mechanisms are valid (verified_email,\n    verified_phone_number, etc.).\n\n**For SMS MFA (MfaConfiguration ON with SMS in EnabledMfas):**\n13. `SmsConfiguration.SnsCallerArn` resolves to an IAM role.\n14. The role trusts `cognito-idp.amazonaws.com` and has\n    `sns:Publish` permission.\n15. ExternalId is set on the trust policy.\n\n**For app client (create-user-pool-client):**\n16. `ExplicitAuthFlows` contains ONLY `ALLOW_USER_SRP_AUTH` and\n    `ALLOW_REFRESH_TOKEN_AUTH` (server-side clients may add\n    `ALLOW_USER_PASSWORD_AUTH` with a documented justification).\n17. `AllowedOAuthFlows` contains ONLY `code` (and optionally\n    `client-credentials` if a resource server is configured).\n    `implicit` is BLOCKED.\n18. `GenerateClientSecret: true` for confidential clients.\n    Machine clients (`client-credentials`) MUST have it true.\n19. `AllowedOAuthScopes` only references scopes defined on a resource\n    server in this pool (besides standard `openid`, `email`,\n    `phone`, `profile`).\n20. `CallbackURLs` and `LogoutURLs` are HTTPS (HTTP only for localhost\n    during development).\n21. `EnableTokenRevocation: true`.\n22. `AccessTokenValidity` and `IdTokenValidity` \u003C= 1 hour (in explicit\n    `TokenValidityUnits`).\n23. `RefreshTokenValidity` \u003C= 3650 days (10 years).\n\n**For SAML identity provider:**\n24. `ProviderDetails.MetadataFile` or `MetadataURL` is provided and\n    resolves.\n25. For MetadataURL: HTTPS endpoint reachable, returns XML with\n    `EntityDescriptor`.\n\n**For OIDC identity provider:**\n26. `ProviderDetails.OIDCIssuer` is HTTPS URL.\n27. `authorize`, `token`, `userInfo` endpoints resolvable from\n    `.well-known\u002Fopenid-configuration`.\n28. `ClientId` and `ClientSecret` set.\n\n**For Lambda triggers (LambdaConfig):**\n29. Every ARN resolves via `lambda:get-function`.\n30. The user pool service principal has `lambda:InvokeFunction` on each\n    function's resource-based policy.\n\n**For custom domain (CustomDomainConfig):**\n31. ACM cert ARN is in us-east-1.\n32. `describe-certificate` returns status `ISSUED`.\n33. Cert subject\u002Falt names cover the custom domain.\n\n### Step 2: READY_TO_DEPLOY — emit deployment plan\n\nIf all pre-checks pass, emit `VERDICT: READY_TO_DEPLOY` with the exact\nCLI sequence and the CONFIRM gate. The plan includes:\n\n- The exact `aws cognito-idp create-user-pool` CLI with the full config\n  (Schema, Policies, MfaConfiguration, UserPoolAddOns, LambdaConfig,\n  AccountRecoverySetting, DeletionProtection).\n- The follow-up `create-user-pool-client` CLI for each app client.\n- The follow-up `create-identity-provider` CLI for each IdP.\n- The follow-up `create-resource-server` CLI for each resource server.\n- The follow-up `create-group` CLI for each group.\n- The follow-up `create-user-pool-domain` (Cognito or custom) CLI.\n- The CONFIRM gate prompt.\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`create-user-pool`, `update-user-pool`, `delete-user-pool`), emit:\n  `CONFIRM: About to \u003Coperation> user pool \u003Cname> in account \u003Caccount>\n  region \u003Cregion>. This will \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT\n  execute until the operator confirms.\n- Snapshot the current pool config before modification:\n  `aws cognito-idp describe-user-pool --user-pool-id \u003Cid> --output json\n  > \u002Ftmp\u002F\u003Cpool-name>-backup-$(date +%s).json`.\n- Execute the CLI with the full pool config.\n\n### Step 4: Post-verification\n\nAfter the operation finishes, run post-verification:\n\n1. `describe-user-pool --user-pool-id \u003Cid>` returns the expected pool\n   config (Schema, Policies, MfaConfiguration, UserPoolAddOns).\n2. `list-user-pool-clients --user-pool-id \u003Cid>` returns the expected\n   clients with correct ExplicitAuthFlows.\n3. For SMS MFA: `list-identity-providers` (no-op verification — IAM role\n   is exercised only at user sign-up time, but the role exists).\n4. For Lambda triggers: invoke the trigger manually with a synthetic\n   event to confirm the resource-based policy allows the pool to call.\n5. For custom domain: `describe-user-pool-domain --domain \u003Cdomain>`\n   returns status `CREATING`, then `ACTIVE` (verify DNS).\n\n## Common pool patterns (boilerplate)\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\n## STRICT output contract\n\n### Required output structure\n\nEvery response MUST begin with this block — no preamble, no conversational\nopening:\n\n```text\nPOOL: \u003Cpool-name>\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nTARGET: \u003Cpool-name> (pool-id: \u003Cid> for updates)\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. CONFIRM: About to \u003Coperation> pool \u003Cname> in account \u003Caccount> region \u003Cregion>. This will \u003Cconsequence>. Proceed? (yes\u002Fno)\n  2. \u003Cexact CLI command — no placeholders>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\n  - [FAIL] \u003Cverification description> — \u003Creason>\nATTRIBUTES: \u003Ccount> standard, \u003Ccount> custom\nMFA: OFF | TOTP-only | SMS-only | TOTP+SMS (config: ON|OPTIONAL)\nOAUTH_FLOWS: code | client-credentials | (blocked: implicit)\nIDPS: \u003Ccount> SAML, \u003Ccount> OIDC, \u003Ccount> social\nASF: ENFORCED | AUDIT | OFF\nNOTES: \u003Csecurity posture, MFA strategy, attribute schema caveats>\n```\n\n### FORBIDDEN output patterns\n\n- NEVER start with \"Let me analyze…\" or \"I'll create…\" — the VERDICT\n  block is the FIRST line, always. No conversational preamble.\n- NEVER use lowercase verdict values — emit `READY_TO_DEPLOY` or\n  `PREREQUISITES_MISSING` (not `ready`, `prerequisites`).\n- NEVER omit PRE_CHECKS — every pre-check run must appear with `[PASS]`\n  or `[FAIL]` and a specific reason for each failure. An empty\n  PRE_CHECKS block is non-compliant.\n- NEVER emit a plan with placeholder values (e.g., `\u003Cpool-id>`,\n  `\u003Caccount-id>`) in a READY_TO_DEPLOY plan — every field must be\n  populated with actual values from the input.\n- NEVER omit the CONFIRM gate as the first STEPS entry for any\n  state-changing operation.\n- NEVER claim success without verifying that the pool was created\n  (via `describe-user-pool`) — a partial CLI sequence with missing\n  required subcommands is non-compliant.\n- NEVER put-update a pool without snapshotting the existing config first\n  — updates to `LambdaConfig` and `MfaConfiguration` overwrite silently.\n- NEVER silently allow `implicit` OAuth flow — block it explicitly with\n  a [FAIL] pre-check row naming the security risk.\n\n### Perfect example output\n\n```text\nPOOL: prod-users\nVERDICT: READY_TO_DEPLOY\nTARGET: prod-users\nPRE_CHECKS:\n  - [PASS] Pool name unique (no collision in list-user-pools)\n  - [PASS] Password policy: 16 chars, all classes, 1-day temp\n  - [PASS] MFA: TOTP-only, no SMS role required\n  - [PASS] Username attributes: [\"email\"]\n  - [PASS] Custom attributes prefixed custom: (custom:tenantId)\n  - [PASS] DeletionProtection: ACTIVE\n  - [PASS] PreventUserExistenceErrors: ENABLED\n  - [PASS] AdvancedSecurityMode: ENFORCED\n  - [PASS] Account recovery: verified_email (priority 1)\n  - [PASS] IAM principal holds cognito-idp:CreateUserPool\nSTEPS:\n  1. CONFIRM: About to create-user-pool prod-users in account 111111111111 region us-east-1. This will CREATE a new user pool with TOTP MFA, 4 attributes, and ENFORCED ASF. Proceed? (yes\u002Fno)\n  2. aws cognito-idp create-user-pool --pool-name prod-users --policies '{...}' --mfa-configuration ON --enabled-mfas '[\"TOTP\"]' --username-attributes '[\"email\"]' --schema '[...]' --user-pool-add-ons 'AdvancedSecurityMode=ENFORCED' --deletion-protection ACTIVE --prevent-user-existence-errors ENABLED\n  3. aws cognito-idp create-user-pool-client --user-pool-id \u003Creturned-id> --client-name prod-web-spa --generate-client-secret --explicit-auth-flows ALLOW_USER_SRP_AUTH ALLOW_REFRESH_TOKEN_AUTH --allowed-o-auth-flows code --allowed-o-auth-scopes openid email profile --callback-urls '[\"https:\u002F\u002Fapp.example.com\u002Fcallback\"]' --logout-urls '[\"https:\u002F\u002Fapp.example.com\u002Flogout\"]' --access-token-validity 1 --id-token-validity 1 --token-validity-units '{\"AccessToken\":\"hours\",\"IdToken\":\"hours\"}' --refresh-token-validity 30 --enable-token-revocation --prevent-user-existence-errors ENABLED\nPOST_VERIFY:\n  - (pending execution)\n  - describe-user-pool returns the pool with MfaConfiguration=ON, AdvancedSecurityMode=ENFORCED\n  - list-user-pool-clients returns prod-web-spa with ExplicitAuthFlows=[ALLOW_USER_SRP_AUTH, ALLOW_REFRESH_TOKEN_AUTH]\nATTRIBUTES: 3 standard (email, given_name, family_name), 1 custom (custom:tenantId)\nMFA: TOTP-only (config: ON)\nOAUTH_FLOWS: code\nIDPS: 0 SAML, 0 OIDC, 0 social\nASF: ENFORCED\nNOTES:\n  - TOTP-only MFA avoids SNS SMS per-message cost — users enroll via authenticator app (Google Authenticator, Authy, 1Password).\n  - RefreshTokenValidity 30 days balances UX and security; reduce to 1 day for high-trust environments.\n  - Custom attribute custom:tenantId is immutable — set once at signup via pre-signup Lambda.\n  - Add the identity pool later if you need AWS credential vending to authenticated users (out of scope here).\n```\n\n## NEVER (top 5)\n\nThese are the highest-impact, most-frequent failure modes in Cognito\ndeployments. Violating any one of these is a security regression.\n\n1. **NEVER enable OAuth `implicit` flow.** Tokens are returned via the\n   URL fragment — leaks via browser history, Referer headers, and\n   proxy logs. Always use `code` grant with PKCE for SPA and mobile\n   clients. Block at pre-check; never silently rewrite.\n\n2. **NEVER enable `ALLOW_ADMIN_USER_PASSWORD_AUTH` on a public client.**\n   It bypasses SRP, exposes admin credentials to the client, and is\n   the #1 path to credential compromise. For confidential server-side\n   clients only, and only with documented justification. Block at\n   pre-check.\n\n3. **NEVER create a user pool without `DeletionProtection: ACTIVE`.**\n   Accidental pool deletion destroys user accounts with no recovery —\n   Cognito has no recycle bin. Active protection requires an explicit\n   `--deletion-protection INACTIVE` step before delete.\n\n4. **NEVER deploy SMS MFA without verifying the SNS caller role.**\n   The pool will deploy cleanly but every SMS-OTP sign-up will fail\n   with \"Invalid SMS role\" at the moment a user tries to enroll. Verify\n   the role exists, trusts `cognito-idp.amazonaws.com`, has\n   `sns:Publish`, and uses `ExternalId` for cross-account trust.\n\n5. **NEVER put a custom attribute in `RequiredAttributes` without\n   declaring it in `Schema`.** Cognito silently accepts but the\n   attribute is never written — signups fail at the moment of attribute\n   collection. Always declare in both arrays, prefixed with `custom:`.\n\n## Expert heuristic: choosing MFA strategy\n\nThe right MFA strategy is a function of user population, network, and\ncost tolerance — not a one-size-fits-all. The heuristic below resolves\nthe trade-off deterministically.\n\n```\nUser population \u002F environment\n   ├─ B2C consumer app (mobile\u002Fweb)?\n   │    ├─ TOTP only (Authenticator app)\n   │    │    Users install Google Authenticator once. No per-message\n   │    │    cost. Works offline. Best UX if app supports enrollment QR.\n   │    └─ SMS as backup only (OPTIONAL + both factors enabled)\n   │         SMS incurs $0.00645\u002Fmsg in the US, more internationally.\n   │         Use only when TOTP is impossible (low-tech user base).\n   │\n   ├─ B2B \u002F workforce?\n   │    └─ TOTP only. Strict ON policy. No SMS — corporate devices\n   │         support authenticators and SMS is exposed to SIM swap.\n   │\n   ├─ Regulated (PCI\u002FHIPAA\u002FGovernment)?\n   │    └─ TOTP ON + ASF ENFORCED. SMS not accepted by most auditors\n   │         as a second factor — SIM swap is a recognized attack.\n   │\n   └─ Development \u002F staging?\n        └─ MFA OFF acceptable if ASF ENFORCED for adaptive defense.\n             Production must still enforce TOTP ON. NEVER disable ASF.\n```\n\n**Decision rules:**\n- Default to TOTP-only. Add SMS only if (a) the user population cannot\n  install authenticators, OR (b) a documented regulation requires it.\n- Always pair MFA with ASF ENFORCED. MFA alone does not stop credential\n  stuffing — ASF detects the pattern.\n- SMS requires an SNS caller role with cross-account ExternalId. The\n  pre-check gate verifies this.\n- TOTP enrollment requires a per-user `SoftwareTokenMfaSettings` write\n  via `cognito-idp:associate-software-token` — outside the deploy scope\n  but flag in NOTES for the application team.\n\nALWAYS emit `AdvancedSecurityMode: ENFORCED` for production pools. AUDIT\nmode is acceptable only in staging for evaluating ASF false-positive\nrates before promoting to ENFORCED.\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## AWS documentation\n\n- **Amazon Cognito User Pools Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-identity-pools.html\n- **User pool attributes** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fuser-pool-settings-attributes.html\n- **MFA in user pools** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fuser-pool-settings-mfa.html\n- **App client OAuth 2.0 flows** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-app-idp-settings.html\n- **SAML federation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-saml-idp.html\n- **OIDC federation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-oidc-idp.html\n- **Lambda triggers** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-identity-pools-working-with-aws-lambda-triggers.html\n- **Resource servers and custom scopes** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-define-resource-servers.html\n- **Advanced Security Features** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pool-settings-advanced-security.html\n- **Managed Login Branding** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fmanaged-login-branding.html\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step-0 expert Cognito behaviors and 2024-2026 feature changes moved from SKILL.md\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — common pool \u002F client \u002F IdP \u002F domain \u002F trigger \u002F group CLI boilerplate moved from SKILL.md\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — live-account pre-flight command listing moved from SKILL.md\n- [references\u002Fpool-config-and-security-defaults.md](references\u002Fpool-config-and-security-defaults.md) — pool archetypes, app client procedure, token validity, verification commands\n- [references\u002Fidentity-providers-and-triggers.md](references\u002Fidentity-providers-and-triggers.md) — SAML\u002FOIDC\u002Fsocial IdP, Lambda trigger, and domain procedures\n\n## Domain\n\nAWS CloudOps \u002F Identity & Access Management — Cognito User Pool Provisioning.\n","# Cognito User Pool Deployer\n\n## What this skill does\n\nProvisions Amazon Cognito user pools with secure identity defaults —\ncorrect attribute schema, password policy, MFA (TOTP preferred over SMS),\nOAuth code flow with PKCE (never implicit), SRP-only auth flows,\n`PreventUserExistenceErrors: ENABLED`, and Advanced Security Features\n(ASF) in ENFORCED mode. Runs deterministic pre-checks before any\nstate-changing CLI (does the SMS-MFA SNS role exist? is the custom domain\nACM cert in us-east-1 and ISSUED? does the SAML IdP metadata resolve?\ndoes the operator hold `cognito-idp:CreateUserPool`?), emits the exact\n`create-user-pool` and `create-user-pool-client` CLIs behind a CONFIRM\ngate, and verifies the pool via `describe-user-pool`. Every pool plan\nsurfaces the implicit-flow block, the ADMIN auth flow block, the deletion\nprotection default, and the token validity ceiling.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **Quick reference** | Verdict thresholds + pre-check priority order + pool config matrix | Before any operation |\n| **Mindset** | Why defaults matter; Cognito silent-failure modes; overwrite traps | Understanding the deployment model |\n| **Pre-flight** | Pool metadata gate — IdP metadata, ACM cert, SNS role, Lambda ARNs | Before executing any CLI |\n| **Process** | Per-operation planning: create, update, add IdP, register domain | When choosing which operation |\n| **Common patterns** | Production user pool \u002F SAML federation \u002F client credentials \u002F custom domain boilerplate | Boilerplate lookup |\n| **STRICT output contract** | Required POOL\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY block | Formatting the response |\n| **NEVER (top 5)** | Hard rules that prevent common insecure patterns | Review before deploy |\n| **Expert heuristic** | When MFA mode is acceptable per use case | Choosing MFA strategy |\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `PREREQUISITES_MISSING` | Any pre-check failed (SNS role missing for SMS MFA, ACM cert wrong region\u002FISSUED pending, IdP metadata unresolvable, Lambda ARN invalid, IAM permission missing, Implicit OAuth flow requested, ADMIN auth flow requested, duplicate pool\u002Fclient name, custom attribute deviates from `custom:` prefix, deletion protection inactive on update) | List failures, do NOT execute |\n| `READY_TO_DEPLOY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence with full pool config, wait for operator yes |\n\n**Priority order for pre-checks (apply in this sequence, all must pass for\nREADY_TO_DEPLOY):**\n\n1. **Pool name uniqueness** — `list-user-pools` returns no pool with the\n   target name (for create) or matches exactly one (for update).\n2. **Deletion protection** — for update operations, the existing pool has\n   `DeletionProtection: ACTIVE`. Updating a pool with `INACTIVE` deletion\n   protection blocks production-grade deploys.\n3. **Attribute schema** — every standard attribute referenced in\n   `RequiredAttributes` is in `Schema` (auto-added by Cognito but\n   explicitly declared is safer). Custom attributes use `custom:` prefix\n   and the type is consistent.\n4. **Password policy** — minimum length >= 12, contains uppercase,\n   lowercase, numbers, symbols. `TemporaryPasswordValidityDays` \u003C= 7.\n5. **MFA prerequisites** — if `MfaConfiguration: ON` with SMS:\n   `sms_configuration.SnsCallerArn` resolves to an IAM role in the\n   account; if TOTP only: no SNS role required.\n6. **App client auth flows** — only `ALLOW_USER_SRP_AUTH` and\n   `ALLOW_REFRESH_TOKEN_AUTH` allowed. `ALLOW_ADMIN_USER_PASSWORD_AUTH`\n   and `ALLOW_USER_PASSWORD_AUTH` are blocked.\n7. **OAuth flows** — only `code` grant allowed. `implicit` grant is\n   blocked. `client-credentials` requires a resource server with scopes\n   and `GenerateClientSecret: true`.\n8. **PreventUserExistenceErrors** — set to `ENABLED` (default for new\n   pools). `LEGACY` is blocked.\n9. **Advanced Security Features** — `UserPoolAddOns.AdvancedSecurityMode`\n   is `ENFORCED` (not `AUDIT` or `OFF`).\n10. **Token validity** — `AccessTokenValidity` 5 min - 1 hour,\n    `IdTokenValidity` 5 min - 1 hour, `RefreshTokenValidity` 1-3650 days.\n11. **Identity provider metadata** — for SAML: metadata document or\n    metadata URL resolves; for OIDC: issuer URL, authorize\u002Fauth\u002Fuserinfo\n    endpoints resolve and client credentials provided.\n12. **Lambda triggers** — every ARN in `LambdaConfig` resolves via\n    `lambda:get-function` and the pool has `lambda:InvokeFunction`\n    permission via resource-based policy.\n13. **Custom domain ACM cert** — if `CustomDomainConfig` is set, the ACM\n    certificate ARN is in us-east-1 and status is `ISSUED`. The cert\n    subject\u002Falt names cover the domain.\n14. **IAM permissions** — the operator principal holds\n    `cognito-idp:CreateUserPool` (and `iam:PassRole` if SMS SNS role\n    configured).\n\n**Cognito limits (2026):**\n\n- User pools per account (default): 1000 (soft limit).\n- App clients per user pool: 1000.\n- Identity providers per user pool: 100.\n- Resource servers per user pool: 100.\n- Custom attributes per pool: 25.\n- User pool groups per pool: 1000.\n- Hosted UI domain name length: 63 chars, alphanumeric + hyphen.\n- RefreshTokenValidity max: 3650 days.\n\n## Mindset\n\n**One-line takeaway:** Cognito silently accepts insecure configurations.\nA pool with `MfaConfiguration: OFF`, an app client with\n`ALLOW_USER_PASSWORD_AUTH`, or an OAuth `implicit` grant will all deploy\nsuccessfully and operate — until a credential is leaked or an attacker\nenumerates users. The skill enforces the secure-by-default stance by\nblocking these patterns at the pre-check gate rather than at runtime.\n\nDriven by three Cognito realities:\n\n- **create-user-pool is all-or-nothing on the schema.** The\n  `Schema` array can be set only at pool creation. Adding a required\n  attribute to an existing pool requires migration to a new pool.\n  Pre-flight attribute schema validation is non-negotiable — missing an\n  attribute at create time means a multi-week user migration to fix.\n\n- **MFA configuration is per-pool, but MFA factors are per-user.**\n  `MfaConfiguration: ON` requires every user to set up MFA, but\n  `ENABLED` (optional) lets users skip. SMS MFA requires an SNS caller\n  role — if the role is missing, the pool will deploy and users will\n  receive sign-in errors at the moment they try to set up SMS. The\n  pre-flight gate catches this at deploy time.\n\n- **App client settings silently downgrade security.** An app client\n  with `GenerateClientSecret: false` (public client) is valid for\n  mobile\u002FSPA scenarios, but combined with `ALLOW_USER_PASSWORD_AUTH` it\n  leaks credentials to the client. The skill blocks this combination\n  at the pre-check gate rather than at runtime.\n\n## Pre-flight: user pool metadata gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n**Malformed input:** if the pool spec is missing required fields\n(`PoolName`, `Policies.PasswordPolicy`, or `MfaConfiguration`), emit\n`VERDICT: PREREQUISITES_MISSING` with `REASON: Pool spec missing required\nfield — PoolName, PasswordPolicy, or MfaConfiguration. Cannot plan.` and\n`REMEDIATION: Provide the full pool configuration per\nhttps:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-create-ing-cli.html.`\n\n| Attribute | Effect on operation |\n|---|---|\n| Pool name already exists | Update operation. Must snapshot existing config first. Schema changes will be rejected. |\n| SMS MFA without SNS caller role | Users will see \"Invalid SMS role\" at sign-up. PREREQUISITES_MISSING. |\n| Custom attribute without `custom:` prefix | Cognito rejects the schema. PREREQUISITES_MISSING. |\n| OAuth `implicit` grant requested | Token leakage via URL fragment. PREREQUISITES_MISSING — blocked at pre-check. |\n| `ALLOW_ADMIN_USER_PASSWORD_AUTH` requested | Bypasses SRP, leaks admin creds. PREREQUISITES_MISSING — blocked at pre-check. |\n| ACM cert in non-us-east-1 region | Custom domain will not validate. PREREQUISITES_MISSING. |\n| Lambda trigger ARN not invocable | Trigger silently does not fire. PREREQUISITES_MISSING. |\n| ASF mode `AUDIT` only | Adaptive protection logs but does not enforce. Flag in NOTES, allow if user-acknowledged. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious Cognito behaviors\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 1: Pre-check gate — PREREQUISITES_MISSING if any check fails\n\nRun ALL of the following pre-checks. If ANY fails, the verdict is\nPREREQUISITES_MISSING with the failed checks enumerated in PRE_CHECKS.\nDo NOT execute.\n\n**For ALL operations:**\n1. Pool name is set, \u003C= 128 chars, matches `[\\w\\s+=,.@-]+`.\n2. Password policy minimum length >= 12, all character classes true,\n   `TemporaryPasswordValidityDays` \u003C= 7.\n3. `MfaConfiguration` is one of `OFF`, `ON`, `OPTIONAL`.\n4. `PreventUserExistenceErrors: ENABLED`.\n5. `DeletionProtection: ACTIVE`.\n6. `UserPoolAddOns.AdvancedSecurityMode: ENFORCED`.\n7. IAM principal holds `cognito-idp:CreateUserPool`.\n\n**For create-user-pool:**\n8. Pool name does not collide with an existing pool (`list-user-pools`).\n9. Schema: each custom attribute prefixed with `custom:`, type matches.\n10. RequiredAttributes is a subset of Schema (or auto-added standard\n    attributes).\n11. `UsernameAttributes` is either `[\"email\"]`, `[\"phone_number\"]`, or\n    `[\"email\",\"phone_number\"]`. Empty = username (alias) mode.\n12. `AccountRecoverySetting`Mechanisms are valid (verified_email,\n    verified_phone_number, etc.).\n\n**For SMS MFA (MfaConfiguration ON with SMS in EnabledMfas):**\n13. `SmsConfiguration.SnsCallerArn` resolves to an IAM role.\n14. The role trusts `cognito-idp.amazonaws.com` and has\n    `sns:Publish` permission.\n15. ExternalId is set on the trust policy.\n\n**For app client (create-user-pool-client):**\n16. `ExplicitAuthFlows` contains ONLY `ALLOW_USER_SRP_AUTH` and\n    `ALLOW_REFRESH_TOKEN_AUTH` (server-side clients may add\n    `ALLOW_USER_PASSWORD_AUTH` with a documented justification).\n17. `AllowedOAuthFlows` contains ONLY `code` (and optionally\n    `client-credentials` if a resource server is configured).\n    `implicit` is BLOCKED.\n18. `GenerateClientSecret: true` for confidential clients.\n    Machine clients (`client-credentials`) MUST have it true.\n19. `AllowedOAuthScopes` only references scopes defined on a resource\n    server in this pool (besides standard `openid`, `email`,\n    `phone`, `profile`).\n20. `CallbackURLs` and `LogoutURLs` are HTTPS (HTTP only for localhost\n    during development).\n21. `EnableTokenRevocation: true`.\n22. `AccessTokenValidity` and `IdTokenValidity` \u003C= 1 hour (in explicit\n    `TokenValidityUnits`).\n23. `RefreshTokenValidity` \u003C= 3650 days (10 years).\n\n**For SAML identity provider:**\n24. `ProviderDetails.MetadataFile` or `MetadataURL` is provided and\n    resolves.\n25. For MetadataURL: HTTPS endpoint reachable, returns XML with\n    `EntityDescriptor`.\n\n**For OIDC identity provider:**\n26. `ProviderDetails.OIDCIssuer` is HTTPS URL.\n27. `authorize`, `token`, `userInfo` endpoints resolvable from\n    `.well-known\u002Fopenid-configuration`.\n28. `ClientId` and `ClientSecret` set.\n\n**For Lambda triggers (LambdaConfig):**\n29. Every ARN resolves via `lambda:get-function`.\n30. The user pool service principal has `lambda:InvokeFunction` on each\n    function's resource-based policy.\n\n**For custom domain (CustomDomainConfig):**\n31. ACM cert ARN is in us-east-1.\n32. `describe-certificate` returns status `ISSUED`.\n33. Cert subject\u002Falt names cover the custom domain.\n\n### Step 2: READY_TO_DEPLOY — emit deployment plan\n\nIf all pre-checks pass, emit `VERDICT: READY_TO_DEPLOY` with the exact\nCLI sequence and the CONFIRM gate. The plan includes:\n\n- The exact `aws cognito-idp create-user-pool` CLI with the full config\n  (Schema, Policies, MfaConfiguration, UserPoolAddOns, LambdaConfig,\n  AccountRecoverySetting, DeletionProtection).\n- The follow-up `create-user-pool-client` CLI for each app client.\n- The follow-up `create-identity-provider` CLI for each IdP.\n- The follow-up `create-resource-server` CLI for each resource server.\n- The follow-up `create-group` CLI for each group.\n- The follow-up `create-user-pool-domain` (Cognito or custom) CLI.\n- The CONFIRM gate prompt.\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`create-user-pool`, `update-user-pool`, `delete-user-pool`), emit:\n  `CONFIRM: About to \u003Coperation> user pool \u003Cname> in account \u003Caccount>\n  region \u003Cregion>. This will \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT\n  execute until the operator confirms.\n- Snapshot the current pool config before modification:\n  `aws cognito-idp describe-user-pool --user-pool-id \u003Cid> --output json\n  > \u002Ftmp\u002F\u003Cpool-name>-backup-$(date +%s).json`.\n- Execute the CLI with the full pool config.\n\n### Step 4: Post-verification\n\nAfter the operation finishes, run post-verification:\n\n1. `describe-user-pool --user-pool-id \u003Cid>` returns the expected pool\n   config (Schema, Policies, MfaConfiguration, UserPoolAddOns).\n2. `list-user-pool-clients --user-pool-id \u003Cid>` returns the expected\n   clients with correct ExplicitAuthFlows.\n3. For SMS MFA: `list-identity-providers` (no-op verification — IAM role\n   is exercised only at user sign-up time, but the role exists).\n4. For Lambda triggers: invoke the trigger manually with a synthetic\n   event to confirm the resource-based policy allows the pool to call.\n5. For custom domain: `describe-user-pool-domain --domain \u003Cdomain>`\n   returns status `CREATING`, then `ACTIVE` (verify DNS).\n\n## Common pool patterns (boilerplate)\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\n## STRICT output contract\n\n### Required output structure\n\nEvery response MUST begin with this block — no preamble, no conversational\nopening:\n\n```text\nPOOL: \u003Cpool-name>\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nTARGET: \u003Cpool-name> (pool-id: \u003Cid> for updates)\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. CONFIRM: About to \u003Coperation> pool \u003Cname> in account \u003Caccount> region \u003Cregion>. This will \u003Cconsequence>. Proceed? (yes\u002Fno)\n  2. \u003Cexact CLI command — no placeholders>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description>\n  - [FAIL] \u003Cverification description> — \u003Creason>\nATTRIBUTES: \u003Ccount> standard, \u003Ccount> custom\nMFA: OFF | TOTP-only | SMS-only | TOTP+SMS (config: ON|OPTIONAL)\nOAUTH_FLOWS: code | client-credentials | (blocked: implicit)\nIDPS: \u003Ccount> SAML, \u003Ccount> OIDC, \u003Ccount> social\nASF: ENFORCED | AUDIT | OFF\nNOTES: \u003Csecurity posture, MFA strategy, attribute schema caveats>\n```\n\n### FORBIDDEN output patterns\n\n- NEVER start with \"Let me analyze…\" or \"I'll create…\" — the VERDICT\n  block is the FIRST line, always. No conversational preamble.\n- NEVER use lowercase verdict values — emit `READY_TO_DEPLOY` or\n  `PREREQUISITES_MISSING` (not `ready`, `prerequisites`).\n- NEVER omit PRE_CHECKS — every pre-check run must appear with `[PASS]`\n  or `[FAIL]` and a specific reason for each failure. An empty\n  PRE_CHECKS block is non-compliant.\n- NEVER emit a plan with placeholder values (e.g., `\u003Cpool-id>`,\n  `\u003Caccount-id>`) in a READY_TO_DEPLOY plan — every field must be\n  populated with actual values from the input.\n- NEVER omit the CONFIRM gate as the first STEPS entry for any\n  state-changing operation.\n- NEVER claim success without verifying that the pool was created\n  (via `describe-user-pool`) — a partial CLI sequence with missing\n  required subcommands is non-compliant.\n- NEVER put-update a pool without snapshotting the existing config first\n  — updates to `LambdaConfig` and `MfaConfiguration` overwrite silently.\n- NEVER silently allow `implicit` OAuth flow — block it explicitly with\n  a [FAIL] pre-check row naming the security risk.\n\n### Perfect example output\n\n```text\nPOOL: prod-users\nVERDICT: READY_TO_DEPLOY\nTARGET: prod-users\nPRE_CHECKS:\n  - [PASS] Pool name unique (no collision in list-user-pools)\n  - [PASS] Password policy: 16 chars, all classes, 1-day temp\n  - [PASS] MFA: TOTP-only, no SMS role required\n  - [PASS] Username attributes: [\"email\"]\n  - [PASS] Custom attributes prefixed custom: (custom:tenantId)\n  - [PASS] DeletionProtection: ACTIVE\n  - [PASS] PreventUserExistenceErrors: ENABLED\n  - [PASS] AdvancedSecurityMode: ENFORCED\n  - [PASS] Account recovery: verified_email (priority 1)\n  - [PASS] IAM principal holds cognito-idp:CreateUserPool\nSTEPS:\n  1. CONFIRM: About to create-user-pool prod-users in account 111111111111 region us-east-1. This will CREATE a new user pool with TOTP MFA, 4 attributes, and ENFORCED ASF. Proceed? (yes\u002Fno)\n  2. aws cognito-idp create-user-pool --pool-name prod-users --policies '{...}' --mfa-configuration ON --enabled-mfas '[\"TOTP\"]' --username-attributes '[\"email\"]' --schema '[...]' --user-pool-add-ons 'AdvancedSecurityMode=ENFORCED' --deletion-protection ACTIVE --prevent-user-existence-errors ENABLED\n  3. aws cognito-idp create-user-pool-client --user-pool-id \u003Creturned-id> --client-name prod-web-spa --generate-client-secret --explicit-auth-flows ALLOW_USER_SRP_AUTH ALLOW_REFRESH_TOKEN_AUTH --allowed-o-auth-flows code --allowed-o-auth-scopes openid email profile --callback-urls '[\"https:\u002F\u002Fapp.example.com\u002Fcallback\"]' --logout-urls '[\"https:\u002F\u002Fapp.example.com\u002Flogout\"]' --access-token-validity 1 --id-token-validity 1 --token-validity-units '{\"AccessToken\":\"hours\",\"IdToken\":\"hours\"}' --refresh-token-validity 30 --enable-token-revocation --prevent-user-existence-errors ENABLED\nPOST_VERIFY:\n  - (pending execution)\n  - describe-user-pool returns the pool with MfaConfiguration=ON, AdvancedSecurityMode=ENFORCED\n  - list-user-pool-clients returns prod-web-spa with ExplicitAuthFlows=[ALLOW_USER_SRP_AUTH, ALLOW_REFRESH_TOKEN_AUTH]\nATTRIBUTES: 3 standard (email, given_name, family_name), 1 custom (custom:tenantId)\nMFA: TOTP-only (config: ON)\nOAUTH_FLOWS: code\nIDPS: 0 SAML, 0 OIDC, 0 social\nASF: ENFORCED\nNOTES:\n  - TOTP-only MFA avoids SNS SMS per-message cost — users enroll via authenticator app (Google Authenticator, Authy, 1Password).\n  - RefreshTokenValidity 30 days balances UX and security; reduce to 1 day for high-trust environments.\n  - Custom attribute custom:tenantId is immutable — set once at signup via pre-signup Lambda.\n  - Add the identity pool later if you need AWS credential vending to authenticated users (out of scope here).\n```\n\n## NEVER (top 5)\n\nThese are the highest-impact, most-frequent failure modes in Cognito\ndeployments. Violating any one of these is a security regression.\n\n1. **NEVER enable OAuth `implicit` flow.** Tokens are returned via the\n   URL fragment — leaks via browser history, Referer headers, and\n   proxy logs. Always use `code` grant with PKCE for SPA and mobile\n   clients. Block at pre-check; never silently rewrite.\n\n2. **NEVER enable `ALLOW_ADMIN_USER_PASSWORD_AUTH` on a public client.**\n   It bypasses SRP, exposes admin credentials to the client, and is\n   the #1 path to credential compromise. For confidential server-side\n   clients only, and only with documented justification. Block at\n   pre-check.\n\n3. **NEVER create a user pool without `DeletionProtection: ACTIVE`.**\n   Accidental pool deletion destroys user accounts with no recovery —\n   Cognito has no recycle bin. Active protection requires an explicit\n   `--deletion-protection INACTIVE` step before delete.\n\n4. **NEVER deploy SMS MFA without verifying the SNS caller role.**\n   The pool will deploy cleanly but every SMS-OTP sign-up will fail\n   with \"Invalid SMS role\" at the moment a user tries to enroll. Verify\n   the role exists, trusts `cognito-idp.amazonaws.com`, has\n   `sns:Publish`, and uses `ExternalId` for cross-account trust.\n\n5. **NEVER put a custom attribute in `RequiredAttributes` without\n   declaring it in `Schema`.** Cognito silently accepts but the\n   attribute is never written — signups fail at the moment of attribute\n   collection. Always declare in both arrays, prefixed with `custom:`.\n\n## Expert heuristic: choosing MFA strategy\n\nThe right MFA strategy is a function of user population, network, and\ncost tolerance — not a one-size-fits-all. The heuristic below resolves\nthe trade-off deterministically.\n\n```\nUser population \u002F environment\n   ├─ B2C consumer app (mobile\u002Fweb)?\n   │    ├─ TOTP only (Authenticator app)\n   │    │    Users install Google Authenticator once. No per-message\n   │    │    cost. Works offline. Best UX if app supports enrollment QR.\n   │    └─ SMS as backup only (OPTIONAL + both factors enabled)\n   │         SMS incurs $0.00645\u002Fmsg in the US, more internationally.\n   │         Use only when TOTP is impossible (low-tech user base).\n   │\n   ├─ B2B \u002F workforce?\n   │    └─ TOTP only. Strict ON policy. No SMS — corporate devices\n   │         support authenticators and SMS is exposed to SIM swap.\n   │\n   ├─ Regulated (PCI\u002FHIPAA\u002FGovernment)?\n   │    └─ TOTP ON + ASF ENFORCED. SMS not accepted by most auditors\n   │         as a second factor — SIM swap is a recognized attack.\n   │\n   └─ Development \u002F staging?\n        └─ MFA OFF acceptable if ASF ENFORCED for adaptive defense.\n             Production must still enforce TOTP ON. NEVER disable ASF.\n```\n\n**Decision rules:**\n- Default to TOTP-only. Add SMS only if (a) the user population cannot\n  install authenticators, OR (b) a documented regulation requires it.\n- Always pair MFA with ASF ENFORCED. MFA alone does not stop credential\n  stuffing — ASF detects the pattern.\n- SMS requires an SNS caller role with cross-account ExternalId. The\n  pre-check gate verifies this.\n- TOTP enrollment requires a per-user `SoftwareTokenMfaSettings` write\n  via `cognito-idp:associate-software-token` — outside the deploy scope\n  but flag in NOTES for the application team.\n\nALWAYS emit `AdvancedSecurityMode: ENFORCED` for production pools. AUDIT\nmode is acceptable only in staging for evaluating ASF false-positive\nrates before promoting to ENFORCED.\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## AWS documentation\n\n- **Amazon Cognito User Pools Developer Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-identity-pools.html\n- **User pool attributes** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fuser-pool-settings-attributes.html\n- **MFA in user pools** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fuser-pool-settings-mfa.html\n- **App client OAuth 2.0 flows** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-app-idp-settings.html\n- **SAML federation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-saml-idp.html\n- **OIDC federation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-oidc-idp.html\n- **Lambda triggers** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-identity-pools-working-with-aws-lambda-triggers.html\n- **Resource servers and custom scopes** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pools-define-resource-servers.html\n- **Advanced Security Features** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fcognito-user-pool-settings-advanced-security.html\n- **Managed Login Branding** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcognito\u002Flatest\u002Fdeveloperguide\u002Fmanaged-login-branding.html\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step-0 expert Cognito behaviors and 2024-2026 feature changes moved from SKILL.md\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — common pool \u002F client \u002F IdP \u002F domain \u002F trigger \u002F group CLI boilerplate moved from SKILL.md\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — live-account pre-flight command listing moved from SKILL.md\n- [references\u002Fpool-config-and-security-defaults.md](references\u002Fpool-config-and-security-defaults.md) — pool archetypes, app client procedure, token validity, verification commands\n- [references\u002Fidentity-providers-and-triggers.md](references\u002Fidentity-providers-and-triggers.md) — SAML\u002FOIDC\u002Fsocial IdP, Lambda trigger, and domain procedures\n\n## Domain\n\nAWS CloudOps \u002F Identity & Access Management — Cognito User Pool Provisioning.\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},"cognito, security, identity, mfa, oauth, saml, oidc, deploy, user-pool, hosted-ui","1","Jacky Chan — AWS Community Builder","aws-cloudops","Security","0.1.0","Cognito, user pool, identity provider, IdP, MFA, TOTP, SMS MFA, password policy, app client, OAuth, code flow, PKCE, client credentials, SAML, OIDC, social login, hosted UI, branding, Lambda triggers, pre-signup, post-confirmation, custom message, pre-token-generation, resource server, custom scopes, user pool groups, custom domain, advanced security features, ASF, cognito-idp","deploy","high","false","capability","Creating a new Cognito user pool, configuring an OAuth app client, federating with SAML\u002FOIDC\u002Fsocial identity providers, setting up hosted UI branding, wiring Lambda triggers (pre-signup, post- confirmation, custom message, pre-token-generation), enabling advanced security features (ASF ENFORCED), or registering a custom domain for the hosted UI.","aws-orchestrator","true","READY_TO_DEPLOY | PREREQUISITES_MISSING","active","Input: either (a) a user pool deployment intent (create, update) with target pool name, attribute schema, password policy, MFA mode, app client OAuth config, identity providers, Lambda triggers, resource servers, groups, and domain; OR (b) a user pool id for live-account update or validation. Output: deterministic POOL\u002FVERDICT\u002FPRE_CHECKS\u002F STEPS\u002FPOST_VERIFY block per operation, where VERDICT is one of READY_TO_DEPLOY, PREREQUISITES_MISSING.","create Cognito user pool, provision user pool, deploy Cognito, OAuth app client, code flow with PKCE, client credentials grant, SAML federation, OIDC identity provider, social login, hosted UI, Cognito branding, pre-signup trigger, post-confirmation trigger, custom message trigger, pre-token-generation trigger, resource server custom scopes, user pool groups, custom domain Cognito, advanced security features, cognito-idp create-user-pool","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 cognito-idp create-user-pool, create-user-pool-client, create-identity-provider, create-resource-server, create-group, create-user-pool-domain, update-user-pool, describe-user-pool (AWS CLI v2, SSO or key-based credentials).","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fcognito-user-pool-deployer",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 cognito-user-pool-deployer",{"tool":58,"command":59},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill cognito-user-pool-deployer",{"tool":61,"command":62},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill cognito-user-pool-deployer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002FSKILL.md",true,[66,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",10008,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Feval\u002Ftest-cases.yaml",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fbaselines\u002Fdeploy-app-client-client-credentials-ready.md",521,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fbaselines\u002Fdeploy-app-client-client-credentials-ready.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fbaselines\u002Fdeploy-standard-user-pool-ready.md",809,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fbaselines\u002Fdeploy-standard-user-pool-ready.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"evals\u002Fbaselines\u002Fdeploy-user-pool-implicit-flow-blocked.md",742,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fbaselines\u002Fdeploy-user-pool-implicit-flow-blocked.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"evals\u002Fbaselines\u002Fdeploy-user-pool-sms-mfa-missing-sns-role.md",580,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fbaselines\u002Fdeploy-user-pool-sms-mfa-missing-sns-role.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"evals\u002Fbaselines\u002Fdeploy-user-pool-with-saml-idp-ready.md",630,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fbaselines\u002Fdeploy-user-pool-with-saml-idp-ready.md",{"path":93,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":94,"sourceHtmlUrl":95},"evals\u002Feval_config.yaml",2075,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Feval_config.yaml",{"path":97,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":98,"sourceHtmlUrl":99},"evals\u002Fevals.json",4937,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fevals.json",{"path":101,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":102,"sourceHtmlUrl":103},"evals\u002Fprompts\u002Fdeploy-app-client-client-credentials-ready.md",1134,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fprompts\u002Fdeploy-app-client-client-credentials-ready.md",{"path":105,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":106,"sourceHtmlUrl":107},"evals\u002Fprompts\u002Fdeploy-standard-user-pool-ready.md",1349,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fprompts\u002Fdeploy-standard-user-pool-ready.md",{"path":109,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":110,"sourceHtmlUrl":111},"evals\u002Fprompts\u002Fdeploy-user-pool-implicit-flow-blocked.md",939,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fprompts\u002Fdeploy-user-pool-implicit-flow-blocked.md",{"path":113,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":114,"sourceHtmlUrl":115},"evals\u002Fprompts\u002Fdeploy-user-pool-sms-mfa-missing-sns-role.md",925,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fprompts\u002Fdeploy-user-pool-sms-mfa-missing-sns-role.md",{"path":117,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":118,"sourceHtmlUrl":119},"evals\u002Fprompts\u002Fdeploy-user-pool-with-saml-idp-ready.md",1312,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fevals\u002Fprompts\u002Fdeploy-user-pool-with-saml-idp-ready.md",{"path":121,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":122,"sourceHtmlUrl":123},"examples\u002FREADME.md",9711,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fexamples\u002FREADME.md",{"path":125,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fadvanced-patterns.md",5949,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Freferences\u002Fadvanced-patterns.md",{"path":129,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fdiagnostic-commands.md",1331,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Freferences\u002Fdiagnostic-commands.md",{"path":133,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Fidentity-providers-and-triggers.md",7518,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Freferences\u002Fidentity-providers-and-triggers.md",{"path":137,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fpool-config-and-security-defaults.md",5295,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Freferences\u002Fpool-config-and-security-defaults.md",{"path":141,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Fworked-examples.md",5358,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Freferences\u002Fworked-examples.md",{"path":145,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":146,"sourceHtmlUrl":147},"skill.usf.yaml",4659,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcognito-user-pool-deployer\u002Fskill.usf.yaml",[149,156,163,170,177,184],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"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":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"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":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"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":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"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":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"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":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":190,"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",[],[]]