La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Desarrollo · SKILL.md

automation-pilot-executor-executescript

automation-pilot-executor-executescript

Master the ExecuteScript executor for Automation Pilot commands. Covers script execution parameters, Base64 encoding, timeout/exit code handling, stdin/parameters/environment patterns, and language-specific commands (Python, Node.js, PowerShell). Use when building commands that execute shell scripts or custom code.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: automation-pilot-executor-executescript description: Master the ExecuteScript executor for Automation Pilot commands. Covers script execution parameters, Base64 encoding, timeout/exit code handling, stdin/parameters/environment patterns, and language-specific commands (Python, Node.js, PowerShell). Use when building commands that execute shell scripts or custom code.

Script Execution Guide

SAP Automation Pilot provides dedicated commands for each script language. Choose the right command for your language — do not use ExecuteScript as a bash wrapper to run Python, Node.js, or PowerShell.

Command Overview

CommandIDUse for
ExecuteScript:1scripts-sapcp:ExecuteScript:1Bash (legacy, Base64 script)
ExecuteScript:2scripts-sapcp:ExecuteScript:2Bash (recommended, plain text)
ExecutePythonScript:1scripts-sapcp:ExecutePythonScript:1Python scripts
ExecuteNodeJsScript:1scripts-sapcp:ExecuteNodeJsScript:1Node.js scripts
ExecutePowerShellScript:1scripts-sapcp:ExecutePowerShellScript:1PowerShell scripts

Each command also has a Sensitive* variant (e.g. SensitiveExecutePythonScript:1) that marks the output as sensitive so it is never logged.


ExecuteScript (Bash)

Version Differences (CRITICAL)

Version 1 (scripts-sapcp:ExecuteScript:1): script and stdin must be Base64-encoded
Version 2 (scripts-sapcp:ExecuteScript:2): Plain text — always prefer this

ParameterTypeRequiredDefaultNotes
scriptstring✅-V1: Base64 encoded / V2: Plain text
stdinstring❌-Sensitive. V1: Base64 / V2: Plain text. Multiple values: \n separator
parametersarray❌[]Passed as $1, $2, $3... in order
environmentobject❌{}Available as shell environment variables
timeoutnumber❌30Range: 15–600s
successExitCodesarray❌["0"]Use ["x"] to accept any exit code

Output keys: exitCode (number), result (array of output lines, last 64 KB)

Example

{
  "execute": "scripts-sapcp:ExecuteScript:2",
  "input": {
    "script": "echo \"$1 $2\"",
    "parameters": "[\"Hello\", \"World\"]",
    "timeout": "30"
  },
  "alias": "runScript",
  "description": null,
  "progressMessage": null,
  "initialDelay": null,
  "pause": null,
  "when": null,
  "validate": null,
  "autoRetry": null,
  "repeat": null,
  "errorMessages": [],
  "dryRun": null
}

Stdin (Sensitive Data)

{
  "execute": "scripts-sapcp:ExecuteScript:2",
  "input": {
    "script": "read password; echo \"Received ${#password} chars\"",
    "stdin": "$(.execution.input.password)",
    "timeout": "30"
  },
  "alias": "processPassword",
  "description": null,
  "progressMessage": null,
  "initialDelay": null,
  "pause": null,
  "when": null,
  "validate": null,
  "autoRetry": null,
  "repeat": null,
  "errorMessages": [],
  "dryRun": null
}

ExecutePythonScript

scripts-sapcp:ExecutePythonScript:1 — executes a Python script directly. The script field takes plain Python source code.

ParameterTypeRequiredDefaultNotes
scriptstring✅-Plain Python source code
packagesarray❌[]pip packages installed before execution
parametersarray❌[]Passed as positional args to the script
stdinstring❌-Sensitive. Passed to script's standard input
environmentobject❌{}Environment variables
timeoutnumber❌60Range: 15–600s
successExitCodesarray❌["0"]

Output keys: exitCode (number), result (array of output lines)

Example

{
  "execute": "scripts-sapcp:ExecutePythonScript:1",
  "input": {
    "script": "import requests\nprint(requests.__version__)",
    "packages": "[\"requests\"]",
    "timeout": "60"
  },
  "alias": "runPython",
  "description": null,
  "progressMessage": null,
  "initialDelay": null,
  "pause": null,
  "when": null,
  "validate": null,
  "autoRetry": null,
  "repeat": null,
  "errorMessages": [],
  "dryRun": null
}

ExecuteNodeJsScript

scripts-sapcp:ExecuteNodeJsScript:1 — executes a Node.js script directly. The script field takes plain JavaScript source code.

ParameterTypeRequiredDefaultNotes
scriptstring✅-Plain JavaScript source code
packagesarray❌[]npm packages installed before execution
npmrcstring❌-Sensitive. .npmrc content for private registry auth
parametersarray❌[]Passed as positional args to the script
stdinstring❌-Sensitive. Passed to script's standard input
environmentobject❌{}Environment variables
timeoutnumber❌30Range: 15–600s
successExitCodesarray❌["0"]

Output keys: exitCode (number), result (array of output lines)

Example

{
  "execute": "scripts-sapcp:ExecuteNodeJsScript:1",
  "input": {
    "script": "const axios = require('axios');\nconsole.log(axios.VERSION);",
    "packages": "[\"axios\"]",
    "timeout": "30"
  },
  "alias": "runNode",
  "description": null,
  "progressMessage": null,
  "initialDelay": null,
  "pause": null,
  "when": null,
  "validate": null,
  "autoRetry": null,
  "repeat": null,
  "errorMessages": [],
  "dryRun": null
}

ExecutePowerShellScript

scripts-sapcp:ExecutePowerShellScript:1 — executes a PowerShell script directly. The script field takes plain PowerShell source code.

ParameterTypeRequiredDefaultNotes
scriptstring✅-Plain PowerShell source code
modulesarray❌[]PowerShell modules installed before execution
parametersarray❌[]Passed as positional args to the script
stdinstring❌-Sensitive. Passed to script's standard input
environmentobject❌{}Environment variables
timeoutnumber❌60Range: 15–600s
successExitCodesarray❌["0"]

Output keys: exitCode (number), result (array of output lines)

Example

{
  "execute": "scripts-sapcp:ExecutePowerShellScript:1",
  "input": {
    "script": "Write-Output 'Hello from PowerShell'",
    "timeout": "60"
  },
  "alias": "runPowerShell",
  "description": null,
  "progressMessage": null,
  "initialDelay": null,
  "pause": null,
  "when": null,
  "validate": null,
  "autoRetry": null,
  "repeat": null,
  "errorMessages": [],
  "dryRun": null
}

Sensitive Variants

Each command has a Sensitive* counterpart that marks the result output as sensitive (never logged or displayed):

StandardSensitive variant
scripts-sapcp:ExecuteScript:2scripts-sapcp:SensitiveExecuteScript:2
scripts-sapcp:ExecutePythonScript:1scripts-sapcp:SensitiveExecutePythonScript:1
scripts-sapcp:ExecuteNodeJsScript:1scripts-sapcp:SensitiveExecuteNodeJsScript:1
scripts-sapcp:ExecutePowerShellScript:1scripts-sapcp:SensitiveExecutePowerShellScript:1

Use sensitive variants when the script output contains credentials, tokens, or other secrets.


Exit Codes

CodeMeaning
0Success (default)
-1Insufficient resources/quota
137Killed by system (SIGKILL)
CustomUse successExitCodes: ["0", "1"] or ["x"] to accept any code

Note: ExecuteScript returns exit code 124 on timeout. The dedicated language commands enforce the timeout differently — they stop execution but the exit code may vary.


Common Anti-Patterns

❌ Wrong✅ Correct
Using ExecuteScript:2 with a bash wrapper to run PythonUse ExecutePythonScript:1 directly
Using ExecuteScript:2 with a bash wrapper to run Node.jsUse ExecuteNodeJsScript:1 directly
V1: plain text "script": "echo test" (not encoded)V1: hardcode literal Base64, or encode at runtime: "script": "$(.execution.input.script | toBase64)"
V2: "script": "$(.execution.input.script | toBase64)"V2: "script": "$(.execution.input.script)"
"timeout": 5 (below minimum of 15)"timeout": "30"
"successExitCodes": "0" (string, not array)"successExitCodes": "[\"0\"]"
Using output key on script resultUse result key — script commands output to result, not output
Standard command when output contains secretsUse the Sensitive* variant
Skills guardadas