Alibabacloud Cli Guidanceのロゴ

Alibabacloud Cli Guidance

組織
aliyun
alibabacloud-cli-guidance

Guide 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.

概要

公開者aliyun
リポジトリalibabacloud-agent-toolkit
スキル名alibabacloud-cli-guidance
スター
29
フォーク
13
同梱ファイル
4
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    aliyunがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Alibabacloud Cli Guidance」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/alibabacloud-cli-guidance
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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/alibabacloud-cli-guidance .claude/skills/alibabacloud-cli-guidance
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAlibabacloud Cli Guidanceを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAlibabacloud Cli Guidanceを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Alibabacloud Cli Guidanceは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Aliyun CLI Expert

Guide for managing Alibaba Cloud resources using the aliyun command-line tool.

MCP Tools vs Local CLI Execution

IMPORTANT: This skill provides CLI command knowledge and syntax guidance. It does NOT mean you should always run aliyun commands locally in the shell.

Execution priority:

  1. MCP tools (highest priority) — When AlibabaCloud___CallCLI and other MCP tools are available, always use them for API execution. MCP tools handle authentication, cross-account access (x_assume_account_id), and output filtering (x_output_jmespath_filter) without requiring local CLI installation or configuration.

  2. Local CLI (fallback) — Only use local aliyun commands in the Bash tool when:

    • MCP tools are not available or not configured
    • The operation requires local file system access (e.g., aliyun oss cp, aliyun ossutil sync)
    • The user explicitly asks for a local CLI command to copy/paste or use in scripts
    • The user needs to install/configure the CLI itself

Use this skill's knowledge for:

  • Understanding correct command syntax when calling AlibabaCloud___CallCLI
  • Generating CLI commands via AlibabaCloud___GenerateCLICommand
  • Knowing the difference between plugin-style and built-in-style commands
  • Understanding parameter naming conventions (especially --biz- prefixes)
  • Troubleshooting CLI errors returned by MCP or local execution
  • Guiding users who want to run commands locally in their own terminals

Pivot to alibabacloud-find-skills when: the user's request reads as a solution pattern (batch ops, audits, rotations, scheduled cleanup, runbooks) or targets a product not covered by any in-plugin skill — a packaged official skill usually beats hand-rolled CLI sequences. See mcp-core-best-practices → Skill Discovery for the full trigger list.

Agent Execution: AI-mode and User-Agent

Only applicable when running aliyun commands locally (not via MCP tools).

Skill identifier: AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance

Use exactly one way to attach this skill to requests. Do not combine AI-mode (configure ai-mode + set-user-agent) with ALIBABA_CLOUD_USER_AGENT or a per-command env prefix for the same skill token — the CLI stacks those sources, and User-Agent / attribution will duplicate (bad for telemetry).

PathWhen to useStartEnd / cleanup
A — AI-mode (preferred for agents)Agent session, many aliyun callsaliyun configure ai-mode enable then aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance"[MUST] aliyun configure ai-mode disable before the final response on every exit (success, failure, error, cancel, session end). Do not export ALIBABA_CLOUD_USER_AGENT to the same value while AI-mode is on.
B — Environment or one-shotOne-off commands, scripts without configure, or no AI-modeexport ALIBABA_CLOUD_USER_AGENT=AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance for the session, or prefix each API call: ALIBABA_CLOUD_USER_AGENT=AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance aliyun ...If you used export, run unset ALIBABA_CLOUD_USER_AGENT when done so other skills are not mis-attributed. Inline prefix needs no unset. Do not enable AI-mode on path B for the same skill string.

Pre-check: Aliyun CLI >= 3.3.3 required — Run aliyun version. If too low: curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash or see references/installation-guide.md.

Pre-check: Aliyun CLI plugin update required — [MUST] aliyun configure set --auto-plugin-install true; [MUST] aliyun plugin update.

CLI Version Milestones

From versionWhat you gain
>= 3.3.3Baseline for product plugins and flows in this skill.
>= 3.3.5aliyun upgrade — update the CLI from the binary itself.
>= 3.3.8aliyun plugin show --name <plugin> — details for an installed plugin.

Instructions

1. Install and Configure the CLI

If the user hasn't installed or configured the CLI, guide them through setup. See ./references/installation-guide.md for full details. Quick path:

bash
# Install or update (macOS / Linux — one command)
/bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)"

After the CLI is at 3.3.5 or newer, routine self-updates can use aliyun upgrade.

OAuth (browser login)

When a browser can be opened on the same machine, prefer OAuth over storing AccessKey pairs. Requires CLI 3.0.299 or later. Not suitable for headless environments.

bash
aliyun configure --profile <your-profile-name> --mode OAuth
Environment variables (headless / CI/CD)
bash
export ALIBABA_CLOUD_ACCESS_KEY_ID=<key-id>
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<key-secret>
export ALIBABA_CLOUD_REGION_ID=cn-hangzhou
# Temporary credentials (StsToken) — add:
# export ALIBABA_CLOUD_SECURITY_TOKEN=<sts-token>

# Verify
aliyun version      # Should be >= 3.3.3
aliyun ecs describe-regions   # Tests authentication
Authentication modes
ModeWhen to useEnvironment variables
AKDevelopment, long-lived credentialsALIBABA_CLOUD_ACCESS_KEY_ID, ALIBABA_CLOUD_ACCESS_KEY_SECRET, ALIBABA_CLOUD_REGION_ID
StsTokenCI/CD, temporary credentialsSame as AK, plus ALIBABA_CLOUD_SECURITY_TOKEN
RamRoleArnAfter AssumeRole or cross-account sessionSame variables as StsToken

2. Consult --help Before Constructing Any Command

Built-in commands have inconsistent parameter naming across APIs. Running --help first is the authoritative source:

bash
aliyun <product> --help                # Discover available subcommands
aliyun <product> <subcommand> --help   # Get exact parameter names, types, structure

When a plugin is installed, aliyun <product> --help shows plugin help. To view legacy built-in help instead:

bash
ALIBABA_CLOUD_ORIGINAL_PRODUCT_HELP=true aliyun ecs --help

3. Ensure Service Plugins Are Available

Each Alibaba Cloud product has a CLI plugin. Plugins provide consistent kebab-case commands with comprehensive help:

bash
aliyun plugin install --names ecs     # Install (short name, case-insensitive)
aliyun plugin install --names ECS VPC RDS   # Multiple at once
aliyun plugin list                    # Installed plugins
aliyun plugin list-remote             # All available plugins
aliyun plugin search <keyword>        # Search by keyword
aliyun plugin show --name ecs         # >= 3.3.8 — details for one installed plugin

4. Prefer Plugin Commands Over Built-in Commands

The CLI has two command styles, and the subcommand casing determines which system handles it:

  • All-lowercase subcommand -> routed to plugin (CLI Native style)
  • Contains uppercase -> routed to built-in (OpenAPI style)
bash
# Plugin (preferred): consistent kebab-case
aliyun ecs describe-instances --biz-region-id cn-hangzhou

# Built-in (fallback): PascalCase subcommand, inconsistent params
aliyun ecs DescribeInstances --RegionId cn-hangzhou

Note for MCP tools: AlibabaCloud___CallCLI uses OpenAPI-style (PascalCase) commands. The plugin-style commands are for local CLI execution. When generating commands for MCP execution, use PascalCase subcommands (e.g., aliyun ecs DescribeInstances).

AspectPlugin (CLI Native)Built-in (OpenAPI)
Subcommanddescribe-instancesDescribeInstances
Parameterskebab-case (consistent)Mixed (inconsistent)
ROA BodyExpanded to individual paramsSingle --body JSON
Header paramsVisible in help, usable directlyHidden, manual --header only
HelpComprehensive with structureBasic

5. Understand Global vs Business Parameter Naming

The CLI plugin system reserves certain global parameters:

  • --region-id / --region — controls which API endpoint the request is sent to.
  • Other globals: --profile, --api-version, --output, etc.

Many APIs also define their own RegionId parameter. The plugin resolves this with:

  1. --biz- prefix (default): API's RegionId becomes --biz-region-id
  2. --<product>- prefix (fallback): if --biz-region-id is already taken

Always check --help for the actual parameter name.

6. Use Structured Parameter Syntax

Plugins support structured input that the framework serializes automatically:

bash
--instance-id i-abc123                                  # single value
--security-group-ids sg-001 sg-002 sg-003               # space-separated list
--tag Key=env Value=prod --tag Key=app Value=web        # repeatable key-value
--data-disk '{"DiskName":"d1","Size":100}'              # complex structure (JSON)

7. OSS Uses Custom Commands

Unlike other products, OSS has a hand-written implementation with custom command syntax. API-style commands like PutBucket do not exist for OSS:

bash
aliyun oss --help        # Basic operations (cp, ls, mb, rm, etc.)
aliyun ossutil --help    # Advanced utilities (sync, stat, etc.)

Note: OSS file operations (cp, sync, etc.) require local file system access. These cannot be run via MCP tools — use the Bash tool directly.

8. Filter and Format Output

bash
# JMESPath filter
aliyun ecs describe-instances \
  --biz-region-id cn-hangzhou \
  --cli-query "Instances.Instance[?Status=='Running'].{ID:InstanceId,Name:InstanceName}"

# Output formats
aliyun ecs describe-instances --biz-region-id cn-hangzhou --output table
aliyun ecs describe-instances --biz-region-id cn-hangzhou --output cols=InstanceId,InstanceName,Status rows="Instances.Instance[]"

Note for MCP tools: Use x_output_jmespath_filter parameter instead of --cli-query.

9. Pagination

bash
aliyun ecs describe-instances \
  --biz-region-id cn-hangzhou \
  --page-number 1 \
  --page-size 50

# Auto-paginate all pages
aliyun ecs describe-instances \
  --biz-region-id cn-hangzhou \
  --pager path='Instances.Instance[]' PageNumber=PageNumber PageSize=PageSize

10. Wait for Resource State

bash
aliyun vpc describe-vpc-attribute \
  --biz-region-id cn-shanghai \
  --vpc-id <your-vpc-id> \
  --waiter expr='Status' to='Available'

11. Debugging

  • --log-level debug — detailed request/response logs
  • --cli-dry-run — validate command without executing
  • ALIBABA_CLOUD_CLI_LOG_CONFIG=debug — environment variable for global debug

For 403, Forbidden, NoPermission, see ./references/ram-policies.md.

12. Multi-Version API Support

Some products ship multiple API versions:

bash
aliyun <product> list-api-versions
aliyun ess describe-scaling-groups --api-version 2022-02-22 --biz-region-id cn-hangzhou

Set default version via environment variable:

bash
export ALIBABA_CLOUD_ESS_API_VERSION=2022-02-22

Global Flags Reference

FlagPurpose
--region <region>API endpoint region (global, not business region)
--profile <name>Use a named credential profile
--api-version <ver>Override API version for this command
--output json|table|cols=...Response format
--cli-query <jmespath>JMESPath filter on response
--log-level debugVerbose request/response logging
--cli-dry-runValidate without executing
--endpoint <url>Override service endpoint
--retry <n>Retry count for failed requests
--quietSuppress output
--pagerAuto-merge all pages for pageable APIs

References

  • ./references/installation-guide.md — Installation, configuration modes, credential setup
  • ./references/command-syntax.md — Complete command syntax guide
  • ./references/global-flags.md — Global flags reference
  • ./references/ram-policies.md — On-demand RAM, least privilege, common permission errors

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Alibabacloud Cli Guidance」では何ができますか?

Guide 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.

TypingMindでAlibabacloud Cli Guidanceを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Alibabacloud Cli Guidanceはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAlibabacloud Cli Guidanceをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/alibabacloud-cli-guidanceを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Alibabacloud Cli Guidanceを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Alibabacloud Cli Guidanceで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAlibabacloud Cli Guidanceを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Alibabacloud Cli Guidance」は無料ですか?

はい。aliyunがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇