شعار Multi Account Query

Multi Account Query

مؤسسة
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.

نظرة عامة

الناشرaliyun
المستودعalibabacloud-agent-toolkit
اسم المهارةmulti-account-query
النجوم
29
التفريعات
13
الملفات المرفقة
تعليمات فقط
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها aliyun على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Multi Account Query في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/multi-account-query
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Multi Account Query في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Multi Account Query تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Multi Account Query بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

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.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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.

لماذا تستخدم Multi Account Query على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Multi Account Query عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Multi Account Query في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/multi-account-query. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Multi Account Query؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Multi Account Query؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Multi Account Query معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Multi Account Query مجانية؟

نعم. نشرها aliyun على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇