[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E5MXG1N2KEQ22AVEPDEEK2":3,"skill-same:01M7E5MXG1N2KEQ22AVEPDEEK2":73},{"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":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M7E5MXG1N2KEQ22AVEPDEEK2","alibabacloud-sms-send-short-message",null,"Send short messages (SMS) to specified phone numbers via Alibaba Cloud Short Message Service. Supports verification codes, notification messages, and marketing messages. Use this Skill whenever the user wants to send SMS verification codes, system notifications, order reminders, or marketing campaigns. Supports single send (SendSms, up to 1000 phone numbers sharing the same signature and template parameters) and batch send (SendBatchSms, up to 100 phone numbers, each with its own signature and template parameters). The signature and template approval status can be verified before sending to maximize delivery success rate.","Jane-o-O-o-O\u002Fpersonal-agent","Jane-o-O-o-O","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179437561?v=4","01M7E4A2T6D0QNC04YPW4P0E9F","Jin Zhangzheng","01M7E4A2TRHBYJEQJM6FZKKZ1X",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: alibabacloud-sms-send-short-message\ndescription: >\n  Send short messages (SMS) to specified phone numbers via Alibaba Cloud Short Message Service.\n  Supports verification codes, notification messages, and marketing messages.\n  Use this Skill whenever the user wants to send SMS verification codes, system notifications,\n  order reminders, or marketing campaigns. Supports single send (SendSms, up to 1000 phone\n  numbers sharing the same signature and template parameters) and batch send (SendBatchSms,\n  up to 100 phone numbers, each with its own signature and template parameters). The\n  signature and template approval status can be verified before sending to maximize\n  delivery success rate.\nlicense: Apache-2.0\ncompatibility: >\n  aliyun-cli >= 3.3.3\n  dysmsapi plugin (auto-installed)\n  Requires Alibaba Cloud AccessKey configured via `aliyun configure`\nmetadata:\n  domain: cloud-communication\n  owner: sms-team\n  contact: sms-team@alibaba-inc.com\n  implementation: aliyun-cli\n  ram_policies: references\u002Fram-policies.md\n---\n\n## Critical CLI Compliance (Must Read First)\n\nThe following declarations apply to **every** `aliyun` CLI invocation in this Skill —\nthey must be honored before any send \u002F query operation, workflow step, or functional\nscenario described later in this document.\n\n**Pre-check: Aliyun CLI >= 3.3.3 required**\n> Run `aliyun version` to verify the version is >= 3.3.3. If not installed or the version\n> is too low, run `curl -fsSL https:\u002F\u002Faliyuncli.alicdn.com\u002Fsetup.sh | bash` to install or\n> update.\n\n**Pre-check: Aliyun CLI plugin update required**\n> [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin\n> installation.\n> [MUST] run `aliyun plugin update` to ensure that any existing plugins on your local\n> machine are always up-to-date.\n\n**[MUST] Enable AI-Mode** — AI-mode is required for Agent Skill execution. Run the\nfollowing commands before any CLI invocation:\n```bash\naliyun configure ai-mode enable\naliyun configure ai-mode set-user-agent --user-agent \"AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message\"\n```\n\n**[MUST] Disable AI-Mode at EVERY exit point** — Before delivering the final response\nfor ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow\nsuccess, workflow failure, error\u002Fexception, user cancellation, session end, or any other\nscenario where no further CLI commands will be executed. AI-mode is only used for Agent\nSkill invocation scenarios and MUST NOT remain enabled after the skill stops running.\n```bash\naliyun configure ai-mode disable\n```\n\n**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation in this Skill must\ninclude the flag:\n`--user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`\n\n---\n\n## Overview\n\nThis Skill wraps the Alibaba Cloud Short Message Service (SMS) end-to-end on top of the\n**aliyun CLI**, exposing the following capabilities:\n\n- **Send SMS**: verification codes, notifications, or marketing messages (SendSms).\n- **Batch send**: different signatures \u002F template params per phone number (SendBatchSms).\n- **Signature management**: query approval status and signature lists.\n- **Template management**: query approval status and template lists.\n- **Send status query**: query SMS send details and delivery receipts.\n- **Send statistics query**: aggregated send \u002F success \u002F fail counts in a date range\n  (QuerySendStatistics).\n- **SMS qualification query**: list records (QuerySmsQualificationRecord) and\n  single-record detail (QuerySingleSmsQualification) — see\n  [`references\u002Fsms-qualification.md`](references\u002Fsms-qualification.md).\n\n## Interactive Parameter Confirmation (Must Read)\n\nBefore executing any send-class operation (`send-sms` \u002F `send-batch-sms`), this Skill\n**must** collect these critical parameters first:\n\n- `--sign-name` (signature name)\n- `--template-code` (template code)\n- `--template-param` (template variables, when the template contains placeholders)\n- `--phone-numbers` \u002F `--phone-number-json` (phone numbers)\n\n### Handling Rules\n\nWhen the user does not explicitly provide the **signature** or **template**, the AI\nagent **must not guess or fabricate them**. Instead it should:\n\n1. **Ask the user proactively**: \"Which signature\u002Ftemplate should I use? If unsure, I can\n   list approved ones from your account for you to pick from.\"\n2. **After the user agrees, call list APIs**:\n   - `aliyun dysmsapi query-sms-sign-list ...` then `aliyun dysmsapi get-sms-sign --sign-name \u003Cname>` per candidate.\n   - `aliyun dysmsapi query-sms-template-list ...`\n   - **Hard filter**: keep only signs with `SignStatus = 1` (approved) and templates with `TemplateStatus = 1`. **Do NOT drop signs based on carrier registration alone** — unregistered carriers may still deliver. Instead, surface `SignIspRegisterDetailList[*].RegisterResult` (per-carrier registration status) as an extra column in the candidate table and let the user decide. Columns: index \u002F code \u002F name \u002F content \u002F `SignStatus` \u002F per-carrier registration.\n3. **Resolve template variables**: If the picked template contains `${xxx}` placeholders,\n   ask for each variable's value one by one and assemble them into `--template-param` JSON.\n4. **Phone numbers**: Always require explicit phone numbers from the user; never reuse\n   placeholder numbers like `13800138000` from this document as the actual recipient.\n5. **Final confirmation**: Once all critical parameters are collected, **restate the\n   complete send plan and only call `send-sms` \u002F `send-batch-sms` after the user gives an\n   explicit confirmation (e.g. \"confirm\" \u002F \"send\")**.\n\n### Quick Recovery When Signature \u002F Template Is Invalid\n\nIf `send-sms` returns `isv.SMS_SIGN_NAME_ILLEGAL` \u002F `isv.SMS_TEMPLATE_ILLEGAL`, the agent\nshould proactively offer to \"list existing signatures and templates\" and, after the user\nagrees, call the list APIs instead of retrying blindly.\n\n## Prerequisites\n\n### 1. Install aliyun CLI (>= 3.3.3)\n\n```bash\n# macOS\nbrew install aliyun-cli\n\n# Linux\nwget https:\u002F\u002Faliyuncli.alicdn.com\u002Faliyun-cli-linux-latest-amd64.tgz\ntar -xzf aliyun-cli-linux-latest-amd64.tgz && sudo mv aliyun \u002Fusr\u002Flocal\u002Fbin\u002F\n\naliyun version  # must be >= 3.3.3\n```\n\n### 2. Install the dysmsapi plugin\n\n```bash\naliyun plugin install --names dysmsapi\n```\n\n### 3. Configure Credentials\n\nThe aliyun CLI **default credential chain** is recommended; it picks credentials in this\npriority order: env vars → `~\u002F.aliyun\u002Fconfig.json` → ECS RAM role → OIDC Token.\n\n```bash\n# Recommended for CI\u002FCD: env vars\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=\u003Cyour-access-key-id>\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=\u003Cyour-access-key-secret>\nexport ALIBABA_CLOUD_REGION_ID=cn-hangzhou\n\n# Verify\naliyun configure get\n```\n\n> **Important**: Never hard-code AK\u002FSK in code or commands. Always rely on the default\n> credential chain. On ECS use a RAM role; in K8s use OIDC.\n\n### 4. Activate the SMS Service\n\nIn the [Alibaba Cloud SMS Console](https:\u002F\u002Fdysms.console.aliyun.com\u002F): activate the\nservice, create an **approved** signature, and create an **approved** template.\n\n## Usage\n\n### Calling aliyun CLI directly\n\n**Send SMS**:\n```bash\naliyun dysmsapi send-sms \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000\" \\\n  --sign-name \"AliyunDemo\" \\\n  --template-code \"SMS_123456\" \\\n  --template-param '{\"code\":\"123456\"}' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message \\\n  --read-timeout 3\n```\n\n**Batch send (different signatures \u002F template params)**:\n```bash\naliyun dysmsapi send-batch-sms \\\n  --api-version 2017-05-25 \\\n  --phone-number-json '[\"13800138000\",\"13900139000\"]' \\\n  --sign-name-json '[\"SignA\",\"SignB\"]' \\\n  --template-code \"SMS_123456\" \\\n  --template-param-json '[{\"code\":\"111111\"},{\"code\":\"222222\"}]' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message \\\n  --read-timeout 3\n```\n\n**Query lists \u002F status \u002F details**:\n```bash\n# Approved signatures \u002F templates (use to populate user choices)\naliyun dysmsapi query-sms-sign-list      --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\naliyun dysmsapi query-sms-template-list  --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Single signature \u002F template lookup\naliyun dysmsapi get-sms-sign     --api-version 2017-05-25 --sign-name \"AliyunDemo\"     --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\naliyun dysmsapi get-sms-template --api-version 2017-05-25 --template-code \"SMS_123456\" --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Per-message delivery details (use BizId for precise lookup)\naliyun dysmsapi query-send-details \\\n  --api-version 2017-05-25 \\\n  --phone-number \"13800138000\" --send-date \"20260326\" \\\n  --page-size 10 --current-page 1 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Aggregated statistics (--is-globe: 1=domestic, 2=intl\u002FHK-Macao-Taiwan)\naliyun dysmsapi query-send-statistics \\\n  --api-version 2017-05-25 --is-globe 1 \\\n  --start-date \"20260301\" --end-date \"20260326\" \\\n  --page-index 1 --page-size 10 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Filter by signature name + template type (optional)\naliyun dysmsapi query-send-statistics \\\n  --api-version 2017-05-25 --is-globe 1 \\\n  --start-date \"20260301\" --end-date \"20260326\" \\\n  --page-index 1 --page-size 10 \\\n  --sign-name \"AliyunDemo\" --template-type 0 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# SMS qualification — list records (full detail in references\u002Fsms-qualification.md)\naliyun dysmsapi query-sms-qualification-record \\\n  --api-version 2017-05-25 --page-no 1 --page-size 20 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# SMS qualification — single detail by GroupId\naliyun dysmsapi query-single-sms-qualification \\\n  --api-version 2017-05-25 --qualification-group-id 10000123 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n> Full filter parameters, response schemas, and state enum mapping for the\n> qualification APIs are documented in\n> [`references\u002Fsms-qualification.md`](references\u002Fsms-qualification.md).\n\n### Using the wrapper script\n\n`scripts\u002Fsend_sms.sh` automatically applies `--api-version`, the compliant `--user-agent`,\nand `--read-timeout`:\n\n```bash\n# Send (single or comma-separated phones)\n.\u002Fscripts\u002Fsend_sms.sh send -p \"13800138000\" -s \"AliyunDemo\" -t \"SMS_123456\" -tp '{\"code\":\"123456\"}'\n\n# Send with signature\u002Ftemplate pre-verification (recommended)\n.\u002Fscripts\u002Fsend_sms.sh send -p \"13800138000\" -s \"AliyunDemo\" -t \"SMS_123456\" -tp '{\"code\":\"123456\"}' --verify\n\n# List & inspect\n.\u002Fscripts\u002Fsend_sms.sh list-signs\n.\u002Fscripts\u002Fsend_sms.sh list-templates\n.\u002Fscripts\u002Fsend_sms.sh query-sign     --sign-name \"AliyunDemo\"\n.\u002Fscripts\u002Fsend_sms.sh query-template --template-code \"SMS_123456\"\n\n# Status & statistics\n.\u002Fscripts\u002Fsend_sms.sh query-status     -p \"13800138000\" --send-date \"20260326\" --biz-id \"xxx^0\"\n.\u002Fscripts\u002Fsend_sms.sh query-statistics --start-date \"20260301\" --end-date \"20260326\"\n.\u002Fscripts\u002Fsend_sms.sh query-statistics --start-date \"20260301\" --end-date \"20260326\" --is-globe 2\n\n# Filter by signature name and\u002For template type\n.\u002Fscripts\u002Fsend_sms.sh query-statistics --start-date \"20260301\" --end-date \"20260326\" --sign-name \"AliyunDemo\" --template-type 0\n```\n\n## Parameters\n\n### aliyun dysmsapi send-sms\n\n| Parameter         | Required | Description                                              |\n| ----------------- | -------- | -------------------------------------------------------- |\n| --api-version     | Yes      | API version, fixed to `2017-05-25`                       |\n| --phone-numbers   | Yes      | Phone numbers, comma-separated, up to 1000               |\n| --sign-name       | Yes      | SMS signature name                                       |\n| --template-code   | Yes      | SMS template code                                        |\n| --template-param  | No       | Template variables JSON, e.g. `'{\"code\":\"123456\"}'`      |\n| --out-id          | No       | External tracking ID                                     |\n| --user-agent      | Yes      | Fixed to `AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message` |\n| --read-timeout    | Yes      | Read timeout in seconds, recommended value `3`           |\n\n### aliyun dysmsapi send-batch-sms (batch send)\n\n| Parameter                  | Required | Description                                                                  |\n| -------------------------- | -------- | ---------------------------------------------------------------------------- |\n| --api-version              | Yes      | API version, fixed to `2017-05-25`                                           |\n| --phone-number-json        | Yes      | Phone numbers JSON array, up to 100, e.g. `'[\"138xxx\",\"139xxx\"]'`            |\n| --sign-name-json           | Yes      | Signature names JSON array, must match the phone count                       |\n| --template-code            | Yes      | Template code (all phones share the same template)                           |\n| --template-param-json      | No       | Template variables JSON array, must match the phone count                    |\n| --sms-up-extend-code-json  | No       | Upstream SMS extension codes JSON array                                      |\n| --out-id                   | No       | External tracking ID, less than 256 characters                               |\n| --user-agent               | Yes      | Fixed to `AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`     |\n| --read-timeout             | Yes      | Read timeout in seconds, recommended value `3`                               |\n\n> **SendSms vs SendBatchSms**: `send-sms` shares one signature\u002Ftemplate across up to 1000\n> numbers; `send-batch-sms` lets each phone use a different signature\u002Ftemplate params (up\n> to 100 numbers).\n\n### aliyun dysmsapi query-send-statistics\n\n| Parameter         | Required | Description                                                                          |\n| ----------------- | -------- | ------------------------------------------------------------------------------------ |\n| --api-version     | Yes      | API version, fixed to `2017-05-25`                                                   |\n| --is-globe        | Yes      | Scope: `1` = domestic; `2` = international \u002F HK-Macao-Taiwan                         |\n| --start-date      | Yes      | Start date in `yyyyMMdd`                                                             |\n| --end-date        | Yes      | End date in `yyyyMMdd`                                                               |\n| --page-index      | Yes      | Current page, starts from 1                                                          |\n| --page-size       | Yes      | Page size, 1~50                                                                      |\n| --template-type   | No       | `0`=verify code, `1`=notification, `2`=marketing(corp), `3`=intl\u002FHK-Macao-Taiwan(corp), `7`=digital |\n| --sign-name       | No       | Filter by signature name                                                             |\n| --user-agent      | Yes      | Fixed to `AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`             |\n| --read-timeout    | Yes      | Read timeout in seconds, recommended value `3`                                       |\n\n> **Response**: returns `Data.TargetList[]` (each entry has `SendDate`, `TotalCount`,\n> `RespondedSuccessCount`, `RespondedFailCount`, `NoRespondedCount`) and `Data.TotalSize`.\n\n### Wrapper script options\n\n| Option            | Short | Description                                |\n| ----------------- | ----- | ------------------------------------------ |\n| --phone-numbers   | -p    | Phone numbers                              |\n| --sign-name       | -s    | Signature name                             |\n| --template-code   | -t    | Template code                              |\n| --template-param  | -tp   | Template variables (JSON)                  |\n| --out-id          | -o    | External tracking ID                       |\n| --verify          | —     | Verify signature\u002Ftemplate before sending   |\n| --region          | -r    | Region ID, defaults to `cn-hangzhou`       |\n| --profile         | —     | Use the given aliyun CLI profile           |\n\n## Output\n\n### Successful send response\n\n```json\n{\n  \"BizId\": \"114814474505895421^0\",\n  \"Code\": \"OK\",\n  \"Message\": \"OK\",\n  \"RequestId\": \"4C3D8B1B-B3D8-5673-B724-1F251799CE9A\"\n}\n```\n\n### Approval status reference\n\n| Value | SignStatus \u002F TemplateStatus | Description                          |\n| ----- | --------------------------- | ------------------------------------ |\n| 0     | Reviewing                   | SMS cannot be sent for now           |\n| 1     | Approved                    | Available for sending                |\n| 2     | Rejected                    | Needs revision and resubmission      |\n| 10    | Cancelled                   | Sign\u002Ftemplate has been cancelled     |\n\n## Error Handling\n\n### Common business error codes\n\n| Error code                       | Description                          | Suggested action                              |\n| -------------------------------- | ------------------------------------ | --------------------------------------------- |\n| isv.SMS_SIGNATURE_SCENE_ILLEGAL  | Signature\u002Ftemplate scene mismatch    | Make sure signature and template scenes align |\n| isv.SMS_TEMPLATE_ILLEGAL         | Template missing or unapproved       | Verify the template has been approved         |\n| isv.SMS_SIGN_NAME_ILLEGAL        | Signature missing or unapproved      | Verify the signature has been approved        |\n| isv.MOBILE_NUMBER_ILLEGAL        | Bad phone number format              | Check the number format                       |\n| isv.AMOUNT_NOT_ENOUGH            | Insufficient account balance         | Top up the SMS quota                          |\n| isv.BUSINESS_LIMIT_CONTROL       | Throttling triggered                 | Reduce the send rate                          |\n| SignatureNotFound                | Signature not found                  | Create the signature in the console           |\n| TemplateNotFound                 | Template not found                   | Create the template in the console            |\n\n> `query-send-details` `ErrCode` = Alibaba `isv.*`\u002F`isp.*` (above) + carrier receipts (`DELIVERED`, `MOBILE_NOT_ON_SERVICE`, `MOBILE_SEND_LIMIT`, …). Full table + triage: [`references\u002Fsms-error-codes.md`](references\u002Fsms-error-codes.md).\n\n### CLI configuration errors\n\n| Error message                | Cause                | Resolution                                     |\n| ---------------------------- | -------------------- | ---------------------------------------------- |\n| InvalidAccessKeyId.NotFound  | Wrong AccessKey ID   | Check the AccessKey ID                         |\n| SignatureDoesNotMatch        | Wrong Secret         | Check the AccessKey Secret                     |\n| Forbidden.RAM                | Insufficient permission | Verify the RAM user has SMS permissions     |\n\n## Execution Flow\n\n1. **Pre-check**: aliyun CLI installed (>= 3.3.3) and dysmsapi plugin available;\n   AI-Mode enabled; credentials configured.\n2. **Validate required parameters** (`phone-numbers`, `sign-name`, `template-code`).\n   If signature or template is missing, ask the user; after consent call\n   `query-sms-sign-list` \u002F `query-sms-template-list` and present approved candidates.\n3. **[Optional, --verify]** Verify sign via `get-sms-sign`: require `SignStatus=1`; also surface `SignIspRegisterDetailList[*].RegisterResult` to the user as info (unregistered carriers may still deliver — do not block).\n4. **[Optional, --verify]** Verify template status via `get-sms-template` (`TemplateStatus=1`).\n5. **Send** via `aliyun dysmsapi send-sms` (or `send-batch-sms` for per-recipient\n   personalization).\n6. **Return result**: `Code=OK` only confirms gateway acceptance — return `BizId`. To report final delivery to the user, always call `query-send-details` (Scenario 4); never use the send response as proof of delivery.\n7. **[MUST]** Disable AI-Mode at every exit (success \u002F failure \u002F cancellation).\n\n## Examples\n\n### Scenario 1: Send a verification code\n\n```bash\n# 1) Pull approved signatures & templates first (so the user can pick)\naliyun dysmsapi query-sms-sign-list     --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\naliyun dysmsapi query-sms-template-list --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# 2) Send (after user confirmation)\naliyun dysmsapi send-sms \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000\" \\\n  --sign-name \"YourSign\" --template-code \"SMS_xxx\" \\\n  --template-param '{\"code\":\"123456\"}' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n### Scenario 2: Bulk-send with same signature & params\n\n```bash\naliyun dysmsapi send-sms \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000,13900139000,13700137000\" \\\n  --sign-name \"YourSign\" --template-code \"SMS_xxx\" \\\n  --template-param '{\"activity\":\"Double 11 Sale\",\"discount\":\"50% OFF\"}' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n### Scenario 3: Batch send with per-recipient personalization\n\n```bash\naliyun dysmsapi send-batch-sms \\\n  --api-version 2017-05-25 \\\n  --phone-number-json '[\"13800138000\",\"13900139000\",\"13700137000\"]' \\\n  --sign-name-json    '[\"BrandA\",\"BrandB\",\"BrandC\"]' \\\n  --template-code \"SMS_xxx\" \\\n  --template-param-json '[{\"name\":\"Alice\",\"code\":\"111111\"},{\"name\":\"Bob\",\"code\":\"222222\"},{\"name\":\"Charlie\",\"code\":\"333333\"}]' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n> Lengths of `--phone-number-json`, `--sign-name-json`, and `--template-param-json` must\n> match and correspond one-to-one.\n\n### Scenario 4: Verify delivery & aggregate statistics\n\n```bash\n# Per-message delivery (uses BizId returned by send-sms)\naliyun dysmsapi query-send-details \\\n  --api-version 2017-05-25 \\\n  --phone-number \"13800138000\" --send-date \"20260326\" --biz-id \"xxx^0\" \\\n  --page-size 10 --current-page 1 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Range-based aggregated statistics (1 row per send-day)\naliyun dysmsapi query-send-statistics \\\n  --api-version 2017-05-25 --is-globe 1 \\\n  --start-date \"20260301\" --end-date \"20260326\" \\\n  --page-index 1 --page-size 10 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n> **QuerySendDetails vs QuerySendStatistics**: `query-send-details` returns per-message\n> records (delivery time, error code) — useful for troubleshooting. `query-send-statistics`\n> returns aggregated daily counts — useful for trend reporting.\n\n## Multi-Environment \u002F Multi-Account\n\naliyun CLI supports multiple profiles. Prefer env vars or RAM roles:\n\n```bash\n# Option 1: env vars (recommended)\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=\u003Cyour-access-key-id>\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=\u003Cyour-access-key-secret>\n\n# Option 2: profiles (region only; credentials still come from env vars or RAM role)\naliyun configure set --profile prod --region cn-hangzhou\naliyun configure set --profile test --region cn-shanghai\n\naliyun dysmsapi send-sms --profile prod \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000\" --sign-name \"Sign\" --template-code \"SMS_xxx\" \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n## Notes\n\n1. **Plugin install**: First-time use requires `aliyun plugin install --names dysmsapi`.\n2. **API version**: When calling the CLI directly, `--api-version 2017-05-25` is mandatory.\n3. **Parameter format**: kebab-case (e.g. `--phone-numbers`, not `--PhoneNumbers`).\n4. **Timeout**: `--read-timeout 3` is required. After a timeout, query the delivery\n   receipt before deciding whether to retry.\n5. **User-Agent**: `--user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`\n   is required so the server can identify the caller.\n6. **Idempotency**: SendSms\u002FSendBatchSms are NOT idempotent — prevent duplicate sends at\n   the business layer.\n7. **Single vs batch**: Prefer `send-sms` for verification codes; `send-batch-sms` is only\n   needed when each recipient requires different signature or template params (≤ 100).\n8. **Billing**: Billing depends on carrier delivery; API success but carrier failure is\n   not billed. QPS limit is 5000\u002Fs per user.\n9. **Credential safety**: Never hard-code AK\u002FSK; always rely on the default credential\n   chain (env vars \u002F `~\u002F.aliyun\u002Fconfig.json` \u002F ECS RAM role \u002F OIDC).\n10. **Parameter confirmation**: Never guess signature\u002Ftemplate — always ask the user, and\n    after consent fetch `query-sms-sign-list` \u002F `query-sms-template-list` (see\n    \"Interactive Parameter Confirmation\").\n11. **Send-result reporting**: `send-sms` \u002F `send-batch-sms` responses only confirm gateway acceptance (`Code=OK` + `BizId`); they are NOT proof of delivery. Whenever the user asks \"did it arrive?\" \u002F \"was it delivered?\", always call `query-send-details` (use `BizId` for precise lookup) and surface `SendStatus` (1=in-flight, 2=failed, 3=delivered) and `ErrCode` — never reply based on the send-API response alone.\n\n## References\n\n- [Alibaba Cloud CLI documentation](https:\u002F\u002Fhelp.aliyun.com\u002Fzh\u002Fcli\u002F)\n- [SMS Service console](https:\u002F\u002Fdysms.console.aliyun.com\u002F)\n- [SendSms API documentation](https:\u002F\u002Fhelp.aliyun.com\u002Fdocument_detail\u002F419273.html)\n- [Send-status error codes (local)](references\u002Fsms-error-codes.md) — `query-send-details` `ErrCode` (Alibaba `isv.*`\u002F`isp.*` + carrier receipts); upstream: [101347](https:\u002F\u002Fhelp.aliyun.com\u002Fdocument_detail\u002F101347.html) \u002F [101346](https:\u002F\u002Fhelp.aliyun.com\u002Fdocument_detail\u002F101346.html)\n- [SMS qualification query (local)](references\u002Fsms-qualification.md) — `QuerySmsQualificationRecord` \u002F `QuerySingleSmsQualification`\n","## Critical CLI Compliance (Must Read First)\n\nThe following declarations apply to **every** `aliyun` CLI invocation in this Skill —\nthey must be honored before any send \u002F query operation, workflow step, or functional\nscenario described later in this document.\n\n**Pre-check: Aliyun CLI >= 3.3.3 required**\n> Run `aliyun version` to verify the version is >= 3.3.3. If not installed or the version\n> is too low, run `curl -fsSL https:\u002F\u002Faliyuncli.alicdn.com\u002Fsetup.sh | bash` to install or\n> update.\n\n**Pre-check: Aliyun CLI plugin update required**\n> [MUST] run `aliyun configure set --auto-plugin-install true` to enable automatic plugin\n> installation.\n> [MUST] run `aliyun plugin update` to ensure that any existing plugins on your local\n> machine are always up-to-date.\n\n**[MUST] Enable AI-Mode** — AI-mode is required for Agent Skill execution. Run the\nfollowing commands before any CLI invocation:\n```bash\naliyun configure ai-mode enable\naliyun configure ai-mode set-user-agent --user-agent \"AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message\"\n```\n\n**[MUST] Disable AI-Mode at EVERY exit point** — Before delivering the final response\nfor ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow\nsuccess, workflow failure, error\u002Fexception, user cancellation, session end, or any other\nscenario where no further CLI commands will be executed. AI-mode is only used for Agent\nSkill invocation scenarios and MUST NOT remain enabled after the skill stops running.\n```bash\naliyun configure ai-mode disable\n```\n\n**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation in this Skill must\ninclude the flag:\n`--user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`\n\n---\n\n## Overview\n\nThis Skill wraps the Alibaba Cloud Short Message Service (SMS) end-to-end on top of the\n**aliyun CLI**, exposing the following capabilities:\n\n- **Send SMS**: verification codes, notifications, or marketing messages (SendSms).\n- **Batch send**: different signatures \u002F template params per phone number (SendBatchSms).\n- **Signature management**: query approval status and signature lists.\n- **Template management**: query approval status and template lists.\n- **Send status query**: query SMS send details and delivery receipts.\n- **Send statistics query**: aggregated send \u002F success \u002F fail counts in a date range\n  (QuerySendStatistics).\n- **SMS qualification query**: list records (QuerySmsQualificationRecord) and\n  single-record detail (QuerySingleSmsQualification) — see\n  [`references\u002Fsms-qualification.md`](references\u002Fsms-qualification.md).\n\n## Interactive Parameter Confirmation (Must Read)\n\nBefore executing any send-class operation (`send-sms` \u002F `send-batch-sms`), this Skill\n**must** collect these critical parameters first:\n\n- `--sign-name` (signature name)\n- `--template-code` (template code)\n- `--template-param` (template variables, when the template contains placeholders)\n- `--phone-numbers` \u002F `--phone-number-json` (phone numbers)\n\n### Handling Rules\n\nWhen the user does not explicitly provide the **signature** or **template**, the AI\nagent **must not guess or fabricate them**. Instead it should:\n\n1. **Ask the user proactively**: \"Which signature\u002Ftemplate should I use? If unsure, I can\n   list approved ones from your account for you to pick from.\"\n2. **After the user agrees, call list APIs**:\n   - `aliyun dysmsapi query-sms-sign-list ...` then `aliyun dysmsapi get-sms-sign --sign-name \u003Cname>` per candidate.\n   - `aliyun dysmsapi query-sms-template-list ...`\n   - **Hard filter**: keep only signs with `SignStatus = 1` (approved) and templates with `TemplateStatus = 1`. **Do NOT drop signs based on carrier registration alone** — unregistered carriers may still deliver. Instead, surface `SignIspRegisterDetailList[*].RegisterResult` (per-carrier registration status) as an extra column in the candidate table and let the user decide. Columns: index \u002F code \u002F name \u002F content \u002F `SignStatus` \u002F per-carrier registration.\n3. **Resolve template variables**: If the picked template contains `${xxx}` placeholders,\n   ask for each variable's value one by one and assemble them into `--template-param` JSON.\n4. **Phone numbers**: Always require explicit phone numbers from the user; never reuse\n   placeholder numbers like `13800138000` from this document as the actual recipient.\n5. **Final confirmation**: Once all critical parameters are collected, **restate the\n   complete send plan and only call `send-sms` \u002F `send-batch-sms` after the user gives an\n   explicit confirmation (e.g. \"confirm\" \u002F \"send\")**.\n\n### Quick Recovery When Signature \u002F Template Is Invalid\n\nIf `send-sms` returns `isv.SMS_SIGN_NAME_ILLEGAL` \u002F `isv.SMS_TEMPLATE_ILLEGAL`, the agent\nshould proactively offer to \"list existing signatures and templates\" and, after the user\nagrees, call the list APIs instead of retrying blindly.\n\n## Prerequisites\n\n### 1. Install aliyun CLI (>= 3.3.3)\n\n```bash\n# macOS\nbrew install aliyun-cli\n\n# Linux\nwget https:\u002F\u002Faliyuncli.alicdn.com\u002Faliyun-cli-linux-latest-amd64.tgz\ntar -xzf aliyun-cli-linux-latest-amd64.tgz && sudo mv aliyun \u002Fusr\u002Flocal\u002Fbin\u002F\n\naliyun version  # must be >= 3.3.3\n```\n\n### 2. Install the dysmsapi plugin\n\n```bash\naliyun plugin install --names dysmsapi\n```\n\n### 3. Configure Credentials\n\nThe aliyun CLI **default credential chain** is recommended; it picks credentials in this\npriority order: env vars → `~\u002F.aliyun\u002Fconfig.json` → ECS RAM role → OIDC Token.\n\n```bash\n# Recommended for CI\u002FCD: env vars\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=\u003Cyour-access-key-id>\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=\u003Cyour-access-key-secret>\nexport ALIBABA_CLOUD_REGION_ID=cn-hangzhou\n\n# Verify\naliyun configure get\n```\n\n> **Important**: Never hard-code AK\u002FSK in code or commands. Always rely on the default\n> credential chain. On ECS use a RAM role; in K8s use OIDC.\n\n### 4. Activate the SMS Service\n\nIn the [Alibaba Cloud SMS Console](https:\u002F\u002Fdysms.console.aliyun.com\u002F): activate the\nservice, create an **approved** signature, and create an **approved** template.\n\n## Usage\n\n### Calling aliyun CLI directly\n\n**Send SMS**:\n```bash\naliyun dysmsapi send-sms \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000\" \\\n  --sign-name \"AliyunDemo\" \\\n  --template-code \"SMS_123456\" \\\n  --template-param '{\"code\":\"123456\"}' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message \\\n  --read-timeout 3\n```\n\n**Batch send (different signatures \u002F template params)**:\n```bash\naliyun dysmsapi send-batch-sms \\\n  --api-version 2017-05-25 \\\n  --phone-number-json '[\"13800138000\",\"13900139000\"]' \\\n  --sign-name-json '[\"SignA\",\"SignB\"]' \\\n  --template-code \"SMS_123456\" \\\n  --template-param-json '[{\"code\":\"111111\"},{\"code\":\"222222\"}]' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message \\\n  --read-timeout 3\n```\n\n**Query lists \u002F status \u002F details**:\n```bash\n# Approved signatures \u002F templates (use to populate user choices)\naliyun dysmsapi query-sms-sign-list      --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\naliyun dysmsapi query-sms-template-list  --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Single signature \u002F template lookup\naliyun dysmsapi get-sms-sign     --api-version 2017-05-25 --sign-name \"AliyunDemo\"     --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\naliyun dysmsapi get-sms-template --api-version 2017-05-25 --template-code \"SMS_123456\" --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Per-message delivery details (use BizId for precise lookup)\naliyun dysmsapi query-send-details \\\n  --api-version 2017-05-25 \\\n  --phone-number \"13800138000\" --send-date \"20260326\" \\\n  --page-size 10 --current-page 1 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Aggregated statistics (--is-globe: 1=domestic, 2=intl\u002FHK-Macao-Taiwan)\naliyun dysmsapi query-send-statistics \\\n  --api-version 2017-05-25 --is-globe 1 \\\n  --start-date \"20260301\" --end-date \"20260326\" \\\n  --page-index 1 --page-size 10 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Filter by signature name + template type (optional)\naliyun dysmsapi query-send-statistics \\\n  --api-version 2017-05-25 --is-globe 1 \\\n  --start-date \"20260301\" --end-date \"20260326\" \\\n  --page-index 1 --page-size 10 \\\n  --sign-name \"AliyunDemo\" --template-type 0 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# SMS qualification — list records (full detail in references\u002Fsms-qualification.md)\naliyun dysmsapi query-sms-qualification-record \\\n  --api-version 2017-05-25 --page-no 1 --page-size 20 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# SMS qualification — single detail by GroupId\naliyun dysmsapi query-single-sms-qualification \\\n  --api-version 2017-05-25 --qualification-group-id 10000123 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n> Full filter parameters, response schemas, and state enum mapping for the\n> qualification APIs are documented in\n> [`references\u002Fsms-qualification.md`](references\u002Fsms-qualification.md).\n\n### Using the wrapper script\n\n`scripts\u002Fsend_sms.sh` automatically applies `--api-version`, the compliant `--user-agent`,\nand `--read-timeout`:\n\n```bash\n# Send (single or comma-separated phones)\n.\u002Fscripts\u002Fsend_sms.sh send -p \"13800138000\" -s \"AliyunDemo\" -t \"SMS_123456\" -tp '{\"code\":\"123456\"}'\n\n# Send with signature\u002Ftemplate pre-verification (recommended)\n.\u002Fscripts\u002Fsend_sms.sh send -p \"13800138000\" -s \"AliyunDemo\" -t \"SMS_123456\" -tp '{\"code\":\"123456\"}' --verify\n\n# List & inspect\n.\u002Fscripts\u002Fsend_sms.sh list-signs\n.\u002Fscripts\u002Fsend_sms.sh list-templates\n.\u002Fscripts\u002Fsend_sms.sh query-sign     --sign-name \"AliyunDemo\"\n.\u002Fscripts\u002Fsend_sms.sh query-template --template-code \"SMS_123456\"\n\n# Status & statistics\n.\u002Fscripts\u002Fsend_sms.sh query-status     -p \"13800138000\" --send-date \"20260326\" --biz-id \"xxx^0\"\n.\u002Fscripts\u002Fsend_sms.sh query-statistics --start-date \"20260301\" --end-date \"20260326\"\n.\u002Fscripts\u002Fsend_sms.sh query-statistics --start-date \"20260301\" --end-date \"20260326\" --is-globe 2\n\n# Filter by signature name and\u002For template type\n.\u002Fscripts\u002Fsend_sms.sh query-statistics --start-date \"20260301\" --end-date \"20260326\" --sign-name \"AliyunDemo\" --template-type 0\n```\n\n## Parameters\n\n### aliyun dysmsapi send-sms\n\n| Parameter         | Required | Description                                              |\n| ----------------- | -------- | -------------------------------------------------------- |\n| --api-version     | Yes      | API version, fixed to `2017-05-25`                       |\n| --phone-numbers   | Yes      | Phone numbers, comma-separated, up to 1000               |\n| --sign-name       | Yes      | SMS signature name                                       |\n| --template-code   | Yes      | SMS template code                                        |\n| --template-param  | No       | Template variables JSON, e.g. `'{\"code\":\"123456\"}'`      |\n| --out-id          | No       | External tracking ID                                     |\n| --user-agent      | Yes      | Fixed to `AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message` |\n| --read-timeout    | Yes      | Read timeout in seconds, recommended value `3`           |\n\n### aliyun dysmsapi send-batch-sms (batch send)\n\n| Parameter                  | Required | Description                                                                  |\n| -------------------------- | -------- | ---------------------------------------------------------------------------- |\n| --api-version              | Yes      | API version, fixed to `2017-05-25`                                           |\n| --phone-number-json        | Yes      | Phone numbers JSON array, up to 100, e.g. `'[\"138xxx\",\"139xxx\"]'`            |\n| --sign-name-json           | Yes      | Signature names JSON array, must match the phone count                       |\n| --template-code            | Yes      | Template code (all phones share the same template)                           |\n| --template-param-json      | No       | Template variables JSON array, must match the phone count                    |\n| --sms-up-extend-code-json  | No       | Upstream SMS extension codes JSON array                                      |\n| --out-id                   | No       | External tracking ID, less than 256 characters                               |\n| --user-agent               | Yes      | Fixed to `AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`     |\n| --read-timeout             | Yes      | Read timeout in seconds, recommended value `3`                               |\n\n> **SendSms vs SendBatchSms**: `send-sms` shares one signature\u002Ftemplate across up to 1000\n> numbers; `send-batch-sms` lets each phone use a different signature\u002Ftemplate params (up\n> to 100 numbers).\n\n### aliyun dysmsapi query-send-statistics\n\n| Parameter         | Required | Description                                                                          |\n| ----------------- | -------- | ------------------------------------------------------------------------------------ |\n| --api-version     | Yes      | API version, fixed to `2017-05-25`                                                   |\n| --is-globe        | Yes      | Scope: `1` = domestic; `2` = international \u002F HK-Macao-Taiwan                         |\n| --start-date      | Yes      | Start date in `yyyyMMdd`                                                             |\n| --end-date        | Yes      | End date in `yyyyMMdd`                                                               |\n| --page-index      | Yes      | Current page, starts from 1                                                          |\n| --page-size       | Yes      | Page size, 1~50                                                                      |\n| --template-type   | No       | `0`=verify code, `1`=notification, `2`=marketing(corp), `3`=intl\u002FHK-Macao-Taiwan(corp), `7`=digital |\n| --sign-name       | No       | Filter by signature name                                                             |\n| --user-agent      | Yes      | Fixed to `AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`             |\n| --read-timeout    | Yes      | Read timeout in seconds, recommended value `3`                                       |\n\n> **Response**: returns `Data.TargetList[]` (each entry has `SendDate`, `TotalCount`,\n> `RespondedSuccessCount`, `RespondedFailCount`, `NoRespondedCount`) and `Data.TotalSize`.\n\n### Wrapper script options\n\n| Option            | Short | Description                                |\n| ----------------- | ----- | ------------------------------------------ |\n| --phone-numbers   | -p    | Phone numbers                              |\n| --sign-name       | -s    | Signature name                             |\n| --template-code   | -t    | Template code                              |\n| --template-param  | -tp   | Template variables (JSON)                  |\n| --out-id          | -o    | External tracking ID                       |\n| --verify          | —     | Verify signature\u002Ftemplate before sending   |\n| --region          | -r    | Region ID, defaults to `cn-hangzhou`       |\n| --profile         | —     | Use the given aliyun CLI profile           |\n\n## Output\n\n### Successful send response\n\n```json\n{\n  \"BizId\": \"114814474505895421^0\",\n  \"Code\": \"OK\",\n  \"Message\": \"OK\",\n  \"RequestId\": \"4C3D8B1B-B3D8-5673-B724-1F251799CE9A\"\n}\n```\n\n### Approval status reference\n\n| Value | SignStatus \u002F TemplateStatus | Description                          |\n| ----- | --------------------------- | ------------------------------------ |\n| 0     | Reviewing                   | SMS cannot be sent for now           |\n| 1     | Approved                    | Available for sending                |\n| 2     | Rejected                    | Needs revision and resubmission      |\n| 10    | Cancelled                   | Sign\u002Ftemplate has been cancelled     |\n\n## Error Handling\n\n### Common business error codes\n\n| Error code                       | Description                          | Suggested action                              |\n| -------------------------------- | ------------------------------------ | --------------------------------------------- |\n| isv.SMS_SIGNATURE_SCENE_ILLEGAL  | Signature\u002Ftemplate scene mismatch    | Make sure signature and template scenes align |\n| isv.SMS_TEMPLATE_ILLEGAL         | Template missing or unapproved       | Verify the template has been approved         |\n| isv.SMS_SIGN_NAME_ILLEGAL        | Signature missing or unapproved      | Verify the signature has been approved        |\n| isv.MOBILE_NUMBER_ILLEGAL        | Bad phone number format              | Check the number format                       |\n| isv.AMOUNT_NOT_ENOUGH            | Insufficient account balance         | Top up the SMS quota                          |\n| isv.BUSINESS_LIMIT_CONTROL       | Throttling triggered                 | Reduce the send rate                          |\n| SignatureNotFound                | Signature not found                  | Create the signature in the console           |\n| TemplateNotFound                 | Template not found                   | Create the template in the console            |\n\n> `query-send-details` `ErrCode` = Alibaba `isv.*`\u002F`isp.*` (above) + carrier receipts (`DELIVERED`, `MOBILE_NOT_ON_SERVICE`, `MOBILE_SEND_LIMIT`, …). Full table + triage: [`references\u002Fsms-error-codes.md`](references\u002Fsms-error-codes.md).\n\n### CLI configuration errors\n\n| Error message                | Cause                | Resolution                                     |\n| ---------------------------- | -------------------- | ---------------------------------------------- |\n| InvalidAccessKeyId.NotFound  | Wrong AccessKey ID   | Check the AccessKey ID                         |\n| SignatureDoesNotMatch        | Wrong Secret         | Check the AccessKey Secret                     |\n| Forbidden.RAM                | Insufficient permission | Verify the RAM user has SMS permissions     |\n\n## Execution Flow\n\n1. **Pre-check**: aliyun CLI installed (>= 3.3.3) and dysmsapi plugin available;\n   AI-Mode enabled; credentials configured.\n2. **Validate required parameters** (`phone-numbers`, `sign-name`, `template-code`).\n   If signature or template is missing, ask the user; after consent call\n   `query-sms-sign-list` \u002F `query-sms-template-list` and present approved candidates.\n3. **[Optional, --verify]** Verify sign via `get-sms-sign`: require `SignStatus=1`; also surface `SignIspRegisterDetailList[*].RegisterResult` to the user as info (unregistered carriers may still deliver — do not block).\n4. **[Optional, --verify]** Verify template status via `get-sms-template` (`TemplateStatus=1`).\n5. **Send** via `aliyun dysmsapi send-sms` (or `send-batch-sms` for per-recipient\n   personalization).\n6. **Return result**: `Code=OK` only confirms gateway acceptance — return `BizId`. To report final delivery to the user, always call `query-send-details` (Scenario 4); never use the send response as proof of delivery.\n7. **[MUST]** Disable AI-Mode at every exit (success \u002F failure \u002F cancellation).\n\n## Examples\n\n### Scenario 1: Send a verification code\n\n```bash\n# 1) Pull approved signatures & templates first (so the user can pick)\naliyun dysmsapi query-sms-sign-list     --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\naliyun dysmsapi query-sms-template-list --api-version 2017-05-25 --page-index 1 --page-size 50 --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# 2) Send (after user confirmation)\naliyun dysmsapi send-sms \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000\" \\\n  --sign-name \"YourSign\" --template-code \"SMS_xxx\" \\\n  --template-param '{\"code\":\"123456\"}' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n### Scenario 2: Bulk-send with same signature & params\n\n```bash\naliyun dysmsapi send-sms \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000,13900139000,13700137000\" \\\n  --sign-name \"YourSign\" --template-code \"SMS_xxx\" \\\n  --template-param '{\"activity\":\"Double 11 Sale\",\"discount\":\"50% OFF\"}' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n### Scenario 3: Batch send with per-recipient personalization\n\n```bash\naliyun dysmsapi send-batch-sms \\\n  --api-version 2017-05-25 \\\n  --phone-number-json '[\"13800138000\",\"13900139000\",\"13700137000\"]' \\\n  --sign-name-json    '[\"BrandA\",\"BrandB\",\"BrandC\"]' \\\n  --template-code \"SMS_xxx\" \\\n  --template-param-json '[{\"name\":\"Alice\",\"code\":\"111111\"},{\"name\":\"Bob\",\"code\":\"222222\"},{\"name\":\"Charlie\",\"code\":\"333333\"}]' \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n> Lengths of `--phone-number-json`, `--sign-name-json`, and `--template-param-json` must\n> match and correspond one-to-one.\n\n### Scenario 4: Verify delivery & aggregate statistics\n\n```bash\n# Per-message delivery (uses BizId returned by send-sms)\naliyun dysmsapi query-send-details \\\n  --api-version 2017-05-25 \\\n  --phone-number \"13800138000\" --send-date \"20260326\" --biz-id \"xxx^0\" \\\n  --page-size 10 --current-page 1 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n\n# Range-based aggregated statistics (1 row per send-day)\naliyun dysmsapi query-send-statistics \\\n  --api-version 2017-05-25 --is-globe 1 \\\n  --start-date \"20260301\" --end-date \"20260326\" \\\n  --page-index 1 --page-size 10 \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n> **QuerySendDetails vs QuerySendStatistics**: `query-send-details` returns per-message\n> records (delivery time, error code) — useful for troubleshooting. `query-send-statistics`\n> returns aggregated daily counts — useful for trend reporting.\n\n## Multi-Environment \u002F Multi-Account\n\naliyun CLI supports multiple profiles. Prefer env vars or RAM roles:\n\n```bash\n# Option 1: env vars (recommended)\nexport ALIBABA_CLOUD_ACCESS_KEY_ID=\u003Cyour-access-key-id>\nexport ALIBABA_CLOUD_ACCESS_KEY_SECRET=\u003Cyour-access-key-secret>\n\n# Option 2: profiles (region only; credentials still come from env vars or RAM role)\naliyun configure set --profile prod --region cn-hangzhou\naliyun configure set --profile test --region cn-shanghai\n\naliyun dysmsapi send-sms --profile prod \\\n  --api-version 2017-05-25 \\\n  --phone-numbers \"13800138000\" --sign-name \"Sign\" --template-code \"SMS_xxx\" \\\n  --user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message --read-timeout 3\n```\n\n## Notes\n\n1. **Plugin install**: First-time use requires `aliyun plugin install --names dysmsapi`.\n2. **API version**: When calling the CLI directly, `--api-version 2017-05-25` is mandatory.\n3. **Parameter format**: kebab-case (e.g. `--phone-numbers`, not `--PhoneNumbers`).\n4. **Timeout**: `--read-timeout 3` is required. After a timeout, query the delivery\n   receipt before deciding whether to retry.\n5. **User-Agent**: `--user-agent AlibabaCloud-Agent-Skills\u002Falibabacloud-sms-send-short-message`\n   is required so the server can identify the caller.\n6. **Idempotency**: SendSms\u002FSendBatchSms are NOT idempotent — prevent duplicate sends at\n   the business layer.\n7. **Single vs batch**: Prefer `send-sms` for verification codes; `send-batch-sms` is only\n   needed when each recipient requires different signature or template params (≤ 100).\n8. **Billing**: Billing depends on carrier delivery; API success but carrier failure is\n   not billed. QPS limit is 5000\u002Fs per user.\n9. **Credential safety**: Never hard-code AK\u002FSK; always rely on the default credential\n   chain (env vars \u002F `~\u002F.aliyun\u002Fconfig.json` \u002F ECS RAM role \u002F OIDC).\n10. **Parameter confirmation**: Never guess signature\u002Ftemplate — always ask the user, and\n    after consent fetch `query-sms-sign-list` \u002F `query-sms-template-list` (see\n    \"Interactive Parameter Confirmation\").\n11. **Send-result reporting**: `send-sms` \u002F `send-batch-sms` responses only confirm gateway acceptance (`Code=OK` + `BizId`); they are NOT proof of delivery. Whenever the user asks \"did it arrive?\" \u002F \"was it delivered?\", always call `query-send-details` (use `BizId` for precise lookup) and surface `SendStatus` (1=in-flight, 2=failed, 3=delivered) and `ErrCode` — never reply based on the send-API response alone.\n\n## References\n\n- [Alibaba Cloud CLI documentation](https:\u002F\u002Fhelp.aliyun.com\u002Fzh\u002Fcli\u002F)\n- [SMS Service console](https:\u002F\u002Fdysms.console.aliyun.com\u002F)\n- [SendSms API documentation](https:\u002F\u002Fhelp.aliyun.com\u002Fdocument_detail\u002F419273.html)\n- [Send-status error codes (local)](references\u002Fsms-error-codes.md) — `query-send-details` `ErrCode` (Alibaba `isv.*`\u002F`isp.*` + carrier receipts); upstream: [101347](https:\u002F\u002Fhelp.aliyun.com\u002Fdocument_detail\u002F101347.html) \u002F [101346](https:\u002F\u002Fhelp.aliyun.com\u002Fdocument_detail\u002F101346.html)\n- [SMS qualification query (local)](references\u002Fsms-qualification.md) — `QuerySmsQualificationRecord` \u002F `QuerySingleSmsQualification`\n",{"name":5,"license":15,"metadata":24,"description":30,"compatibility":31},{"owner":25,"domain":26,"contact":27,"ram_policies":28,"implementation":29},"sms-team","cloud-communication","sms-team@alibaba-inc.com","references\u002Fram-policies.md","aliyun-cli","Send short messages (SMS) to specified phone numbers via Alibaba Cloud Short Message Service. Supports verification codes, notification messages, and marketing messages. Use this Skill whenever the user wants to send SMS verification codes, system notifications, order reminders, or marketing campaigns. Supports single send (SendSms, up to 1000 phone numbers sharing the same signature and template parameters) and batch send (SendBatchSms, up to 100 phone numbers, each with its own signature and template parameters). The signature and template approval status can be verified before sending to maximize delivery success rate.\n","aliyun-cli >= 3.3.3 dysmsapi plugin (auto-installed) Requires Alibaba Cloud AccessKey configured via `aliyun configure`\n","main","b08d387cde83fdd23ca4a75f0a74173f810967ec","resources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O","https:\u002F\u002Fjane-zz.me\u002F","金张政 Jane-zz | Agent Engineer · AI Native Builder | Runtime · Context · Evals · GraphRAG | 官方作品集 jane-zz.me","2026-10-04 16:27:52",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add Jane-o-O-o-O\u002Fpersonal-agent --skill alibabacloud-sms-send-short-message",{"tool":46,"command":47},"bunx","bunx skills add Jane-o-O-o-O\u002Fpersonal-agent --skill alibabacloud-sms-send-short-message",{"tool":49,"command":50},"pnpm","pnpm dlx skills add Jane-o-O-o-O\u002Fpersonal-agent --skill alibabacloud-sms-send-short-message","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message\u002FSKILL.md",true,[54,59,63,67],{"path":28,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"REFERENCE","参考文档",2237,"https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message\u002Freferences\u002Fram-policies.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fsms-error-codes.md",14355,"https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message\u002Freferences\u002Fsms-error-codes.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fsms-qualification.md",10049,"https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message\u002Freferences\u002Fsms-qualification.md",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"scripts\u002Fsend_sms.sh","SCRIPT","脚本",19919,"https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Faliyun-aiops-skills\u002Fd22aa735c7e5\u002Fskills\u002Fentcmc\u002Fdysms\u002Falibabacloud-sms-send-short-message\u002Fscripts\u002Fsend_sms.sh",[74,82,89,96,103,110],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7EA3ZT5SZYH1DMJ9XHGK0JK","style-extract","Analyze Yuque documents to extract vocabulary, sentence, and tone patterns into a reusable writing-style profile. Use when the user wants to understand or reproduce their voice or keep documents consistent; trigger phrases include “分析一下我的写作风格”, “用我的风格写一篇...”, “帮我生成一个风格画像”, “extract my writing style”, and “write like me”.","MIT","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Fyuque-skills\u002F2959228ad3e8\u002Fskills\u002Fstyle-extract\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7EA3TK8GT3V1E166QX3B0G0","stale-detector","Scan a Yuque knowledge base for stale or outdated documents and recommend updates or archiving. Use when the user is cleaning up, maintaining, or periodically reviewing a knowledge base; trigger phrases include “帮我检查哪些文档过期了”, “知识库体检”, and “find stale docs”.","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Fyuque-skills\u002F2959228ad3e8\u002Fskills\u002Fstale-detector\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7EA3PEWR596VVPAN0XW3ZFR","smart-summary","Summarize a Yuque document or knowledge base at one-line, key-point, or detailed granularity. Use when the user wants a quick overview of a document or repo; trigger phrases include “帮我总结一下这篇文档”, “这个知识库讲了什么”, and “summarize this doc”.","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Fyuque-skills\u002F2959228ad3e8\u002Fskills\u002Fsmart-summary\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7EA3JCBX7BVSSF0TEZXDJ47","smart-search","Search personal Yuque knowledge bases with natural-language queries and synthesize answers with source links. Use when the user wants to find information in their own documents; trigger phrases include “搜一下我的文档”, “我的知识库里有没有...”, “搜索我的语雀\u002F知识库”, and “search my Yuque”.","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Fyuque-skills\u002F2959228ad3e8\u002Fskills\u002Fsmart-search\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7EA3DDETPJYVCDHAXFBRRG6","reading-digest","Extract core insights, golden quotes, and action items from articles, then create structured Yuque reading notes. Use when the user wants key takeaways or a personal reading-notes base; trigger phrases include “帮我做阅读笔记”, “读书笔记”, and “extract key points from this article”.","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Fyuque-skills\u002F2959228ad3e8\u002Fskills\u002Freading-digest\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":78,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7EA37RF6AY0KCX9KQC1Q2YY","note-refine","Polish rough Yuque notes into structured, readable documents while preserving their meaning. Use when the user wants to clean up a draft, improve layout, or turn fragments into a document; trigger phrases include “帮我整理一下这篇笔记”, “把这个文档排版优化一下”, and “polish my notes”.","https:\u002F\u002Fgithub.com\u002FJane-o-O-o-O\u002Fpersonal-agent\u002Fblob\u002Fmain\u002Fresources\u002Fecosystem\u002Fupstream\u002Fyuque-skills\u002F2959228ad3e8\u002Fskills\u002Fnote-refine\u002FSKILL.md",[],[]]