Logo von Alibabacloud Mcp Core Script Generate

Alibabacloud Mcp Core Script Generate

Organisation
aliyun
alibabacloud-mcp-core-script-generate

Generate Alibaba Cloud MCP Core RunScript-compatible Python scripts from natural-language cloud operation requests. Use when the user explicitly asks for RunScript scripts, MCP Core scripts, or sandbox-compatible cloud automation code. For standard SDK Python code with imports and credentials, use `alibabacloud-sdk-usage` instead.

Übersicht

Herausgeberaliyun
Repositoryalibabacloud-agent-toolkit
Skill-Namealibabacloud-mcp-core-script-generate
Sterne
29
Forks
13
Mitgelieferte Dateien
2
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 2

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von aliyun auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Alibabacloud Mcp Core Script Generate in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/alibabacloud-mcp-core-script-generate
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

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-mcp-core-script-generate .claude/skills/alibabacloud-mcp-core-script-generate
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Alibabacloud Mcp Core Script Generate in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Alibabacloud Mcp Core Script Generate automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Alibabacloud Mcp Core Script Generate nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Alibaba Cloud Script Generator

Turn a natural-language Alibaba Cloud request into one RunScript-compatible Python script. The script must use await call_cli(...), assign the final value to result, and pass check_sandbox.py validation before output. Do not execute the script unless the user asks.

Scope Check Before You Start

  • RunScript sandbox scripts (this skill): generates call_cli()-based Python for the RunScript sandbox — no SDK imports, no credentials, no local execution.
  • SDK project code → alibabacloud-sdk-usage: generates typed/generic SDK code with imports, credential providers, and dependency management for user projects.
  • Operational patterns (batch ops, audits, rotations) → alibabacloud-find-skills first.

Workflow

  1. Split the request into atomic cloud operations. For each operation, you must call at least one of the following methods to discover API parameters before writing any code:

    Method A — MCP tools (preferred): call AlibabaCloud___SearchApis with a natural language description, then AlibabaCloud___GetApiDefinition with the confirmed product, action, and version. Batch search calls in one parallel round.

    Method B — HTTP metadata (when MCP tools return errors): The endpoint https://next.api.aliyun.com/meta/v1/products/{product}/versions/{version}/api-docs.json contains all API definitions for a product. If WebFetch cannot extract the target API (response too large), download the full JSON with curl and extract the target API's parameters array using python3 -c "import json,sys; ..." or grep.

    You must actually execute one of these methods — reading about them is not sufficient. Only if your tool call returns an error may you fall back to best-known parameter names, adding: # WARNING: API parameters not verified — confirm before use.

  2. Generate one Python script body following the Sandbox Contract and Script Patterns below. Only whitelisted modules may be imported. When multiple tool calls are needed, batch them in parallel. Never repeat the same tool call with the same arguments.

  3. Write to /tmp/aliyun-runscript.py and validate with the local sandbox checker (<SKILL_DIR>/scripts/check_sandbox.py):

    bash
    cat > /tmp/aliyun-runscript.py <<'PYEOF'
    <script body here>
    PYEOF
    python3 <SKILL_DIR>/scripts/check_sandbox.py /tmp/aliyun-runscript.py
  4. If validation fails, read the → fix suggestion for each violation, fix ONLY the listed issues, and re-validate. Maximum 3 rounds. If violations persist, show them to the user.

  5. After validation passes, output only the Python script body — no Markdown fences, headings, or explanatory text unless the user asks.

Sandbox Contract

All rules below are enforced by scripts/check_sandbox.py (local pre-check) and remote validation. See references/runscript-contract.md for full definitions with examples.

CategoryRule
ImportsOnly whitelisted modules may be imported: asyncio, collections, csv, dataclasses, datetime, decimal, enum, fractions, functools, itertools, json, math, re, statistics, string, time, typing, uuid. Do NOT import random, os, subprocess, requests, or any module not in this list. call_cli is pre-injected — do NOT import or define it.
API callsUse ONLY call_cli(product, version, action, params). Pre-injected. No SDK clients, no HTTP requests, no subprocess. Parameter values must be plain strings/numbers — do NOT pass aliyun ... CLI command strings as parameter values.
Param valuesParameter values must be plain strings/numbers — do NOT pass aliyun ... CLI command strings as parameter values. Query APIs to fetch exact values when unsure.
OutputAssign final data to result (dict or list). No print().
ConcurrencyParallel API calls must use asyncio.gather(return_exceptions=True). Thread/process-based concurrency (threading, multiprocessing, concurrent.futures) is not in the whitelist and will fail validation.
Forbiddenos, subprocess, socket, requests, eval, exec, compile, getattr, setattr, globals, input, breakpoint, __import__, threading, multiprocessing, concurrent.futures, dunder chains.
Blocked APIsCredential-returning APIs (ram.ListAccessKeys, sts.AssumeRole, kms.GetSecretValue). CLI meta products (configure, plugin, ossutil).
Structurecall_cli must be reachable from module-level execution. Do NOT wrap all calls in an uninvoked async def — either write await call_cli(...) at top level, or define a function and call it: async def main(): ... \n await main().
NumbersDo NOT use leading zeros in numeric literals (e.g., 01, 010). Write 1, 10 instead. IP addresses and CIDR blocks must be strings: "10.0.0.0/8", not bare numbers.
StringsUse f-strings or .format() only with constant format strings. Do NOT build call_cli arguments dynamically via str.format(variable) or % formatting with non-constant args.
Sleeptime.sleep() argument MUST be ≤ 30. For longer waits, use a loop: for _ in range(N): time.sleep(30).
Output formatOutput ONLY Python code. Do NOT output prose, explanations, or markdown before or after the code. If you must add context, use Python comments inside the script — but avoid comments unless absolutely necessary.
OtherWrite/delete/update ops execute directly — the RunScript runtime intercepts write operations and presents them to the user for approval (HITL) before execution. The script itself should not add confirmation prompts.

Script Patterns

Sequential (dependent calls):

python
vpc = await call_cli(product="Vpc", version="2016-04-28", action="CreateVpc", params={"RegionId": region_id, "CidrBlock": "10.0.0.0/8"})
vsw = await call_cli(product="Vpc", version="2016-04-28", action="CreateVSwitch", params={"VpcId": vpc["VpcId"], "CidrBlock": "10.0.0.0/16", "ZoneId": "cn-hangzhou-a"})
result = {"VpcId": vpc["VpcId"], "VSwitchId": vsw["VSwitchId"]}

Pagination (list tasks):

python
items, page = [], 1
while True:
    resp = await call_cli(product="Ecs", version="2014-05-26", action="DescribeInstances", params={"RegionId": region_id, "PageNumber": page, "PageSize": 100})
    batch = resp.get("Instances", {}).get("Instance", [])
    items.extend(batch)
    if len(batch) < 100:
        break
    page += 1
result = items

Parallel (independent calls):

python
responses = await asyncio.gather(*[
    call_cli(product="Ecs", version="2014-05-26", action="DescribeInstances", params={"RegionId": rid})
    for rid in region_ids
], return_exceptions=True)
result = {rid: r if isinstance(r, dict) else {"error": str(r)} for rid, r in zip(region_ids, responses)}

Guardrails

  • Do not execute the generated script unless the user explicitly asks.
  • Do not use any MCP server except the local alibabacloud-core server for API discovery.
  • Do not generate boilerplate, redundant error handling, or unused imports.
  • Always validate before output. Do not skip validation.
  • If the request is ambiguous but not dangerous, use placeholders instead of asking. Use the pre-injected runtime variable (e.g. region_id) or a string placeholder like "<your-vpc-name>".

References

  • references/runscript-contract.md — full rule definitions and additional patterns. Read only when validation fails repeatedly.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Alibabacloud Mcp Core Script Generate?

Generate Alibaba Cloud MCP Core RunScript-compatible Python scripts from natural-language cloud operation requests. Use when the user explicitly asks for RunScript scripts, MCP Core scripts, or sandbox-compatible cloud automation code. For standard SDK Python code with imports and credentials, use `alibabacloud-sdk-usage` instead.

Warum Alibabacloud Mcp Core Script Generate in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Alibabacloud Mcp Core Script Generate besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Alibabacloud Mcp Core Script Generate in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/aliyun/alibabacloud-agent-toolkit/tree/main/plugins/alibabacloud-core/skills/alibabacloud-mcp-core-script-generate ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Alibabacloud Mcp Core Script Generate nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Alibabacloud Mcp Core Script Generate verwenden?

So viele Sie möchten. In TypingMind können Sie Alibabacloud Mcp Core Script Generate mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Alibabacloud Mcp Core Script Generate kostenlos?

Ja. Der Skill wird von aliyun auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇