Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

simple-skill

БесплатноЗапускает вложенные скриптыНе проверен

A minimal example demonstrating how to create skills with Skill Engine

kubiyabotот kubiyabot★ 19 звёзд на GitHub

Об этом скилле

Simple Skill

A minimal example demonstrating how easy it is to create skills with Skill Engine. This skill showcases the basic patterns for defining tools, handling parameters, and returning results - perfect for learning or as a template for new skills.

Overview

This skill requires no build steps - just write JavaScript and run! The runtime automatically compiles to WASM on first run and caches the result for fast subsequent executions.

When to Use This Skill

Use this skill to:

  • Learn the basics of Skill Engine development
  • Test skill execution and parameter handling
  • Understand the skill.js file structure
  • Use as a template for creating new skills

Use this skill as a reference when:

  • Starting a new skill from scratch
  • Understanding parameter types and validation
  • Learning error handling patterns
  • Setting up tool metadata

Features

  • No build steps required - Just write JavaScript and run
  • Auto-compilation - Runtime compiles to WASM on first run (~2-3 seconds) and caches
  • Fast execution - Subsequent runs use cached WASM (<100ms startup)
  • Auto-recompile - Modifications to skill.js trigger automatic recompilation
  • Simple API - Export functions matching the skill interface
  • Type-safe - Tool definitions provide schema for arguments

Tools

hello

Greet someone with a friendly message.

Parameter Type Required Default Description
name string Yes - Name of the person to greet
greeting string No Hello Custom greeting message

Example:

# Basic greeting
skill run simple-skill hello name=World
# Output: Hello, World! 👋

# Custom greeting
skill run simple-skill hello name=Alice greeting="Hi"
# Output: Hi, Alice! 👋

# Direct path execution
skill run ./examples/wasm-skills/simple-skill hello name=Bob

echo

Echo back the provided message, optionally repeating it multiple times.

Parameter Type Required Default Description
message string Yes - Message to echo back
repeat number No 1 Number of times to repeat the message

Example:

# Simple echo
skill run simple-skill echo message="Hello World"
# Output: Hello World

# Repeat 3 times
skill run simple-skill echo message="Testing" repeat=3
# Output:
# Testing
# Testing
# Testing

# Echo with special characters
skill run simple-skill echo message="Skills are great!" repeat=2

calculate

Perform basic arithmetic operations on two numbers.

Parameter Type Required Description
operation string Yes Operation: add, subtract, multiply, divide
a number Yes First number
b number Yes Second number

Example:

# Addition
skill run simple-skill calculate operation=add a=10 b=5
# Output: 10 add 5 = 15

# Subtraction
skill run simple-skill calculate operation=subtract a=20 b=8
# Output: 20 subtract 8 = 12

# Multiplication
skill run simple-skill calculate operation=multiply a=7 b=6
# Output: 7 multiply 6 = 42

# Division
skill run simple-skill calculate operation=divide a=100 b=4
# Output: 100 divide 4 = 25

# Decimals work too
skill run simple-skill calculate operation=divide a=22 b=7
# Output: 22 divide 7 = 3.142857142857143

How It Works

First Run (Compilation)

  1. Runtime detects skill.js needs compilation
  2. Compiles JavaScript → WASM (takes ~2-3 seconds)
  3. Stores compiled WASM in ~/.skill-engine/local-cache/
  4. Executes the tool

Subsequent Runs (Cached)

  1. Runtime finds cached WASM
  2. Loads from cache (<100ms startup)
  3. Executes immediately

After Modifications

  1. Runtime detects skill.js changed (via hash)
  2. Automatically recompiles to WASM
  3. Updates cache
  4. Executes with new code

Skill Structure

This skill demonstrates the minimal required structure:

// 1. Metadata - Basic information about your skill
export function getMetadata() {
  return {
    name: "simple-skill",
    version: "1.0.0",
    description: "A simple example skill",
    author: "Skill Engine Team"
  };
}

// 2. Tool Definitions - Declare available tools and their parameters
export function getTools() {
  return [
    {
      name: "hello",
      description: "Greet someone",
      parameters: [
        {
          name: "name",
          paramType: "string",        // Type: string, number, boolean
          description: "Name to greet",
          required: true,              // Is this parameter required?
          defaultValue: "World"        // Optional default value
        }
      ]
    }
  ];
}

// 3. Tool Execution - Handle tool invocations
export async function executeTool(toolName, argsJson) {
  const args = JSON.parse(argsJson);

  if (toolName === "hello") {
    return {
      success: true,
      output: `Hello, ${args.name}!\n`,
      errorMessage: null
    };
  }
Полный SKILL.md на GitHub

Установить simple-skill в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

hello
echo
calculate

Вложенные файлы

.gitignoreREADME.mdpackage.jsonskill.jssrc/skill.tssrc/standalone.jstsconfig.jsonwit-temp/deps/streams.witwit-temp/skill.wit

FAQ

Что делает скилл simple-skill?

A minimal example demonstrating how to create skills with Skill Engine

Как установить скилл simple-skill?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл simple-skill запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить simple-skill с