[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D69FYN1ZZVN918P63DD4BE":3,"skill-same:01M7D69FYN1ZZVN918P63DD4BE":101},{"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},"01M7D69FYN1ZZVN918P63DD4BE","cloud-monitoring-notification-channels-configuration",null,"Generates Terraform HCL configurations for Cloud Monitoring notification channels (`google_monitoring_notification_channel`) and adds notification channels to alerting policies (`google_monitoring_alert_policy`) in Google Cloud projects. Use when creating or configuring email, SMS, Slack, PagerDuty, Pub\u002FSub, or webhook notification channels, verifying Pub\u002FSub topic compatibility (including cross-project topics, message storage policies, and in-transit enforcement) and publishing permissions for the Cloud Monitoring Service Agent, or adding notification channels to existing alert policies. Don't use for authoring or editing alerting policy conditions, selecting metric descriptors, or writing PromQL or Monitoring Filter queries.","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\u002Fcloud-monitoring-notification-channels-configuration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloud-monitoring-notification-channels-configuration\nmetadata:\n  version: 1.0.2\n  category: CloudObservabilityAndMonitoring\ndescription: Generates Terraform HCL configurations for Cloud Monitoring notification\n  channels (`google_monitoring_notification_channel`) and adds notification channels\n  to alerting policies (`google_monitoring_alert_policy`) in Google Cloud projects.\n  Use when creating or configuring email, SMS, Slack, PagerDuty, Pub\u002FSub, or webhook\n  notification channels, verifying Pub\u002FSub topic compatibility (including cross-project\n  topics, message storage policies, and in-transit enforcement) and publishing permissions\n  for the Cloud Monitoring Service Agent, or adding notification channels to existing\n  alert policies. Don't use for authoring or editing alerting policy conditions, selecting\n  metric descriptors, or writing PromQL or Monitoring Filter queries.\n---\n\n# Cloud Monitoring Notification Channels Configuration\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\"`\nand append `agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)` to `User-Agent` headers.\n\n## Context Provided\n\n*   **Terraform Only**: Write the generated observability configuration ONLY as\n    Terraform (`.tf`) files (e.g., `notification_channels.tf`).\n    -   Install Terraform **ONLY** if you are asked to deploy the channels AND\n        there is no valid Terraform installation.\n    -   If you are **NOT** asked to deploy the channels, **DO NOT** install\n        Terraform.\n*   **Working Directory Inference**: Determine the target path for `.tf` files\n    using the following order:\n    1.  If the user provides a path, use that exact path for the `.tf` file.\n    2.  If a path is not provided, search the workspace for existing `.tf` files\n        (preferring files that already define\n        `google_monitoring_notification_channel` or\n        `google_monitoring_alert_policy` resources, or existing directories in\n        the strict preference order: `monitoring\u002F`, then `ops\u002F`, then `sre\u002F`).\n        If found, write `notification_channels.tf` in that directory (or update\n        the existing `.tf` file when modifying an existing resource).\n    3.  If a path is not provided and no `.tf` files or target directories exist\n        in the workspace, create and write to\n        `monitoring\u002Fnotification_channels.tf`.\n*   **Google Cloud Prerequisites**: When running `gcloud` CLI discovery commands\n    or deploying configurations with the `terraform` CLI against a Google Cloud\n    project, ensure the following prerequisites are met in order (do not execute\n    these commands if the user only asks to generate or print Terraform HCL):\n    1.  **Target Project ID & Project Number**:\n        *   Identify the target Google Cloud `{project_id}` from the user's\n            request or via `gcloud config get-value project`. If neither is\n            available, prompt the user to provide `{project_id}` before\n            continuing.\n        *   When the Google Cloud project number (`{project_number}`) is needed\n            (such as constructing the Cloud Monitoring Service Agent identity\n            for Pub\u002FSub channels):\n            *   **Method A (Standard)**: Run `gcloud projects describe\n                {project_id} --format='value(projectNumber)'`.\n            *   **Method B (Ask User)**: If the command fails or you cannot\n                retrieve the project number, ask the user to provide it.\n    2.  **Authentication**: Authenticate the `gcloud` CLI via `gcloud auth\n        login` and configure Application Default Credentials (ADC) for Terraform\n        via `gcloud auth application-default login`.\n    3.  **Project Configuration & Billing**: Configure the target Google Cloud\n        project via `gcloud config set project {project_id}` (and ensure the\n        project has an active billing account attached).\n        *   **Recovery Actions**: If `gcloud config set project {project_id}` or\n            `gcloud projects describe {project_id}` fails, verify active\n            credentials with `gcloud auth list`, list accessible projects with\n            `gcloud projects list`, or prompt the user to confirm the project ID\n            and access permissions. If deployment fails due to a missing or\n            inactive billing account, stop deployment and instruct the user to\n            link an active billing account (via `gcloud billing projects link\n            {project_id} --billing-account={account_id}` or in the Google Cloud\n            console) before retrying.\n    4.  **IAM Permissions**: Ensure the principal has permission to manage\n        notification channels—either via the predefined Monitoring\n        NotificationChannel Editor role\n        (`roles\u002Fmonitoring.notificationChannelEditor`, plus\n        `roles\u002Fmonitoring.alertPolicyEditor` when adding a channel to an\n        existing alert policy) **or via a custom IAM role** containing the\n        equivalent permissions (`monitoring.notificationChannels.get`,\n        `monitoring.notificationChannels.list`,\n        `monitoring.notificationChannels.create`,\n        `monitoring.notificationChannels.update`,\n        `monitoring.notificationChannels.delete`, and\n        `monitoring.alertPolicies.get` \u002F `monitoring.alertPolicies.update` when\n        updating an alert policy).\n        *   **Recovery Actions**: Users with a custom role granting these\n            permissions do not need the predefined role name. If a `gcloud` or\n            `terraform` command fails with `PERMISSION_DENIED` (HTTP 403), stop\n            execution, identify the missing `monitoring.notificationChannels.*`\n            or `monitoring.alertPolicies.*` permission, and instruct the user to\n            ask a project administrator to grant\n            `roles\u002Fmonitoring.notificationChannelEditor` (or a custom role with\n            the required permissions) to their principal.\n*   **Discovery Tips**:\n    *   **Listing Notification Channels**: You MUST use `gcloud beta monitoring\n        channels list --project={project_id}` to list notification channels. Do\n        **NOT** use any other `gcloud` commands to list notification channels.\n    *   **Verifying Pub\u002FSub Topics**: When configuring a Pub\u002FSub notification\n        channel, run\n        [`scripts\u002Fverify_pubsub_topic.sh`](scripts\u002Fverify_pubsub_topic.sh)\n        `{monitoring_project_id} {topic_name_or_path}` to verify that:\n        1.  The Pub\u002FSub API (`pubsub.googleapis.com`) is enabled in the topic's\n            project (supporting both same-project topics and cross-project\n            topics specified as\n            `projects\u002F{topic_project_id}\u002Ftopics\u002F{topic_name}`).\n        2.  The topic exists and the monitoring project's Cloud Monitoring\n            Service Agent\n            (`service-{monitoring_project_number}@gcp-sa-monitoring-notification.iam.gserviceaccount.com`)\n            holds `roles\u002Fpubsub.publisher` on the topic or topic project.\n        3.  The topic does **not** define a message storage policy\n            (`messageStoragePolicy` \u002F `message_storage_policy`) and does **not**\n            have in-transit enforcement (`enforceInTransit` \u002F\n            `enforce_in_transit`) enabled. **DO NOT** use a Pub\u002FSub topic that\n            defines a message storage policy or enforces in-transit restrictions\n            as a notification channel, because Cloud Monitoring cannot deliver\n            messages to such topics.\n*   **Attribution**: You MUST tag EVERY applicable command and Terraform\n    resource below that you create, modify, or suggest to the user.\n\n    *   **Terraform HCL (`user_labels`)**:\n        *   Every `google_monitoring_notification_channel` resource that you\n            create MUST include the `created-with-google-skill` label in its\n            `user_labels` block:\n\n            ```terraform\n            user_labels = {\n              created-with-google-skill = \"cloud-monitoring-notification-channels-configuration\"\n            }\n            ```\n\n        *   When modifying an existing `google_monitoring_alert_policy` resource\n            solely to add a notification channel, do **not** use\n            `created-with-google-skill` (since this skill did not create the\n            alerting policy). Instead, include the\n            `added-channel-with-google-skill` label in its `user_labels` block\n            (preserving any existing `user_labels` on the policy):\n\n            ```terraform\n            user_labels = {\n              added-channel-with-google-skill = \"cloud-monitoring-notification-channels-configuration\"\n            }\n            ```\n\n    *   Follow the instructions below based on the CLI tool being used:\n\n        *   **gcloud:** Prefix every `gcloud` invocation with the metrics\n            environment variables. Set them inline on each command; shell state\n            may not persist between commands:\n\n            ```bash\n            CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\" \\\n                gcloud \u003Ccommand> [flags]\n            ```\n\n        *   **Direct HTTP calls:** For direct HTTP calls (e.g. `curl`), you MUST\n            pass the explicit `-H \"User-Agent: ...\"` header in the shell command\n            syntax exactly like this:\n\n            ```bash\n            curl -H \"User-Agent: agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\" ...\n            ```\n\n        *   **Terraform:** Prefix every Terraform `plan` and `apply` invocation\n            with the metrics environment variables. Set them inline on each\n            command; shell state may not persist between commands. For example:\n\n            ```bash\n            GOOGLE_TERRAFORM_USERAGENT_EXTENSION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\" \\\n                terraform plan [flags]\n            ```\n\n    *   If the skill instructions provide an additional skill script name,\n        include that script name in the attribution label. Using a `gcloud`\n        command inside\n        [`scripts\u002Fverify_pubsub_topic.sh`](scripts\u002Fverify_pubsub_topic.sh) as an\n        example:\n\n        ```bash\n        CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration; script:verify_pubsub_topic)\" \\\n            gcloud \u003Ccommand> [flags]\n        ```\n\n*   **Execution Note (State Refresh Timeout Recovery)**: When running `terraform\n    plan` or `terraform apply`, set a command timeout of **120 seconds**. If the\n    command does not complete within 120 seconds (indicating Terraform is\n    stalling on a full state refresh across a large state file rather than\n    normal execution), cancel the command and retry **at most once** by running\n    `terraform plan` and `terraform apply` with `-target` scoped to the specific\n    resources being created or updated (for example,\n    `-target=google_monitoring_notification_channel.\u003Cresource_name>` and, if\n    updating an alert policy,\n    `-target=google_monitoring_alert_policy.\u003Cpolicy_name>`). If the targeted\n    retry also times out after 120 seconds or fails, **DO NOT** retry again;\n    stop execution and report the timeout or error to the user.\n\n## Generation\n\n### Input Assumptions (checklist)\n\n*   **Notification Channel Type**: When creating a new notification channel, the\n    user MUST provide the notification channel type to configure.\n    -   If no type is provided (and the user is not attaching an existing\n        notification channel to an alert policy), you MUST prompt the user to\n        ask for a type before continuing.\n*   **Sensitive Credentials File**: Some notification channels require the use\n    of sensitive credentials in their configuration. You MUST verify that the\n    user has a `secret.tfvars` file in the working directory. If the file does\n    not exist, create one using the template provided in\n    [`assets\u002Fsecret.tfvars`](assets\u002Fsecret.tfvars) and notify the user that\n    credentials should be stored there.\n\n### Execution Steps\n\n1.  Open the reference file corresponding to the notification channel the user\n    wants to configure:\n\n    Notification Channel Type | Reference File\n    :------------------------ | :----------------------------------------\n    **email**                 | [email.md](references\u002Femail.md)\n    **sms**                   | [sms.md](references\u002Fsms.md)\n    **slack**                 | [slack.md](references\u002Fslack.md)\n    **pubsub**                | [pubsub.md](references\u002Fpubsub.md)\n    **pagerduty**             | [pagerduty.md](references\u002Fpagerduty.md)\n    **webhook**               | [webhook.md](references\u002Fwebhook.md)\n\n2.  Follow the guidelines in the `Prerequisites` section (if any) to complete\n    all requirements for the channel configuration.\n\n3.  If the reference file contains a `Required Credentials` section under\n    `Specification`, you MUST confirm that the listed required credentials are\n    configured in the `secret.tfvars` file.\n\n    -   If any of the credentials are set to empty or not found in the file, you\n        MUST prompt the user to provide them before proceeding.\n\n4.  Use the template provided in the `Terraform HCL` section under\n    `Specification` inside the reference file replacing the specified variables\n    as needed to write the new configuration into the output file. If the user\n    explicitly specifies a `display_name` for the notification channel, set\n    `display_name` to that exact string instead of the default\n    `\"\u003CType> Notification Channel (...)\"` template string.\n\n5.  **Adding a Channel to an Existing Alert Policy**: When modifying an existing\n    `google_monitoring_alert_policy` resource to use an existing\n    `google_monitoring_notification_channel` resource (without creating a new\n    channel), set `notification_channels` on the\n    `google_monitoring_alert_policy` block and set the\n    `added-channel-with-google-skill` label to\n    `\"cloud-monitoring-notification-channels-configuration\"` in its\n    `user_labels` block (preserving any existing `user_labels`):\n\n    ```terraform\n    notification_channels = [\n      google_monitoring_notification_channel.\u003Cchannel_resource_name>.name,\n    ]\n    user_labels = {\n      added-channel-with-google-skill = \"cloud-monitoring-notification-channels-configuration\"\n    }\n    ```\n\n### Outputs & Formats\n\nWrite all channel configurations into a `notification_channels.tf` file under\nthe directory chosen in the #context-provided section (or update the target\n`.tf` file when adding notification channels to an existing\n`google_monitoring_alert_policy`). Ensure every generated\n`google_monitoring_notification_channel` resource sets\n`created-with-google-skill` to\n`\"cloud-monitoring-notification-channels-configuration\"` in `user_labels`, and\nevery modified `google_monitoring_alert_policy` resource sets\n`added-channel-with-google-skill` to\n`\"cloud-monitoring-notification-channels-configuration\"` in `user_labels`.\n\n--------------------------------------------------------------------------------\n\n## Supporting Links\n\n*   [Create and manage notification channels](https:\u002F\u002Fdocs.cloud.google.com\u002Fmonitoring\u002Fsupport\u002Fnotification-options.md.txt)\n","# Cloud Monitoring Notification Channels Configuration\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\"`\nand append `agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)` to `User-Agent` headers.\n\n## Context Provided\n\n*   **Terraform Only**: Write the generated observability configuration ONLY as\n    Terraform (`.tf`) files (e.g., `notification_channels.tf`).\n    -   Install Terraform **ONLY** if you are asked to deploy the channels AND\n        there is no valid Terraform installation.\n    -   If you are **NOT** asked to deploy the channels, **DO NOT** install\n        Terraform.\n*   **Working Directory Inference**: Determine the target path for `.tf` files\n    using the following order:\n    1.  If the user provides a path, use that exact path for the `.tf` file.\n    2.  If a path is not provided, search the workspace for existing `.tf` files\n        (preferring files that already define\n        `google_monitoring_notification_channel` or\n        `google_monitoring_alert_policy` resources, or existing directories in\n        the strict preference order: `monitoring\u002F`, then `ops\u002F`, then `sre\u002F`).\n        If found, write `notification_channels.tf` in that directory (or update\n        the existing `.tf` file when modifying an existing resource).\n    3.  If a path is not provided and no `.tf` files or target directories exist\n        in the workspace, create and write to\n        `monitoring\u002Fnotification_channels.tf`.\n*   **Google Cloud Prerequisites**: When running `gcloud` CLI discovery commands\n    or deploying configurations with the `terraform` CLI against a Google Cloud\n    project, ensure the following prerequisites are met in order (do not execute\n    these commands if the user only asks to generate or print Terraform HCL):\n    1.  **Target Project ID & Project Number**:\n        *   Identify the target Google Cloud `{project_id}` from the user's\n            request or via `gcloud config get-value project`. If neither is\n            available, prompt the user to provide `{project_id}` before\n            continuing.\n        *   When the Google Cloud project number (`{project_number}`) is needed\n            (such as constructing the Cloud Monitoring Service Agent identity\n            for Pub\u002FSub channels):\n            *   **Method A (Standard)**: Run `gcloud projects describe\n                {project_id} --format='value(projectNumber)'`.\n            *   **Method B (Ask User)**: If the command fails or you cannot\n                retrieve the project number, ask the user to provide it.\n    2.  **Authentication**: Authenticate the `gcloud` CLI via `gcloud auth\n        login` and configure Application Default Credentials (ADC) for Terraform\n        via `gcloud auth application-default login`.\n    3.  **Project Configuration & Billing**: Configure the target Google Cloud\n        project via `gcloud config set project {project_id}` (and ensure the\n        project has an active billing account attached).\n        *   **Recovery Actions**: If `gcloud config set project {project_id}` or\n            `gcloud projects describe {project_id}` fails, verify active\n            credentials with `gcloud auth list`, list accessible projects with\n            `gcloud projects list`, or prompt the user to confirm the project ID\n            and access permissions. If deployment fails due to a missing or\n            inactive billing account, stop deployment and instruct the user to\n            link an active billing account (via `gcloud billing projects link\n            {project_id} --billing-account={account_id}` or in the Google Cloud\n            console) before retrying.\n    4.  **IAM Permissions**: Ensure the principal has permission to manage\n        notification channels—either via the predefined Monitoring\n        NotificationChannel Editor role\n        (`roles\u002Fmonitoring.notificationChannelEditor`, plus\n        `roles\u002Fmonitoring.alertPolicyEditor` when adding a channel to an\n        existing alert policy) **or via a custom IAM role** containing the\n        equivalent permissions (`monitoring.notificationChannels.get`,\n        `monitoring.notificationChannels.list`,\n        `monitoring.notificationChannels.create`,\n        `monitoring.notificationChannels.update`,\n        `monitoring.notificationChannels.delete`, and\n        `monitoring.alertPolicies.get` \u002F `monitoring.alertPolicies.update` when\n        updating an alert policy).\n        *   **Recovery Actions**: Users with a custom role granting these\n            permissions do not need the predefined role name. If a `gcloud` or\n            `terraform` command fails with `PERMISSION_DENIED` (HTTP 403), stop\n            execution, identify the missing `monitoring.notificationChannels.*`\n            or `monitoring.alertPolicies.*` permission, and instruct the user to\n            ask a project administrator to grant\n            `roles\u002Fmonitoring.notificationChannelEditor` (or a custom role with\n            the required permissions) to their principal.\n*   **Discovery Tips**:\n    *   **Listing Notification Channels**: You MUST use `gcloud beta monitoring\n        channels list --project={project_id}` to list notification channels. Do\n        **NOT** use any other `gcloud` commands to list notification channels.\n    *   **Verifying Pub\u002FSub Topics**: When configuring a Pub\u002FSub notification\n        channel, run\n        [`scripts\u002Fverify_pubsub_topic.sh`](scripts\u002Fverify_pubsub_topic.sh)\n        `{monitoring_project_id} {topic_name_or_path}` to verify that:\n        1.  The Pub\u002FSub API (`pubsub.googleapis.com`) is enabled in the topic's\n            project (supporting both same-project topics and cross-project\n            topics specified as\n            `projects\u002F{topic_project_id}\u002Ftopics\u002F{topic_name}`).\n        2.  The topic exists and the monitoring project's Cloud Monitoring\n            Service Agent\n            (`service-{monitoring_project_number}@gcp-sa-monitoring-notification.iam.gserviceaccount.com`)\n            holds `roles\u002Fpubsub.publisher` on the topic or topic project.\n        3.  The topic does **not** define a message storage policy\n            (`messageStoragePolicy` \u002F `message_storage_policy`) and does **not**\n            have in-transit enforcement (`enforceInTransit` \u002F\n            `enforce_in_transit`) enabled. **DO NOT** use a Pub\u002FSub topic that\n            defines a message storage policy or enforces in-transit restrictions\n            as a notification channel, because Cloud Monitoring cannot deliver\n            messages to such topics.\n*   **Attribution**: You MUST tag EVERY applicable command and Terraform\n    resource below that you create, modify, or suggest to the user.\n\n    *   **Terraform HCL (`user_labels`)**:\n        *   Every `google_monitoring_notification_channel` resource that you\n            create MUST include the `created-with-google-skill` label in its\n            `user_labels` block:\n\n            ```terraform\n            user_labels = {\n              created-with-google-skill = \"cloud-monitoring-notification-channels-configuration\"\n            }\n            ```\n\n        *   When modifying an existing `google_monitoring_alert_policy` resource\n            solely to add a notification channel, do **not** use\n            `created-with-google-skill` (since this skill did not create the\n            alerting policy). Instead, include the\n            `added-channel-with-google-skill` label in its `user_labels` block\n            (preserving any existing `user_labels` on the policy):\n\n            ```terraform\n            user_labels = {\n              added-channel-with-google-skill = \"cloud-monitoring-notification-channels-configuration\"\n            }\n            ```\n\n    *   Follow the instructions below based on the CLI tool being used:\n\n        *   **gcloud:** Prefix every `gcloud` invocation with the metrics\n            environment variables. Set them inline on each command; shell state\n            may not persist between commands:\n\n            ```bash\n            CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\" \\\n                gcloud \u003Ccommand> [flags]\n            ```\n\n        *   **Direct HTTP calls:** For direct HTTP calls (e.g. `curl`), you MUST\n            pass the explicit `-H \"User-Agent: ...\"` header in the shell command\n            syntax exactly like this:\n\n            ```bash\n            curl -H \"User-Agent: agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\" ...\n            ```\n\n        *   **Terraform:** Prefix every Terraform `plan` and `apply` invocation\n            with the metrics environment variables. Set them inline on each\n            command; shell state may not persist between commands. For example:\n\n            ```bash\n            GOOGLE_TERRAFORM_USERAGENT_EXTENSION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration)\" \\\n                terraform plan [flags]\n            ```\n\n    *   If the skill instructions provide an additional skill script name,\n        include that script name in the attribution label. Using a `gcloud`\n        command inside\n        [`scripts\u002Fverify_pubsub_topic.sh`](scripts\u002Fverify_pubsub_topic.sh) as an\n        example:\n\n        ```bash\n        CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:cloud-monitoring-notification-channels-configuration; script:verify_pubsub_topic)\" \\\n            gcloud \u003Ccommand> [flags]\n        ```\n\n*   **Execution Note (State Refresh Timeout Recovery)**: When running `terraform\n    plan` or `terraform apply`, set a command timeout of **120 seconds**. If the\n    command does not complete within 120 seconds (indicating Terraform is\n    stalling on a full state refresh across a large state file rather than\n    normal execution), cancel the command and retry **at most once** by running\n    `terraform plan` and `terraform apply` with `-target` scoped to the specific\n    resources being created or updated (for example,\n    `-target=google_monitoring_notification_channel.\u003Cresource_name>` and, if\n    updating an alert policy,\n    `-target=google_monitoring_alert_policy.\u003Cpolicy_name>`). If the targeted\n    retry also times out after 120 seconds or fails, **DO NOT** retry again;\n    stop execution and report the timeout or error to the user.\n\n## Generation\n\n### Input Assumptions (checklist)\n\n*   **Notification Channel Type**: When creating a new notification channel, the\n    user MUST provide the notification channel type to configure.\n    -   If no type is provided (and the user is not attaching an existing\n        notification channel to an alert policy), you MUST prompt the user to\n        ask for a type before continuing.\n*   **Sensitive Credentials File**: Some notification channels require the use\n    of sensitive credentials in their configuration. You MUST verify that the\n    user has a `secret.tfvars` file in the working directory. If the file does\n    not exist, create one using the template provided in\n    [`assets\u002Fsecret.tfvars`](assets\u002Fsecret.tfvars) and notify the user that\n    credentials should be stored there.\n\n### Execution Steps\n\n1.  Open the reference file corresponding to the notification channel the user\n    wants to configure:\n\n    Notification Channel Type | Reference File\n    :------------------------ | :----------------------------------------\n    **email**                 | [email.md](references\u002Femail.md)\n    **sms**                   | [sms.md](references\u002Fsms.md)\n    **slack**                 | [slack.md](references\u002Fslack.md)\n    **pubsub**                | [pubsub.md](references\u002Fpubsub.md)\n    **pagerduty**             | [pagerduty.md](references\u002Fpagerduty.md)\n    **webhook**               | [webhook.md](references\u002Fwebhook.md)\n\n2.  Follow the guidelines in the `Prerequisites` section (if any) to complete\n    all requirements for the channel configuration.\n\n3.  If the reference file contains a `Required Credentials` section under\n    `Specification`, you MUST confirm that the listed required credentials are\n    configured in the `secret.tfvars` file.\n\n    -   If any of the credentials are set to empty or not found in the file, you\n        MUST prompt the user to provide them before proceeding.\n\n4.  Use the template provided in the `Terraform HCL` section under\n    `Specification` inside the reference file replacing the specified variables\n    as needed to write the new configuration into the output file. If the user\n    explicitly specifies a `display_name` for the notification channel, set\n    `display_name` to that exact string instead of the default\n    `\"\u003CType> Notification Channel (...)\"` template string.\n\n5.  **Adding a Channel to an Existing Alert Policy**: When modifying an existing\n    `google_monitoring_alert_policy` resource to use an existing\n    `google_monitoring_notification_channel` resource (without creating a new\n    channel), set `notification_channels` on the\n    `google_monitoring_alert_policy` block and set the\n    `added-channel-with-google-skill` label to\n    `\"cloud-monitoring-notification-channels-configuration\"` in its\n    `user_labels` block (preserving any existing `user_labels`):\n\n    ```terraform\n    notification_channels = [\n      google_monitoring_notification_channel.\u003Cchannel_resource_name>.name,\n    ]\n    user_labels = {\n      added-channel-with-google-skill = \"cloud-monitoring-notification-channels-configuration\"\n    }\n    ```\n\n### Outputs & Formats\n\nWrite all channel configurations into a `notification_channels.tf` file under\nthe directory chosen in the #context-provided section (or update the target\n`.tf` file when adding notification channels to an existing\n`google_monitoring_alert_policy`). Ensure every generated\n`google_monitoring_notification_channel` resource sets\n`created-with-google-skill` to\n`\"cloud-monitoring-notification-channels-configuration\"` in `user_labels`, and\nevery modified `google_monitoring_alert_policy` resource sets\n`added-channel-with-google-skill` to\n`\"cloud-monitoring-notification-channels-configuration\"` in `user_labels`.\n\n--------------------------------------------------------------------------------\n\n## Supporting Links\n\n*   [Create and manage notification channels](https:\u002F\u002Fdocs.cloud.google.com\u002Fmonitoring\u002Fsupport\u002Fnotification-options.md.txt)\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.2","CloudObservabilityAndMonitoring","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 cloud-monitoring-notification-channels-configuration",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill cloud-monitoring-notification-channels-configuration",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill cloud-monitoring-notification-channels-configuration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002FSKILL.md",true,[51,57,63,67,71,75,79,83,87,91,95],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Fsecret.tfvars","ASSET","资产文件",205,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Fassets\u002Fsecret.tfvars",{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"INSTALL-SOURCE.json","REFERENCE","参考文档",616,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\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\u002Fattribution.md",2004,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Fattribution.md",{"path":72,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Femail.md",931,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Femail.md",{"path":76,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fpagerduty.md",3504,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Fpagerduty.md",{"path":80,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fpubsub.md",6254,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Fpubsub.md",{"path":84,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fslack.md",1071,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Fslack.md",{"path":88,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fsms.md",906,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Fsms.md",{"path":92,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fwebhook.md",3937,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Freferences\u002Fwebhook.md",{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"scripts\u002Fverify_pubsub_topic.sh","SCRIPT","脚本",9056,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fcloud-monitoring-notification-channels-configuration\u002Fscripts\u002Fverify_pubsub_topic.sh",[102,110,119,127,135,143],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"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":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"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":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"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":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"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":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":139,"sourceHtmlUrl":140,"categories":141,"keywords":142,"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":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":147,"sourceHtmlUrl":148,"categories":149,"keywords":150,"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",[],[]]