Skip to main content

OpenSkill Runtime Python bindings - Claude Skills compatible runtime with WASM sandbox

Project description

OpenSkills Python Bindings

Python bindings for OpenSkills Runtime - Claude Skills compatible runtime with WASM sandbox.

Installation

pip install finclip-openskills

Note: Pre-built wheels are available for macOS and Linux only. Windows users need to build from source:

git clone https://github.com/Geeksfino/openskills.git
cd openskills/bindings/python
pip install maturin
maturin develop

Usage

Basic Runtime API

from openskills import OpenSkillRuntime

# Create runtime (discovers from standard locations)
runtime = OpenSkillRuntime()

# Or specify project root
runtime = OpenSkillRuntime.with_project_root('/path/to/project')

# Or load from specific directory
runtime = OpenSkillRuntime.from_directory('/path/to/skills')

# Discover skills from standard locations
skills = runtime.discover_skills()
print(f"Found {len(skills)} skills")

# List skills (progressive disclosure)
for skill in runtime.list_skills():
    print(f"{skill['id']}: {skill['description']}")

# Activate a skill (load full content)
loaded = runtime.activate_skill('my-skill')
print(loaded['instructions'])

# Execute WASM module
result = runtime.execute_skill(
    'my-skill',
    input={'query': 'hello'},
    timeout_ms=5000
)

print(result['output'])
print(result['audit'])

# Check tool permissions
can_read = runtime.is_tool_allowed('my-skill', 'Read')

⭐ Pre-built Tools (Recommended)

For agent integration, use pre-built tools that eliminate boilerplate:

LangChain Integration:

from openskills import OpenSkillRuntime
from openskills_tools import create_langchain_tools, get_agent_system_prompt

# Initialize runtime
runtime = OpenSkillRuntime.from_directory('./skills')
runtime.discover_skills()

# Create LangChain-compatible tools
tools = create_langchain_tools(runtime, workspace_dir='./output')

# Get skill-agnostic system prompt
system_prompt = get_agent_system_prompt(runtime)

# Use with LangChain
from langchain.agents import create_agent
agent = create_agent(model, tools, system_prompt=system_prompt)

Framework-Agnostic (Simple Functions):

from openskills import OpenSkillRuntime
from openskills_tools import create_simple_tools

runtime = OpenSkillRuntime.from_directory('./skills')
runtime.discover_skills()

# Create simple callable functions (works with any framework)
tools = create_simple_tools(runtime, workspace_dir='./output')

# Use tools directly
skills = tools['list_skills']()
loaded = tools['activate_skill']('my-skill')
tools['write_file']('output.txt', 'Hello, World!')

# Run a WASM module from a skill (auto-detected by file extension)
result = tools['run_skill_script'](
    'skill-creator',
    'wasm/skill.wasm',
    input={'action': 'init_skill', 'skill_name': 'my-skill', 'path': 'skills/public'}
)
print(result['output'])

Available Tools:

  • list_skills - List available skills
  • activate_skill - Load full SKILL.md instructions
  • read_skill_file - Read helper files from skills
  • list_skill_files - List files in skill directories
  • run_skill_script - Execute sandboxed scripts or WASM modules
  • write_file - Write to workspace (with security validation)
  • read_file - Read from workspace (with security validation)
  • list_workspace_files - List files in workspace
  • get_file_info - Get file metadata

Benefits:

  • ~200 lines less code: No manual tool definitions
  • Security built-in: Path validation, workspace isolation
  • Workspace management: Automatic sandboxed file I/O
  • Skill-agnostic: Works with any skill without code changes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finclip_openskills-0.4.0.tar.gz (119.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

finclip_openskills-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl (9.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

finclip_openskills-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

finclip_openskills-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file finclip_openskills-0.4.0.tar.gz.

File metadata

  • Download URL: finclip_openskills-0.4.0.tar.gz
  • Upload date:
  • Size: 119.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for finclip_openskills-0.4.0.tar.gz
Algorithm Hash digest
SHA256 61221c02dfcf1244d5b40906ea7368c36c59a880aa54f7d8cd2ae48d4c00434e
MD5 0e975dcd31b1c2fba041efb08ca97b29
BLAKE2b-256 e04386b248aac83ba4d74232ffc2efb7020fb1f1e0c55fa5f7039bea283c6233

See more details on using hashes here.

File details

Details for the file finclip_openskills-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for finclip_openskills-0.4.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ee82cfb7c10c017967adb7a1efe17039233f5578a62d89021f30303950d6583e
MD5 d8e220ad2a1f6b041680c3b40a584748
BLAKE2b-256 6f7986837a798df6620ba5e27c97b074cd0e253f60f134360fa635aa29b8a47c

See more details on using hashes here.

File details

Details for the file finclip_openskills-0.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for finclip_openskills-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dda741bbb7fd12b9d75c663526ebfcd4d5c99294702906960c0969b93d236afa
MD5 75e3049c5cae945d5d91f04c614075ba
BLAKE2b-256 52115defec1d3a93a3615de1a9ac9134e7f4df6bfcc9439e08a211b69dbf7ac8

See more details on using hashes here.

File details

Details for the file finclip_openskills-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for finclip_openskills-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3c3127caa6e4af07f12357442e74d646eeb8385db4c9d5c5d4b592fa41e48c27
MD5 919eb0ca9de6a0bb4150591077a7b88b
BLAKE2b-256 8060465ead31613560e375167bcfa8fd357cac6baf30e8d4d6c9ff1e201c0427

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page