بنقرة واحدة
python-example
Example Python skill demonstrating the SDK decorator pattern
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Example Python skill demonstrating the SDK decorator pattern
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Docker container and image management with native docker CLI integration. Use when you need to manage containers, images, networks, volumes, or run Docker Compose.
Video and audio processing using FFmpeg inside a secure Docker container
Image manipulation and conversion using ImageMagick inside a secure Docker container
MongoDB database client with Docker-based mongosh CLI
MySQL database client with Docker-based mysql CLI
PostgreSQL CLI client (psql) for database operations running inside a Docker container
| name | python-example |
| description | Example Python skill demonstrating the SDK decorator pattern |
| allowed-tools | ["Read","Bash"] |
| version | 1.0.0 |
| author | Skill Engine Team |
| tags | ["example","python","demo","calculator","greeting"] |
| category | utility |
A comprehensive example demonstrating Python SDK features including decorators, configuration, multiple tools, and proper error handling.
Greet someone with a personalized message. Supports formal and informal greeting styles.
Usage:
skill run python-example:greet --name "Alice"
skill run python-example:greet --name "Alice" --formal true
Parameters:
name (optional): The name of the person to greet (default: "World")formal (optional): Use formal greeting style (default: false)Example:
$ skill run python-example:greet --name "Developer"
Hello, Developer!
$ skill run python-example:greet --name "CEO" --formal true
Good day, CEO. How may I assist you?
Echo back a message with optional transformations like uppercase or reverse.
Usage:
skill run python-example:echo --message "Hello World"
skill run python-example:echo --message "hello" --uppercase true
skill run python-example:echo --message "stressed" --reverse true
Parameters:
message (required): The message to echouppercase (optional): Convert message to uppercase (default: false)reverse (optional): Reverse the message (default: false)Example:
$ skill run python-example:echo --message "stressed" --reverse true
desserts
Perform basic arithmetic operations on two numbers.
Usage:
skill run python-example:calculate --a 10 --b 5 --operation add
skill run python-example:calculate --a 100 --b 7 --operation divide
Parameters:
a (required): First numberb (required): Second numberoperation (optional): Operation to perform - add, subtract, multiply, divide (default: "add")Example:
$ skill run python-example:calculate --a 15 --b 3 --operation multiply
15 multiply 3 = 45
Process a JSON array of numbers and return statistics including count, sum, min, max, and average.
Usage:
skill run python-example:process_list --items '[1, 2, 3, 4, 5]'
Parameters:
items (required): JSON array of numbers to processExample:
$ skill run python-example:process_list --items '[10, 20, 30, 40, 50]'
Processed 5 items
{
"count": 5,
"sum": 150,
"min": 10,
"max": 50,
"average": 30.0
}
Get current skill configuration and status including available tools.
Usage:
skill run python-example:status
Example:
$ skill run python-example:status
{
"skill_name": "python-example",
"version": "1.0.0",
"config": {
"greeting_prefix": "Hello",
"max_items": 100
},
"tools_available": ["greet", "echo", "calculate", "process_list", "status"]
}
This skill supports the following configuration options:
# Set greeting prefix
skill config python-example --set greeting_prefix="Hi there"
# Set maximum items for list processing
skill config python-example --set max_items=50
cd examples/python-skill
# Install dependencies
pip install -e ../../sdk/python[build]
# Build to WASM component
skill-sdk build
# Install in skill-engine
skill install ./python-example.wasm
# Run tests
skill-sdk test
# Validate project structure
skill-sdk validate
# Show skill info
skill-sdk info