MCPInstall

alibabacloud-resourcecenter-search

Alibaba Cloud Resource Center - Global Resource Inventory, Search & Statistics Skill. Provides cross-region, cross-product, and cross-account resource inventory, search, and statistical analysis capabilities. Also supports enabling and disabling Resource Center service. Triggers: "resource center", "resource search", "resource inventory", "resource statistics", "cross-account resource", "global resource", "resource count".

Installs
349
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-resourcecenter-search
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads alibabacloud-resourcecenter-search automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

1. Prerequisites

[MUST] CLI User-Agent — Every aliyun CLI command invocation must include: --user-agent AlibabaCloud-Agent-Skills/alibabacloud-resourcecenter-search

[MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution. Run the following commands before any other aliyun CLI invocation:

aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-resourcecenter-search"

Pre-check: Aliyun CLI >= 3.3.3 required Run aliyun version to verify >= 3.3.3. If not installed or version too low, run curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash to install/update, or see references/cli-installation-guide.md for installation instructions. Then [MUST] run aliyun configure set --auto-plugin-install true to enable automatic plugin installation. Then [MUST] run aliyun plugin update to ensure that any existing plugins on your local machine are always up-to-date.

Pre-check: Alibaba Cloud Credentials Required

Security Rules:

  • NEVER read, echo, or print AK/SK values (e.g., echo $ALIBABA_CLOUD_ACCESS_KEY_ID is FORBIDDEN)
  • NEVER ask the user to input AK/SK directly in the conversation or command line
  • NEVER use aliyun configure set with literal credential values
  • ONLY use aliyun configure list to check credential status
aliyun configure list

Check the output for a valid profile (AK, STS, or OAuth identity).

If no valid profile exists, STOP here.

  1. Obtain credentials from Alibaba Cloud Console
  2. Configure credentials outside of this session (via aliyun configure in terminal or environment variables in shell profile)
  3. Return and re-run after aliyun configure list shows a valid profile

[MUST] Disable AI-Mode at EVERY exit point — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed. AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.

aliyun configure ai-mode disable

2. Parameter Confirmation

IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume and use default values without explicit user approval.

ParameterRequired/OptionalDescriptionDefault Value
ScopeRequired (cross-account)Cross-account search scope: Resource Directory ID, Root Folder ID, Folder ID, or Member IDNone
ResourceTypeOptionalResource type (e.g., ACS::ECS::Instance)None (all types)
RegionIdOptionalResource Region ID (e.g., cn-hangzhou)None (all regions)
ResourceIdOptionalResource IDNone
ResourceNameOptionalResource nameNone
VpcIdOptionalVPC ID (e.g., vpc-xxx)None
VSwitchIdOptionalVSwitch (e.g., vsw-xxx)None
IpAddressOptionalIP addressNone
GroupByKeyOptionalStatistics grouping dimension: ResourceType, RegionId, ResourceGroupIdNone
MaxResultsOptionalPage size for paginated APIs.20

3. RAM Policy

See references/ram-policies.md for full permission lists.

Recommended system policies:

  • Read-only: AliyunResourceCenterReadOnlyAccess
  • Full access: AliyunResourceCenterFullAccess

Opening Resource Center will auto-create the service-linked role AliyunServiceRoleForResourceMetaCenter.

Resource Visibility Scope

RAM policies (defined in ram-policies.md) control whether a user can call a Resource Center API. However, for search APIs (SearchResources, GetResourceCounts, GetResourceConfiguration, SearchMultiAccountResources, GetMultiAccountResourceCounts, GetMultiAccountResourceConfiguration), the scope of resources visible in results is determined by each cloud product's own permissions:

Single Account

  • Cloud resource read permissions: A RAM user can only see resources in Resource Center for which they have read-only access on the corresponding cloud product. For example, granting ReadOnlyAccess lets the user see all resources they have access to; granting only AliyunVPCReadOnlyAccess limits visibility to VPC resources.
  • Resource group scoped permissions: If resources are organized by resource groups, you can grant a RAM user read access scoped to a specific resource group. The user will only see resources within that group, achieving resource isolation.

Cross-Account

  • Grant the system policy AliyunResourceCenterFullAccess to the RAM user of the Resource Directory management account to enable cross-account resource search.

4. Core Workflow

Step 1: Identify APIs Based on User Requirements

Determine which APIs are needed based on the user's specific scenario. Refer to the scenario cards below.

Step 2: [MUST] Read API Documentation Before Every CLI Call

CRITICAL WARNING: DO NOT execute any aliyun resourcecenter command without first reading the exact parameter format in references/related-apis.md.

Failure Pattern: Guessing parameters like --filter format will cause errors. The correct JSON structure MUST be copied from the documentation.

Mandatory Action: Open and read the specific API section in references/related-apis.md BEFORE constructing any CLI command.


Scenario Cards

Scenario 1: Service Activation

RequirementAccount TypeAPIDescription
Check if enabledSingle-accountget-resource-center-service-statusReturns service status
Enable serviceSingle-accountenable-resource-centerRequired for first-time use
Check cross-account statusResource Directoryget-multi-account-resource-center-service-statusMulti-account scenario
Enable cross-account serviceResource Directoryenable-multi-account-resource-centerRequires management account or delegated admin

Scenario 2: ResourceType Discovery

RequirementAccount TypeScriptDescription
Find resource type codes by keywordSingle-accountscripts/query-resource-types.pySearch across ResourceType, ProductName, and ResourceTypeName fields

Decision Logic:

  • When you needs to filter by resource type but doesn't know the exact code -> Use this script first
  • After discovering the correct ResourceType code -> Use it in search or count API with --filter parameter

Scenario 3: Resource Search

RequirementAccount ScopeAPIKey Parameters
Search resources by criteriaCurrent accountsearch-resources--filter
Cross-account resource searchResource Directorysearch-multi-account-resources--scope + --filter
Search including deleted resourcesCurrent accountsearch-resources--include-deleted-resources=true

Scenario 4: View Resource Details

RequirementAccount ScopeAPIUse Case
Get single resource configurationCurrent accountget-resource-configurationGet complete configuration details
Batch get multiple resource configurationsCurrent accountbatch-get-resource-configurationsGet multiple resources at once
Get resource configuration from another accountResource Directoryget-multi-account-resource-configurationCross-account view

Scenario 5: Statistics and Analysis

RequirementAccount ScopeAPIGrouping Dimensions
Count resourcesCurrent accountget-resource-countsResourceType, RegionId, ResourceGroupId
Cross-account statisticsResource Directoryget-multi-account-resource-countsResourceType, RegionId, ResourceGroupId

Scenario 6: Tag Discovery

RequirementAccount ScopeAPIDescription
List all tag keysCurrent accountlist-tag-keysBrowse tag catalog
List values for a specific tag keyCurrent accountlist-tag-valuese.g., list all values for env
Cross-account tag keysResource Directorylist-multi-account-tag-keysMulti-account scenario
Cross-account tag valuesResource Directorylist-multi-account-tag-valuesMulti-account scenario

5. Success Verification

See references/verification-method.md for detailed verification steps and commands for each workflow step.


6. Precautions

[MUST] High-Risk Operation Confirmation — Before executing disable-resource-center or disable-multi-account-resource-center:

  1. MUST explicitly inform the user of the impacts:
  • Disable Impact
    • After disabling Resource Center, resource data will no longer be viewable in Resource Center. Specifically:
      • For a single Alibaba Cloud account, after disabling Resource Center, resource data in the current account will no longer be viewable.
      • For the management account of a Resource Directory and the delegated administrator account of Resource Center, disabling Resource Center will also disable the cross-account resource search feature. Resource data in the current account and members of the Resource Directory will no longer be viewable. Additionally, members will not be able to view resource data in their own accounts.
      • After disabling Resource Center, the resource management module on the console homepage, Config Audit service, and other related scenarios will also be unable to view resource data.
  • Disable Restrictions
    • If the management account of a Resource Directory or the delegated administrator account of Resource Center has cross-account resource features enabled by another account, Resource Center cannot be disabled.
    • If there are cloud products or features that have strong dependencies on Resource Center, such as Config Audit and associated resource transfer, you must first disable those cloud products or features before you can disable Resource Center.
  1. MUST obtain explicit user confirmation (e.g., user types "confirm disable" or similar clear affirmation)
  2. DO NOT proceed without user's explicit acknowledgment

Disable Resource Center

Warning: Disabling will remove all resource data and affect dependent services (e.g., Config Audit). Must first disable cross-account if enabled.

aliyun resourcecenter disable-resource-center \
  --user-agent AlibabaCloud-Agent-Skills/alibabacloud-resourcecenter-search

Disable Cross-Account Resource Center

Must be done before disabling single-account resource center (if cross-account is enabled). Requires management account or delegated admin.

aliyun resourcecenter disable-multi-account-resource-center \
  --user-agent AlibabaCloud-Agent-Skills/alibabacloud-resourcecenter-search

7. Best Practices

  1. --user-agent on every Resource Center CLI call — All aliyun resourcecenter examples in this skill include --user-agent AlibabaCloud-Agent-Skills/alibabacloud-resourcecenter-search. When executing commands for this skill, always pass the same flag so usage is consistent with verification, maintainers’ expectations, and any automated checks.
  2. Use filters for targeted search — Combining ResourceType, RegionId, and Tag filters improves search efficiency
  3. Use GroupByKey for quick statistics — Get resource distribution by type, region, or resource group without iterating
  4. Cross-account scope selection — Use the most specific scope (member ID > folder ID > root folder ID > directory ID) to narrow search results
  5. Wait after enabling — Resource Center needs a few minutes to build data after activation; large accounts may take longer
  6. Prefer read-only policies — For daily search and statistics operations, use AliyunResourceCenterReadOnlyAccess for security
  7. ResourceType discovery — When the exact resource type code is unknown, use the helper script documented in Section 8 (run from the skill root directory).
  8. Tag discovery vs tag-filtered search — For “what tag keys/values exist”, use list-tag-keys / list-tag-values (and multi-account variants with --scope). Reserve search-resources for finding resources that match tag conditions.

8. Available scripts

ScriptPurposeUsage
scripts/query-resource-types.pyQueries resource types by keyword from Alibaba Cloud Resource Center; stdout is JSON (resourceTypes, count, keyword, language; failures use success: false and error)python3 scripts/query-resource-types.py <keyword> [--language LANGUAGE]

9. Troubleshooting

When a Resource Center API call or aliyun resourcecenter command fails, read the response’s HTTP status, Code (error code), and Message, then match them against the catalog.

Full error list: references/error-codes.md


10. Reference Links

ReferenceDescription
references/related-apis.mdAll CLI commands list
references/ram-policies.mdRAM permission policies
references/verification-method.mdVerification steps for each workflow
references/error-codes.mdDeduplicated Resource Center API error code catalog (HTTP, Code, Message) and lookup hints
references/cli-installation-guide.mdAliyun CLI installation guide
references/acceptance-criteria.mdFor maintainers/CI only: Skill testing acceptance criteria, correct CLI command patterns, parameter validation rules. Note: This document is intended for human maintainers and automated testing, not required reading for end users.

FAQ

What does the alibabacloud-resourcecenter-search skill do?

Alibaba Cloud Resource Center - Global Resource Inventory, Search & Statistics Skill. Provides cross-region, cross-product, and cross-account resource inventory, search, and statistical analysis capabilities. Also supports enabling and disabling Resource Center service. Triggers: "resource center", "resource search", "resource inventory", "resource statistics", "cross-account resource", "global resource", "resource count".

How do I install alibabacloud-resourcecenter-search?

Run npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-resourcecenter-search in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/alibabacloud-resourcecenter-search/ (personal) or .claude/skills/alibabacloud-resourcecenter-search/ (project).

Which AI agents can use alibabacloud-resourcecenter-search?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is alibabacloud-resourcecenter-search safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains alibabacloud-resourcecenter-search?

It is published by aliyun in aliyun/alibabacloud-aiops-skills. It has 349 recorded installs.

More from aliyun/alibabacloud-aiops-skills

View all →

alibabacloud-find-skills

aliyun/alibabacloud-aiops-skills

Use 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".

AI & Agents2.2K installs

alibabacloud-dms-skill

aliyun/alibabacloud-aiops-skills

Alibaba Cloud DMS Database Read/Write Skill. Use this skill to search for target databases in DMS and execute SQL queries and data modifications. Triggers: "DMS query", "database query", "execute SQL", "search database", "DMS SQL", "insert data", "update data".

Data & Databases2.1K installs

alibabacloud-sls-query

aliyun/alibabacloud-aiops-skills

Alibaba Cloud SLS (Simple Log Service) log query & analysis skill. Use this skill to help users write, explain, optimize, execute, or troubleshoot SLS index search, SQL analytics, and SPL scan/pipeline statements through the aliyun CLI. Triggers: "SLS 查询", "SLS 分析", "日志查询", "日志分析", "log query", "analyze sls logs", "aliyun log query".

Data & Databases2K installs

alibabacloud-workbench-cli

aliyun/alibabacloud-aiops-skills

Agent-native CLI for managing ECS instances without public IPs, primarily for single-instance operations. It supports millisecond-level remote command execution, large file transfers up to 1GB, and TCP port forwarding. It offers four authentication modes: AK, RamRoleArn, CredentialsCmd, and CredentialsURI. Use it to run commands, deploy code, view logs, check processes, transfer files, set up port forwarding, or query and filter ECS instance lists.

DevOps & Cloud717 installs

alibabacloud-ecs-diagnose

aliyun/alibabacloud-aiops-skills

Comprehensive Alibaba Cloud ECS instance diagnostics skill. Performs systematic troubleshooting including cloud platform status checks and GuestOS internal diagnostics via Cloud Assistant. Use when users report server connectivity issues, SSH timeout, instance lag, website unavailability, disk full, CPU/memory alerts, system event notifications, or abnormal instance status. Triggers: "ECS", "instance", "server", "cannot connect", "SSH", "timeout", "slow", "disk full", "network", "CPU high", "memory high", "status check", "system event", "diagnose", "troubleshoot", "disk performance", "disk IO slow", "IOPS", "IO latency"

Backend & APIs686 installs

alibabacloud-cli-guidance

aliyun/alibabacloud-aiops-skills

Guide users to manage Alibaba Cloud resources using the Aliyun CLI command-line tool. Covers CLI installation, credential configuration, plugin management, command construction, and error troubleshooting. Use this skill when the user wants to operate Alibaba Cloud services from the terminal — including ECS (云服务器, cloud servers), Function Compute (函数计算, serverless), RDS (云数据库, databases), OSS (对象存储, object storage), SLS (日志服务, log service), VPC (专有网络, networking), ESS (弹性伸缩, auto scaling), and any other Alibaba Cloud product. Also use when the user mentions "aliyun", "阿里云", "阿里云CLI", "命令行", asks about CLI plugin installation, encounters Aliyun CLI errors (InvalidAccessKeyId, SignatureDoesNotMatch, Throttling), or needs help constructing aliyun commands with correct parameter syntax.

585 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs