/alibabacloud-core:multi-account-queryfrom alibabacloud-core
Resolves Alibaba Cloud member account aliases to UIDs via ResourceDirectory and assumes roles for cross-account CLI queries. Use when querying resources across multiple accounts.
Ships in alibabacloud-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Query Alibaba Cloud resources across member accounts in a Resource Directory (RD) organization. When the user refers to an account by its display name (alias) rather than its UID, this skill resolves the alias first, then assumes into the target account to execute the actual resource query.
This skill resolves the cross-account routing layer only — alias→UID,
plus the assume-role hop. If the user's actual request is a multi-account
solution pattern — key rotation across all members, drift / cost / RAM
audits, billing aggregation, organization-wide compliance scans — invoke
alibabacloud-find-skills first; a packaged multi-account-ops skill captures
the full workflow (iteration, error rollup, reporting), not just the
cross-account hop. Use this skill directly only when the user just needs the
routing primitive for a single-shot query. Full trigger conditions are in
mcp-core-best-practices → Skill Discovery.
resourcedirectory:ListAccounts permission.ResourceDirectoryAccountAccessRole) must
exist in target member accounts.If the user explicitly provides an account ID (UID), skip to step 3.
If the user refers to an account by display name, alias, or any non-numeric identifier, proceed to step 2 to resolve it.
Use AlibabaCloud___CallCLI to list member accounts. The API returns at most 100
accounts per page, so always set --page-size 100 and handle pagination when the
organization has more than 100 accounts:
aliyun resourcedirectorymaster list-accounts --page-size 100 --page-number 1
From the response, find the account whose DisplayName matches the user's input.
Extract its AccountId field — this is the UID needed for cross-account access.
If the target is not found in the first page, increment --page-number and continue
fetching until the target is found or all pages are exhausted (total account count is
returned in the response's TotalCount field).
If no match is found, report to the user and ask for clarification. Do not guess account IDs.
When calling AlibabaCloud___CallCLI for the actual resource query, pass the
x_assume_account_id parameter with the resolved UID. This tells the MCP server
to assume into the target account before executing the command.
Example — list ECS instances in member account "dev-team":
# Step 1: Resolve "dev-team" to its UID
AlibabaCloud___CallCLI(command="aliyun resourcedirectorymaster list-accounts --page-size 100 --page-number 1")
# → find AccountId where DisplayName == "dev-team", e.g. "1234567890123456"
# → if not found and TotalCount > 100, continue with --page-number 2, 3, ...
# Step 2: Query resources in that account
AlibabaCloud___CallCLI(
command="aliyun ecs describe-instances --region cn-hangzhou",
x_assume_account_id="1234567890123456"
)
Return the query results to the user. If the user asks about multiple accounts, repeat steps 2–3 for each account, or iterate over all accounts from the ListAccounts response.
| Parameter | Description |
|---|---|
x_assume_account_id | Target member account UID. The MCP server assumes into this account using the default cross-account role. |
x_assume_role_name | Override the default role name if the target account uses a custom role (default: ResourceDirectoryAccountAccessRole). |
x_assume_role_arn | Full ARN of the role to assume. Takes highest priority over account_id + role_name. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aliyun/alibabacloud-agent-toolkit --plugin alibabacloud-core10 skills in this plugin
/alibabacloud-cli-cost-estimationPre-execution cost estimation for Alibaba Cloud CLI operations. Use this skill whenever a user asks "how much will this cost", before executing any chargeable operation (create / resize / renew / bandwidth change), or when planning a multi-step workflow whose total cost should be known up front. Covers the --estimate-cost flag (quote without executing), --estimate-cost-context (usage assumptions and future-state overrides for multi-step workflows), reading the quote JSON correctly (pricingMode, pricingUnit, delta amounts), and reconciling quotes against actual bills.
/alibabacloud-cli-guidanceGuide for Alibaba Cloud CLI (aliyun) command syntax, plugin system, parameter naming, and best practices. Use this skill to generate correct CLI commands, understand plugin vs built-in command differences, structured parameter syntax, output filtering, pagination, and error troubleshooting. This skill is a CLI knowledge reference — when MCP tools (AlibabaCloud___CallCLI, etc.) are available, always prefer MCP tools for execution rather than running aliyun commands locally in the shell.
/alibabacloud-find-skillsUse this skill when users want to search, discover, browse, or find Alibaba Cloud (阿里云) agent skills. Triggers include: "find a skill for X", "search alicloud skills", "阿里云有什么 skill","阿里云", "搜索阿里云技能", "有没有管理 ECS/RDS/OSS 的 skill", "阿里云 skills 有哪些类目", "帮我找一个 skill", "browse alicloud skills", "list alicloud skill categories", "is there an alicloud skill that can...", "what alicloud skills are available", "XX Skill 的内容是什么", "我想了解阿里云 XX Skill 具体做什么","帮我安装阿里云 Skill","使用阿里云相关的skill", "阿里云 agent skill 市场", "搜一下阿里云的 skill", "建一个数据分析项目有没有相关 skill".
Other plugins' skills for the same job