Get the FREE Ultimate OpenClaw Setup Guide β†’

example-skill

Scanned
npx machina-cli add skill kazhuki7/agentskills-proxy/example-skill --openclaw
Files (1)
SKILL.md
1.9 KB

Example Skill

This is an example skill that demonstrates the capabilities of the Skill Aggregation Framework.

Overview

This skill includes example scripts in three languages:

  • JavaScript (executed in VM2 sandbox)
  • Python (executed as subprocess)
  • Shell (executed as subprocess with command validation)

Usage

Trigger this skill to test the execution engine. You can specify parameters to customize the output.

Workflow

  1. Call the desired script with parameters
  2. The script will process the input
  3. Output will be streamed back to the caller
  4. Any generated files will be available as artifacts

Scripts

JavaScript (scripts/hello.js)

A simple JavaScript script that demonstrates sandbox execution and artifact creation.

Python (scripts/analyze.py)

A Python script that performs text analysis and generates a JSON report.

Shell (scripts/process.sh)

A shell script that demonstrates basic text processing.

Examples

JavaScript execution:

{
  "skill_id": "example-skill",
  "script_path": "scripts/hello.js",
  "script_type": "JAVASCRIPT",
  "parameters": {
    "message": "Hello World",
    "count": "5"
  }
}

Python execution:

{
  "skill_id": "example-skill",
  "script_path": "scripts/analyze.py",
  "script_type": "PYTHON",
  "parameters": {
    "text": "This is sample text for analysis"
  }
}

Source

git clone https://github.com/kazhuki7/agentskills-proxy/blob/main/skills/example-skill/SKILL.mdView on GitHub

Overview

example-skill demonstrates the Skill Aggregation Framework by providing sample scripts in JavaScript, Python, and Shell. It’s designed for testing skill execution with configurable parameters and for validating sandboxed execution, subprocess runs, and artifact generation. The skill shows how output is streamed back to the caller and how artifacts are surfaced.

How This Skill Works

Trigger the skill with the provided parameters; the engine invokes one of the scripts (JS, Python, or Shell) with the given inputs. JavaScript runs in a VM2 sandbox, while Python and Shell scripts execute as subprocesses with command validation. Output is streamed back to the caller and any generated artifacts are exposed for retrieval.

When to Use It

  • Testing multi-language script execution (JavaScript, Python, and Shell) within the framework
  • Verifying optional parameters and default values (message and count)
  • Validating real-time output streaming from script executions
  • Ensuring artifacts produced by scripts are accessible to the caller
  • Demonstrating sandboxed and subprocess execution to stakeholders

Quick Start

  1. Step 1: Define parameters (e.g., message and count) and select a script_path and script_type (JAVASCRIPT, PYTHON, or SHELL)
  2. Step 2: Trigger the skill with the chosen script and parameters (e.g., JS: scripts/hello.js, PYTHON: scripts/analyze.py, SHELL: scripts/process.sh)
  3. Step 3: Monitor the streamed output and retrieve any artifacts produced by the script

Best Practices

  • Test each language script in isolation (JS VM2 sandbox, Python subprocess, Shell subprocess) before integration
  • Always include and validate default parameter values (message, count) to ensure sane fallbacks
  • Verify end-to-end data flow: input parameters -> script processing -> streamed output
  • Check that produced artifacts are correctly created and retrievable by the caller
  • Validate inputs for safety, especially Shell commands, to prevent injection or unsafe operations

Example Use Cases

  • JavaScript execution: run scripts/hello.js with message 'Hello World' and count 5
  • Python execution: run scripts/analyze.py with text input to generate a JSON report
  • Shell execution: run scripts/process.sh to perform basic text processing
  • Streaming outputs during long-running script executions
  • Artifacts generated by scripts are surfaced and accessible after execution

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers β†—