Logo di Multi Account Query

Multi Account Query

Organizzazione
aliyun
multi-account-query

Query Alibaba Cloud resources across multiple accounts in a Resource Directory. Resolves member account aliases to UIDs via ResourceDirectory ListAccounts, then uses x_assume_account_id to assume into the target account for CLI calls. Use when the user references a member account by display name or alias, or explicitly asks to query resources in another account under the same RD. MUST be loaded for any cross-account or member-account operation before calling AlibabaCloud___CallCLI with x_assume_account_id.

Panoramica

Autorealiyun
Repositoryalibabacloud-agent-toolkit
Nome della skillmulti-account-query
Stelle
29
Fork
13
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da aliyun su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Multi Account Query in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/multi-account-query
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aliyun/alibabacloud-agent-toolkit.git /tmp/alibabacloud-agent-toolkit
mkdir -p .claude/skills
cp -r /tmp/alibabacloud-agent-toolkit/plugins/alibabacloud-core/skills/multi-account-query .claude/skills/multi-account-query
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Multi Account Query in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Multi Account Query non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Multi Account Query non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Multi-Account Resource Query

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.

Scope Check Before You Start

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.

Prerequisites

  • The current credentials must belong to an RD management account (or a delegated administrator) with resourcedirectory:ListAccounts permission.
  • A cross-account assume role (default: ResourceDirectoryAccountAccessRole) must exist in target member accounts.

Workflow

1. Determine Whether Cross-Account Access Is Needed

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.

2. Resolve Account Alias to UID

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.

3. Execute the Resource Query in the Target Account

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"
)

4. Present Results

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 Reference

ParameterDescription
x_assume_account_idTarget member account UID. The MCP server assumes into this account using the default cross-account role.
x_assume_role_nameOverride the default role name if the target account uses a custom role (default: ResourceDirectoryAccountAccessRole).
x_assume_role_arnFull ARN of the role to assume. Takes highest priority over account_id + role_name.

Error Handling

  • AccessDenied on ListAccounts: The current credentials lack RD read permission. Ask the user to verify they are using the management account.
  • AssumeRole failed: The target account may not have the expected role, or the role trust policy does not allow the current account. Report the error and suggest the user check the role configuration.
  • Account not found: The display name does not match any member account. List available account names to help the user pick the correct one.

Guardrails

  • Always resolve aliases via the ListAccounts API. Never guess or hardcode account IDs.
  • Do not cache account lists across conversations — accounts can be added or removed at any time.
  • When iterating over multiple accounts, include the account display name and ID in the output so the user can verify correctness.
  • Respect the principle of least privilege: only query the resources the user asked about, do not enumerate all resources in all accounts unless explicitly requested.

Domande frequenti

Cosa fa la skill IA Multi Account Query?

Query Alibaba Cloud resources across multiple accounts in a Resource Directory. Resolves member account aliases to UIDs via ResourceDirectory ListAccounts, then uses x_assume_account_id to assume into the target account for CLI calls. Use when the user references a member account by display name or alias, or explicitly asks to query resources in another account under the same RD. MUST be loaded for any cross-account or member-account operation before calling AlibabaCloud___CallCLI with x_assume_account_id.

Perché usare Multi Account Query su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Multi Account Query è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Multi Account Query in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/multi-account-query. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Multi Account Query?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Multi Account Query?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Multi Account Query: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Multi Account Query è gratuita?

Sì. È pubblicata su GitHub da aliyun con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇