# execute_cloud_skill

Run one declared script component from an active Cloud Skill through the isolated execution engine.

- Canonical: https://docs.xmemo.dev/docs/tools/execute-cloud-skill
- Locale: en-US
- Content-Locale: en-US
- Canonical-Content-Digest: aba94d94556b98106266c559e78f7c9d3f934fda4c6f83458f67a7a938bb42c9
- Edition-Digest: 8e39d1c8c7482f5ddc325877218abbbc52773c4a74e6ac43af171e4040f6f94c
- Source-Revision: sha256:23bbbd009c5356d1653ef90add53c2a5821b45798e2ded6d766cdffe5bd291f5

## Tool Reference: `execute_cloud_skill`

### Purpose

Execute one declared script component from an active Cloud Skill through the isolated SandboxExecutionEngine.

### Parameters

- `script_path` (string, optional): Logical path or component ID of the script component to execute.
- `slug` (string, optional, default: empty): Skill slug used to resolve the active skill.
- `skill_id` (string, optional, default: empty): Stable skill identity alternative to slug.
- `revision_id` (string, optional, default: empty): Optional revision pin; otherwise the published revision, then latest revision, is selected.
- `input_args` (object, optional, default: empty object): JSON-compatible values encoded to the script's stdin.
- `timeout_seconds` (integer, optional, default: 30): Execution timeout constrained by ExecutionLimits to 1–60 seconds.

### Returns

A JSON CloudSkillResponseEnvelope with kind='execution' and data containing execution_id, skill_id, revision_id, script_path, runtime, status, exit_code, stdout, stderr, truncation flags, optional output_data, duration_ms, memory_peak_bytes, cpu_time_ms, timestamps, and error_kind.

### Errors

- ACCESS_DENIED, SKILL_NOT_FOUND, or SKILL_ARCHIVED: the skill cannot be resolved in the caller's scope.
- REVISION_NOT_FOUND: the requested revision does not belong to the skill or no active revision exists.
- SCRIPT_NOT_FOUND or INVALID_COMPONENT_TYPE: the path is absent or names a non-script component.
- SANDBOX_UNAVAILABLE: the host has no working bubblewrap isolation driver and unsafe fallback is disabled.
- EXECUTION_TIMEOUT, RESOURCE_EXHAUSTED, or SCRIPT_EXECUTION_ERROR: the watchdog, resource limits, or script exit status ended execution.

### Examples

#### Run one pinned script component



```typescript
execute_cloud_skill({
  slug: "deployment-procedure",
  revision_id: "revision-id-from-root-recall",
  script_path: "scripts/check.py",
  input_args: { environment: "staging" },
  timeout_seconds: 30
})
```

### Related Tools

- [recall_cloud_skill](/docs/tools/recall-cloud-skill): Discover the skill and pin the revision/resource before executing.
- [save_cloud_skill](/docs/tools/save-cloud-skill): Create the procedure and script component that can be executed.
- [recall_context](/docs/tools/recall-context): Assemble bounded agent context around the execution task.

## Execute by script path and revision

Choose an active skill, pin a revision when reproducibility matters, and name a component whose type is script. Execution requires memory:write and returns a typed execution envelope.

