[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D7VJ4M67E910B6JDMAQV7B":3,"skill-same:01M7D7VJ4M67E910B6JDMAQV7B":89},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D7VJ4M67E910B6JDMAQV7B","iam-helper-for-privileged-access-management",null,"Manages the end-to-end lifecycle of on-demand, temporary access using Privileged Access Manager (PAM). Use when a user asks to create, read, update, or delete PAM entitlements, request temporary access, or approve\u002Fdeny pending PAM grants. Do NOT use for permanent IAM policy bindings, troubleshooting IAM permission errors, or general Google Cloud resource provisioning.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: iam-helper-for-privileged-access-management\nmetadata:\n  version: 1.0.1\n  category: Security\ndescription: Manages the end-to-end lifecycle of on-demand, temporary access using\n  Privileged Access Manager (PAM). Use when a user asks to create, read, update, or\n  delete PAM entitlements, request temporary access, or approve\u002Fdeny pending PAM grants.\n  Do NOT use for permanent IAM policy bindings, troubleshooting IAM permission errors,\n  or general Google Cloud resource provisioning.\n---\n\n# Privileged Access Manager (PAM)\n\nThis skill provides step-by-step guidance for planning, validating, and\nexecuting Privileged Access Manager (PAM) entitlement CRUD operations, approval\nworkflow configurations, access elevations, and grant approval\u002Fdenial workflows.\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read and follow the instructions in\n[Usage Attribution](references\u002Fattribution.md).\n\n## Table of Contents\n\n*   [Core Concepts](#core-concepts)\n*   [Approval Workflows & Max Request Duration](#approval-workflows)\n*   [Safety & Confirmation Strategy](#safety-confirmation)\n*   [Plan-Validate-Execute Pattern](#plan-validate-execute)\n*   [Mode 1: Interactive Access Elevation](#mode-1)\n*   [Mode 2: Standalone Entitlement CRUD](#mode-2)\n*   [Mode 3: Approver Workflow](#mode-3)\n*   [Supporting Links & Resources](#supporting-links)\n\n## Core Concepts {#core-concepts}\n\nPrivileged Access Manager (PAM) replaces permanent or ambient IAM role\nassignments with on-demand, time-bound, and audited access elevations. Rather than\nappending permanent IAM policy bindings, PAM uses:\n\n*   **Entitlements:** Configurations defining access scopes, eligible\n    requesters, and approvers.\n*   **Grants:** Short-lived requests created against entitlements to activate\n    the entitlement's IAM roles.\n\n### Privileged Access (`privilegedAccess`)\n\nThe `privilegedAccess` block in an entitlement defines the precise access scope that will be granted. An access scope comprises three essential components:\n*   **Resource:** The target Google Cloud resource (Project, Folder, or Organization) where access is granted.\n*   **Role Setup:** The IAM role (`roleBindings.role`) to be assigned.\n*   **Condition:** (Optional) An IAM condition expression (`roleBindings.conditionExpression`) restricting when or where the role applies.\n\n### Core Workflow\n\n1.  Administrators create Entitlements.\n2.  Requesters can then request Grants against these entitlements.\n3.  If the entitlement is configured with approvals, then an approver must\n    approve the requested grant.\n4.  Once all necessary approval steps are completed, the grant is activated for\n    the requested time.\n5.  The grant automatically ends after the requested duration has elapsed, and\n    the elevated access is removed.\n\n## Approval Workflows & Max Request Duration {#approval-workflows}\n\n### Approval Workflows (`approvalWorkflow`)\n\nWhen sensitive environments require human approval before temporary access is\nactivated, configure the `approvalWorkflow` block in the entitlement YAML\nmanifest (`entitlement.yaml`).\n\n```yaml\napprovalWorkflow:\n  manualApprovals:\n    # Optional: requires approver to supply a justification string\n    requireApproverJustification: true\n    steps:\n    - approvalsNeeded: 1\n      approverEmailRecipients:\n      - approver@example.com\n      approvers:\n      - principals:\n        - user:db-lead@my-company.com  # or group:sre-leads@my-company.com\n```\n\n*   **When to include:** Include `approvalWorkflow` whenever the user prompt\n    specifies that manual approval or an approver (user or group) is required.\n*   **Outcome:** When a user requests a grant against an entitlement\n    with `approvalWorkflow`, the grant transitions to `APPROVAL_AWAITED`.\n    Requesters must await an Approver's decision (`Mode 3`).\n\n### Max Request Duration (`maxRequestDuration`)\n\n`maxRequestDuration` defines the maximum single access elevation timeframe a requester\nmay ask for when placing a grant request.\n\n*   **Flexible Configuration:** Configure `maxRequestDuration` according to the\n    user's specific request (e.g. `8 hours` \u002F `28800s`, `1 hour` \u002F `3600s`, `24\n    hours` \u002F `86400s`).\n*   **Default Value:** If the user does NOT specify a maximum request duration,\n    default to `4 hours` (`14400s`).\n*   **YAML Syntax:** Always format `maxRequestDuration` as a string in seconds\n    in the entitlement YAML (e.g., `\"14400s\"`, `\"28800s\"`).\n\n## Safety & Confirmation Strategy {#safety-confirmation}\n\nAdhere strictly to these workflow guards:\n\n*   **Modifying \u002F Destructive Executions (Create, Update, Delete, Approve, Deny, Revoke):** Always\n    present a plain-text summary of the planned adjustments and prompt the user\n    for explicit confirmation (Yes\u002FNo).\n*   **Read-Only Inspections (List, Describe, Search):** Run autonomously without\n    requesting confirmation.\n*   **Batching Bash Commands (Reduce User Confirmations):** The host environment\n    requires user approval for every individual shell tool call. To minimize\n    confirmation popups, combine sequential read-only and lookup commands into a\n    single compound bash script within one tool call (e.g., combining project,\n    folder, and organization hierarchy audits into a single multiline\n    execution).\n*   **Anti-Loop Strategy:** If a command fails with a clear, actionable error,\n    you may attempt to self-debug and retry. If the error is ambiguous, halt\n    immediately, present the stderr output, and await user direction.\n\n## Plan-Validate-Execute Pattern {#plan-validate-execute}\n\nFor all modifying actions (Mode 1 Step 3, Mode 2 Create, Update, Delete, Mode 3 Approve, Deny):\n\n1.  **Plan:** Construct the proposed parameters or read the sample entitlement\n    structure. (For entitlement creation, load and use the template:\n    [assets\u002Fentitlement_template.yaml](assets\u002Fentitlement_template.yaml)).\n2.  **Validate:** Inspect the target configuration parameters (resource names,\n    role bindings, duration limits) for compliance with corporate rules.\n3.  **Execute:** Present the validated plan, obtain explicit user confirmation,\n    and run the `gcloud` command.\n\n--------------------------------------------------------------------------------\n\n## Mode 1: Interactive Access Elevation {#mode-1}\n\nWhen the user requests temporary access elevation as a Requester, load and\nfollow the detailed instructions in\n[`references\u002Frequester.md`](references\u002Frequester.md).\n\n--------------------------------------------------------------------------------\n\n## Mode 2: Standalone Entitlement CRUD {#mode-2}\n\nFollow these steps for entitlement configurations.\n\n### Required Permissions for Entitlement Admins\n\n*   `roles\u002Fprivilegedaccessmanager.admin`: Required to create, update, and\n    delete entitlement configurations (`Mode 1 Step 3` and `Mode 2 CRUD`).\n*   **Scope IAM Admin Rights:** Required on the target hierarchy scope because\n    creating an entitlement authorizes future role evaluations and bindings on\n    that scope:\n    *   **Organizations:** `roles\u002Fiam.securityAdmin`\n    *   **Folders:** `roles\u002Fresourcemanager.folderAdmin`\n    *   **Projects:** `roles\u002Fresourcemanager.projectIamAdmin`\n*   `roles\u002Fprivilegedaccessmanager.viewer`: Required to list and describe\n    entitlements across scopes.\n\n*(Rule: For all Standalone Entitlement CRUD commands below, use the flag\nmatching where the entitlement is defined: pass `--project=PROJECT_ID`,\n`--folder=FOLDER_ID`, or `--organization=ORGANIZATION_ID`).*\n\n### 1. Create Entitlement\n\n1.  Check if `ENTITLEMENT_ID` exists:\n\n```bash\ngcloud pam entitlements describe ENTITLEMENT_ID \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\n*   **If Exists:** Halt. Ask: *\"The requested PAM Entitlement `ENTITLEMENT_ID`\n    already exists. Would you like to view its details or update it instead?\n    (View \u002F Update \u002F Exit)\"*\n*   **If NOT_FOUND:** Load the template\n    [assets\u002Fentitlement_template.yaml](assets\u002Fentitlement_template.yaml).\n    Generate IDs in lowercase using hyphen separators derived from the role name\n    (e.g., `compute-admin` for `roles\u002Fcompute.admin`). **Note:**\n    *   You may specify multiple IAM roles under `roleBindings`.\n    *   You may also include an optional IAM `conditionExpression` for each role binding.\n    *   Legacy basic roles (e.g., `roles\u002Fviewer`, `roles\u002Feditor`, `roles\u002Fowner`) are NOT supported. Instead, use their v2 basic role equivalents (e.g., `roles\u002Fbasic.viewer`, `roles\u002Fbasic.editor`, `roles\u002Fbasic.owner`). Ensure you select a valid predefined, custom, or v2 basic role.\n*   Set `maxRequestDuration` based on user specification (e.g. `\"28800s\"` for 8\n    hours, `\"3600s\"` for 1 hour). If unspecified by the user, default to\n    `\"14400s\"` (4 hours). If manual approval is specified by policy or requested\n    by the user, configure the `approvalWorkflow` block in `entitlement.yaml`.\n    Preserve `requesterJustificationConfig: {unstructured: {}}`.\n*   Prompt: *\"You are about to create the PAM Entitlement `ENTITLEMENT_ID`. Do\n    you approve this creation? (Yes\u002FNo)\"*\n*   Deploy:\n\n```bash\ngcloud pam entitlements create ENTITLEMENT_ID \\\n    --location=global \\\n    --entitlement-file=entitlement.yaml \\\n    --project=PROJECT_ID\n```\n\n### 2. Read Entitlements\n\nRun these read operations autonomously:\n\nList all entitlements at a single scope:\n\n```bash\ngcloud pam entitlements list \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\nTo list all entitlements defined across the entire resource hierarchy (project, ancestor folders, and organization), use the hierarchy listing script:\n\n```bash\nbash scripts\u002Flist_entitlements_hierarchy.sh --project=PROJECT_ID\n```\n*(Or pass `--folder=FOLDER_ID` or `--organization=ORGANIZATION_ID`).*\n\nDescribe target entitlement:\n\n```bash\ngcloud pam entitlements describe ENTITLEMENT_ID \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\n### 3. Update Entitlement\n\n1.  Run the `export` command to generate the current config (which includes the `etag`):\n\n    ```bash\n    gcloud pam entitlements export ENTITLEMENT_ID \\\n        --location=global \\\n        --project=PROJECT_ID > {scratch}\u002Fupdated_entitlement.yaml\n    ```\n\n    If missing, offer to run `list` or exit.\n\n2.  Edit the exported `{scratch}\u002Fupdated_entitlement.yaml` file to apply the requested changes (e.g., updating\n    `maxRequestDuration`, `approvalWorkflow`, or `eligibleUsers`). Do not alter the `etag`.\n\n3.  Prompt: *\"You are about to update the PAM Entitlement `ENTITLEMENT_ID`. Do\n    you approve this update? (Yes\u002FNo)\"*\n\n4.  Execute:\n\n```bash\ngcloud pam entitlements update ENTITLEMENT_ID \\\n    --location=global \\\n    --entitlement-file={scratch}\u002Fupdated_entitlement.yaml \\\n    --project=PROJECT_ID\n```\n\n### 4. Delete Entitlement\n\n1.  Verify existence using `describe`. If missing, offer list\u002Fexit.\n2.  **Safety Check:** An entitlement cannot be deleted if there are open grants.\n    Before deleting, search for any `ACTIVE` or `SCHEDULED` grants:\n\n    ```bash\n    gcloud pam grants list \\\n        --entitlement=ENTITLEMENT_ID \\\n        --location=global \\\n        --project=PROJECT_ID \\\n        --filter=\"state:(ACTIVE, SCHEDULED)\"\n    ```\n\n    If any open grants are found, prompt the user for permission to revoke them: *\"There are active or scheduled grants on this entitlement. Do you authorize me to revoke them so the entitlement can be deleted? (Yes\u002FNo)\"*\n\n    If Yes, revoke them:\n\n    ```bash\n    gcloud pam grants revoke GRANT_ID \\\n        --entitlement=ENTITLEMENT_ID \\\n        --location=global \\\n        --project=PROJECT_ID \\\n        --reason=\"Revoking to delete entitlement\"\n    ```\n\n3.  Prompt: *\"You are about to permanently delete the PAM Entitlement\n    `ENTITLEMENT_ID`. Do you approve this deletion? (Yes\u002FNo)\"*\n\n4.  Execute:\n\n```bash\ngcloud pam entitlements delete ENTITLEMENT_ID \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\n--------------------------------------------------------------------------------\n\n## Mode 3: Approver Workflow {#mode-3}\n\nWhen an Approver needs to review, approve, or reject pending grant requests,\nload and follow the detailed instructions in\n[`references\u002Fapprover.md`](references\u002Fapprover.md).\n\n--------------------------------------------------------------------------------\n\n## Supporting Links & Resources {#supporting-links}\n\nFor further information on working with Privileged Access Manager, refer to:\n\n*   [Google Cloud Privileged Access Manager Overview][pam-overview]\n*   [Setting up PAM Entitlements][pam-create]\n*   [Requesting and auditing PAM Grants][pam-grants]\n*   [gcloud SDK pam Reference Guide][pam-gcloud]\n\n[pam-overview]: https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fpam-overview\n[pam-create]: https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fpam-create-entitlements\n[pam-grants]: https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fpam-request-temporary-elevated-access\n[pam-gcloud]: https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fgcloud\u002Freference\u002Fpam\n","# Privileged Access Manager (PAM)\n\nThis skill provides step-by-step guidance for planning, validating, and\nexecuting Privileged Access Manager (PAM) entitlement CRUD operations, approval\nworkflow configurations, access elevations, and grant approval\u002Fdenial workflows.\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read and follow the instructions in\n[Usage Attribution](references\u002Fattribution.md).\n\n## Table of Contents\n\n*   [Core Concepts](#core-concepts)\n*   [Approval Workflows & Max Request Duration](#approval-workflows)\n*   [Safety & Confirmation Strategy](#safety-confirmation)\n*   [Plan-Validate-Execute Pattern](#plan-validate-execute)\n*   [Mode 1: Interactive Access Elevation](#mode-1)\n*   [Mode 2: Standalone Entitlement CRUD](#mode-2)\n*   [Mode 3: Approver Workflow](#mode-3)\n*   [Supporting Links & Resources](#supporting-links)\n\n## Core Concepts {#core-concepts}\n\nPrivileged Access Manager (PAM) replaces permanent or ambient IAM role\nassignments with on-demand, time-bound, and audited access elevations. Rather than\nappending permanent IAM policy bindings, PAM uses:\n\n*   **Entitlements:** Configurations defining access scopes, eligible\n    requesters, and approvers.\n*   **Grants:** Short-lived requests created against entitlements to activate\n    the entitlement's IAM roles.\n\n### Privileged Access (`privilegedAccess`)\n\nThe `privilegedAccess` block in an entitlement defines the precise access scope that will be granted. An access scope comprises three essential components:\n*   **Resource:** The target Google Cloud resource (Project, Folder, or Organization) where access is granted.\n*   **Role Setup:** The IAM role (`roleBindings.role`) to be assigned.\n*   **Condition:** (Optional) An IAM condition expression (`roleBindings.conditionExpression`) restricting when or where the role applies.\n\n### Core Workflow\n\n1.  Administrators create Entitlements.\n2.  Requesters can then request Grants against these entitlements.\n3.  If the entitlement is configured with approvals, then an approver must\n    approve the requested grant.\n4.  Once all necessary approval steps are completed, the grant is activated for\n    the requested time.\n5.  The grant automatically ends after the requested duration has elapsed, and\n    the elevated access is removed.\n\n## Approval Workflows & Max Request Duration {#approval-workflows}\n\n### Approval Workflows (`approvalWorkflow`)\n\nWhen sensitive environments require human approval before temporary access is\nactivated, configure the `approvalWorkflow` block in the entitlement YAML\nmanifest (`entitlement.yaml`).\n\n```yaml\napprovalWorkflow:\n  manualApprovals:\n    # Optional: requires approver to supply a justification string\n    requireApproverJustification: true\n    steps:\n    - approvalsNeeded: 1\n      approverEmailRecipients:\n      - approver@example.com\n      approvers:\n      - principals:\n        - user:db-lead@my-company.com  # or group:sre-leads@my-company.com\n```\n\n*   **When to include:** Include `approvalWorkflow` whenever the user prompt\n    specifies that manual approval or an approver (user or group) is required.\n*   **Outcome:** When a user requests a grant against an entitlement\n    with `approvalWorkflow`, the grant transitions to `APPROVAL_AWAITED`.\n    Requesters must await an Approver's decision (`Mode 3`).\n\n### Max Request Duration (`maxRequestDuration`)\n\n`maxRequestDuration` defines the maximum single access elevation timeframe a requester\nmay ask for when placing a grant request.\n\n*   **Flexible Configuration:** Configure `maxRequestDuration` according to the\n    user's specific request (e.g. `8 hours` \u002F `28800s`, `1 hour` \u002F `3600s`, `24\n    hours` \u002F `86400s`).\n*   **Default Value:** If the user does NOT specify a maximum request duration,\n    default to `4 hours` (`14400s`).\n*   **YAML Syntax:** Always format `maxRequestDuration` as a string in seconds\n    in the entitlement YAML (e.g., `\"14400s\"`, `\"28800s\"`).\n\n## Safety & Confirmation Strategy {#safety-confirmation}\n\nAdhere strictly to these workflow guards:\n\n*   **Modifying \u002F Destructive Executions (Create, Update, Delete, Approve, Deny, Revoke):** Always\n    present a plain-text summary of the planned adjustments and prompt the user\n    for explicit confirmation (Yes\u002FNo).\n*   **Read-Only Inspections (List, Describe, Search):** Run autonomously without\n    requesting confirmation.\n*   **Batching Bash Commands (Reduce User Confirmations):** The host environment\n    requires user approval for every individual shell tool call. To minimize\n    confirmation popups, combine sequential read-only and lookup commands into a\n    single compound bash script within one tool call (e.g., combining project,\n    folder, and organization hierarchy audits into a single multiline\n    execution).\n*   **Anti-Loop Strategy:** If a command fails with a clear, actionable error,\n    you may attempt to self-debug and retry. If the error is ambiguous, halt\n    immediately, present the stderr output, and await user direction.\n\n## Plan-Validate-Execute Pattern {#plan-validate-execute}\n\nFor all modifying actions (Mode 1 Step 3, Mode 2 Create, Update, Delete, Mode 3 Approve, Deny):\n\n1.  **Plan:** Construct the proposed parameters or read the sample entitlement\n    structure. (For entitlement creation, load and use the template:\n    [assets\u002Fentitlement_template.yaml](assets\u002Fentitlement_template.yaml)).\n2.  **Validate:** Inspect the target configuration parameters (resource names,\n    role bindings, duration limits) for compliance with corporate rules.\n3.  **Execute:** Present the validated plan, obtain explicit user confirmation,\n    and run the `gcloud` command.\n\n--------------------------------------------------------------------------------\n\n## Mode 1: Interactive Access Elevation {#mode-1}\n\nWhen the user requests temporary access elevation as a Requester, load and\nfollow the detailed instructions in\n[`references\u002Frequester.md`](references\u002Frequester.md).\n\n--------------------------------------------------------------------------------\n\n## Mode 2: Standalone Entitlement CRUD {#mode-2}\n\nFollow these steps for entitlement configurations.\n\n### Required Permissions for Entitlement Admins\n\n*   `roles\u002Fprivilegedaccessmanager.admin`: Required to create, update, and\n    delete entitlement configurations (`Mode 1 Step 3` and `Mode 2 CRUD`).\n*   **Scope IAM Admin Rights:** Required on the target hierarchy scope because\n    creating an entitlement authorizes future role evaluations and bindings on\n    that scope:\n    *   **Organizations:** `roles\u002Fiam.securityAdmin`\n    *   **Folders:** `roles\u002Fresourcemanager.folderAdmin`\n    *   **Projects:** `roles\u002Fresourcemanager.projectIamAdmin`\n*   `roles\u002Fprivilegedaccessmanager.viewer`: Required to list and describe\n    entitlements across scopes.\n\n*(Rule: For all Standalone Entitlement CRUD commands below, use the flag\nmatching where the entitlement is defined: pass `--project=PROJECT_ID`,\n`--folder=FOLDER_ID`, or `--organization=ORGANIZATION_ID`).*\n\n### 1. Create Entitlement\n\n1.  Check if `ENTITLEMENT_ID` exists:\n\n```bash\ngcloud pam entitlements describe ENTITLEMENT_ID \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\n*   **If Exists:** Halt. Ask: *\"The requested PAM Entitlement `ENTITLEMENT_ID`\n    already exists. Would you like to view its details or update it instead?\n    (View \u002F Update \u002F Exit)\"*\n*   **If NOT_FOUND:** Load the template\n    [assets\u002Fentitlement_template.yaml](assets\u002Fentitlement_template.yaml).\n    Generate IDs in lowercase using hyphen separators derived from the role name\n    (e.g., `compute-admin` for `roles\u002Fcompute.admin`). **Note:**\n    *   You may specify multiple IAM roles under `roleBindings`.\n    *   You may also include an optional IAM `conditionExpression` for each role binding.\n    *   Legacy basic roles (e.g., `roles\u002Fviewer`, `roles\u002Feditor`, `roles\u002Fowner`) are NOT supported. Instead, use their v2 basic role equivalents (e.g., `roles\u002Fbasic.viewer`, `roles\u002Fbasic.editor`, `roles\u002Fbasic.owner`). Ensure you select a valid predefined, custom, or v2 basic role.\n*   Set `maxRequestDuration` based on user specification (e.g. `\"28800s\"` for 8\n    hours, `\"3600s\"` for 1 hour). If unspecified by the user, default to\n    `\"14400s\"` (4 hours). If manual approval is specified by policy or requested\n    by the user, configure the `approvalWorkflow` block in `entitlement.yaml`.\n    Preserve `requesterJustificationConfig: {unstructured: {}}`.\n*   Prompt: *\"You are about to create the PAM Entitlement `ENTITLEMENT_ID`. Do\n    you approve this creation? (Yes\u002FNo)\"*\n*   Deploy:\n\n```bash\ngcloud pam entitlements create ENTITLEMENT_ID \\\n    --location=global \\\n    --entitlement-file=entitlement.yaml \\\n    --project=PROJECT_ID\n```\n\n### 2. Read Entitlements\n\nRun these read operations autonomously:\n\nList all entitlements at a single scope:\n\n```bash\ngcloud pam entitlements list \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\nTo list all entitlements defined across the entire resource hierarchy (project, ancestor folders, and organization), use the hierarchy listing script:\n\n```bash\nbash scripts\u002Flist_entitlements_hierarchy.sh --project=PROJECT_ID\n```\n*(Or pass `--folder=FOLDER_ID` or `--organization=ORGANIZATION_ID`).*\n\nDescribe target entitlement:\n\n```bash\ngcloud pam entitlements describe ENTITLEMENT_ID \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\n### 3. Update Entitlement\n\n1.  Run the `export` command to generate the current config (which includes the `etag`):\n\n    ```bash\n    gcloud pam entitlements export ENTITLEMENT_ID \\\n        --location=global \\\n        --project=PROJECT_ID > {scratch}\u002Fupdated_entitlement.yaml\n    ```\n\n    If missing, offer to run `list` or exit.\n\n2.  Edit the exported `{scratch}\u002Fupdated_entitlement.yaml` file to apply the requested changes (e.g., updating\n    `maxRequestDuration`, `approvalWorkflow`, or `eligibleUsers`). Do not alter the `etag`.\n\n3.  Prompt: *\"You are about to update the PAM Entitlement `ENTITLEMENT_ID`. Do\n    you approve this update? (Yes\u002FNo)\"*\n\n4.  Execute:\n\n```bash\ngcloud pam entitlements update ENTITLEMENT_ID \\\n    --location=global \\\n    --entitlement-file={scratch}\u002Fupdated_entitlement.yaml \\\n    --project=PROJECT_ID\n```\n\n### 4. Delete Entitlement\n\n1.  Verify existence using `describe`. If missing, offer list\u002Fexit.\n2.  **Safety Check:** An entitlement cannot be deleted if there are open grants.\n    Before deleting, search for any `ACTIVE` or `SCHEDULED` grants:\n\n    ```bash\n    gcloud pam grants list \\\n        --entitlement=ENTITLEMENT_ID \\\n        --location=global \\\n        --project=PROJECT_ID \\\n        --filter=\"state:(ACTIVE, SCHEDULED)\"\n    ```\n\n    If any open grants are found, prompt the user for permission to revoke them: *\"There are active or scheduled grants on this entitlement. Do you authorize me to revoke them so the entitlement can be deleted? (Yes\u002FNo)\"*\n\n    If Yes, revoke them:\n\n    ```bash\n    gcloud pam grants revoke GRANT_ID \\\n        --entitlement=ENTITLEMENT_ID \\\n        --location=global \\\n        --project=PROJECT_ID \\\n        --reason=\"Revoking to delete entitlement\"\n    ```\n\n3.  Prompt: *\"You are about to permanently delete the PAM Entitlement\n    `ENTITLEMENT_ID`. Do you approve this deletion? (Yes\u002FNo)\"*\n\n4.  Execute:\n\n```bash\ngcloud pam entitlements delete ENTITLEMENT_ID \\\n    --location=global \\\n    --project=PROJECT_ID\n```\n\n--------------------------------------------------------------------------------\n\n## Mode 3: Approver Workflow {#mode-3}\n\nWhen an Approver needs to review, approve, or reject pending grant requests,\nload and follow the detailed instructions in\n[`references\u002Fapprover.md`](references\u002Fapprover.md).\n\n--------------------------------------------------------------------------------\n\n## Supporting Links & Resources {#supporting-links}\n\nFor further information on working with Privileged Access Manager, refer to:\n\n*   [Google Cloud Privileged Access Manager Overview][pam-overview]\n*   [Setting up PAM Entitlements][pam-create]\n*   [Requesting and auditing PAM Grants][pam-grants]\n*   [gcloud SDK pam Reference Guide][pam-gcloud]\n\n[pam-overview]: https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fpam-overview\n[pam-create]: https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fpam-create-entitlements\n[pam-grants]: https:\u002F\u002Fcloud.google.com\u002Fiam\u002Fdocs\u002Fpam-request-temporary-elevated-access\n[pam-gcloud]: https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fgcloud\u002Freference\u002Fpam\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.1","Security","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill iam-helper-for-privileged-access-management",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill iam-helper-for-privileged-access-management",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill iam-helper-for-privileged-access-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002FSKILL.md",true,[51,57,63,67,71,75,79,85],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Fentitlement_template.yaml","ASSET","资产文件",1194,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002Fassets\u002Fentitlement_template.yaml",{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"INSTALL-SOURCE.json","REFERENCE","参考文档",589,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002FINSTALL-SOURCE.json",{"path":64,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":68,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fapprover.md",3198,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002Freferences\u002Fapprover.md",{"path":72,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fattribution.md",1977,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002Freferences\u002Fattribution.md",{"path":76,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Frequester.md",5998,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002Freferences\u002Frequester.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Flist_entitlements_hierarchy.sh","SCRIPT","脚本",2920,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002Fscripts\u002Flist_entitlements_hierarchy.sh",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Fsearch_eligible_entitlements.sh",3034,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fiam-helper-for-privileged-access-management\u002Fscripts\u002Fsearch_eligible_entitlements.sh",[90,98,107,115,123,131],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":102,"licenseFileUrl":135,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]