Skip to main content

Skill Development Guide

This guide walks you through creating custom Skills for Soul Kernel from concept to deployment.

Prerequisites

  • Rust development environment
  • Soul Kernel CLI installed (soul --version)
  • Basic understanding of the Skill System

Quick Start: Hello World Skill

1. Create New Skill Project

Use the Soul CLI to scaffold a new skill:
This creates:

2. Configure Cargo.toml

The CLI generates a proper Cargo.toml:

3. Implement the Skill

Edit src/lib.rs:

4. Test Your Skill

Create tests/integration_test.rs:
Run tests:

5. Build the Skill

6. Test Your Skill Locally

Use the Soul CLI to test your skill interactively:
In the REPL:

7. Package and Install

Advanced Skill Development

Using the Skill Template Generator

Soul CLI provides templates for common skill types:

Multi-Format Skills

Skills can handle multiple input/output formats:

Stateful Skills

Skills can maintain state between executions:

Resource Management

Use initialize() and shutdown() for resource management:

Action Commands for Physical AI

Skills can control actuators through action commands:

Error Handling Best Practices

Create custom error types for better error handling:

Testing Strategies

Unit Tests

Integration Tests with Soul CLI

Testing with Mock Soul

Performance Optimization

Profiling with Soul CLI

Lazy Initialization

Caching Results

Deployment

Publishing to Soul Registry

Installing from Registry

Building for Different Platforms

Size Optimization

Or use Soul CLI:

Soul CLI Commands Reference

Development Commands

Management Commands

Registry Commands

Best Practices Checklist

  • Use soul new skill to start projects
  • Test with soul test skill before publishing
  • Profile performance with soul profile skill
  • Document skill with soul doc skill
  • Sign releases with soul package skill --sign
  • Use semantic versioning
  • Include comprehensive tests
  • Handle errors gracefully
  • Validate all inputs
  • Clean up resources properly

Example Skills

Check out the example skills in the Soul Kernel repository:

Next Steps

Change Log

  • 2025-06-12: Complete rewrite based on actual Skill ABI V1 implementation
    • Updated all code examples to match real API
    • Added export_skill! macro usage
    • Included ActionCommand examples for Physical AI
    • Added proper error handling patterns
    • Updated build instructions for dynamic libraries
    • Added registry integration examples
  • 2025-06-12: Added comprehensive Soul CLI integration
    • Added CLI commands throughout the guide
    • Included REPL testing examples
    • Added registry publishing workflow
    • Included profiling and optimization commands