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 skillsactivate_skill- Load full SKILL.md instructionsread_skill_file- Read helper files from skillslist_skill_files- List files in skill directoriesrun_skill_script- Execute sandboxed scripts or WASM moduleswrite_file- Write to workspace (with security validation)read_file- Read from workspace (with security validation)list_workspace_files- List files in workspaceget_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finclip_openskills-0.5.0.tar.gz.
File metadata
- Download URL: finclip_openskills-0.5.0.tar.gz
- Upload date:
- Size: 148.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed0a0f0a0e7affad07d5fa4a53ff3a5e26e518073254d821f0a7b4699a96221f
|
|
| MD5 |
461534c8b818272f029a1a8541fac687
|
|
| BLAKE2b-256 |
f94ca78dd40b15857eb7d16e54cc974304fd54f43b24502e7964cb5b8a2fe84c
|
File details
Details for the file finclip_openskills-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: finclip_openskills-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 9.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a8df15ba5147bc9d140f6baf547e6945eb1d83e50ee0edfb8d5568d33462a0f
|
|
| MD5 |
60decaf4cbcf2edb4e103d531b724382
|
|
| BLAKE2b-256 |
835f5e44ec071399ec4be04b8394a3e12a617cd9d29a4f4d0c18740047c9ea1b
|
File details
Details for the file finclip_openskills-0.5.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: finclip_openskills-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.1 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d21683d0f2bc45a50154b0570c67428d8ed7345e8e67211f94138831fc69709
|
|
| MD5 |
dde2a902d41336716c923c1dce5f20a0
|
|
| BLAKE2b-256 |
3b9bcd5212bb743eb3d00f8250f5b0e08e6785fb535af1d83196d2104b40be85
|
File details
Details for the file finclip_openskills-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: finclip_openskills-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 8.9 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
544b2d8311c98e1e70b92a559bc035979b0a3360ad310afc3c9f551a6395334e
|
|
| MD5 |
c2e080618f3b084081a1f4c1ca9f921a
|
|
| BLAKE2b-256 |
c6af991011e1d14ac7798c88a8652ec5b1c61511d300d0d035a87a5e956425eb
|