Skip to content

A lightweight secure Self-evolution engine built in Rust, featuring a built-in native system-level sandbox, zero dependencies, and fully local execution.

License

Notifications You must be signed in to change notification settings

EXboys/skilllite

Repository files navigation

SkillLite

δΈ­ζ–‡ζ–‡ζ‘£

A lightweight AI Agent Skills secure engine with built-in native system-level sandbox, zero dependencies, and local execution.

[Performance Benchmark Video]

Performance Benchmark Comparison

Architecture: Two Layers

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Agent demo Layer (optional & demo)                β”‚
β”‚  Built-in chat, planning, memory, tools            β”‚
β”‚  Binary: skilllite (full)                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Core Layer                                        β”‚
β”‚  Sandbox + security scan + skills management + MCP β”‚
β”‚  Binary: skilllite-sandbox (lightweight)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
skilllite (full) skilllite-sandbox (lightweight)
Binary size ~6.2 MB ~3.6 MB
Startup RSS ~4 MB ~3.9 MB
Agent mode RSS (chat / agent-rpc) ~11 MB β€”
Sandbox execution RSS ~11 MB ~10 MB

Measured on macOS ARM64, release build. Sandbox RSS is dominated by the embedded Python process. The Agent layer adds memory only when chat, planning, or memory features are actively used.


πŸ”’ Supply-Chain Defense: Full-Chain Security

Core principle: Scan before install, enforce after install. (ε…ˆεˆ€ζ―’οΌŒε†θ½εœ°οΌ›θ½εœ°εŽι˜²ζ”Ή)

Most sandbox solutions only provide runtime isolation β€” a single layer. SkillLite is the lightweight engine that defends across the entire skill lifecycle:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Layer 1 β€” Install-time Scanning                 β”‚
β”‚ β”œβ”€ Static rule scan (regex pattern matching)    β”‚
β”‚ β”œβ”€ LLM-assisted analysis (suspicious β†’ confirm) β”‚
β”‚ └─ Supply-chain audit (PyPI / OSV vuln DB)      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Layer 2 β€” Pre-execution Authorization           β”‚
β”‚ β”œβ”€ Two-phase confirm (scan β†’ user OK β†’ run)     β”‚
β”‚ └─ Integrity check (hash tamper detection)      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Layer 3 β€” Runtime Sandbox                       β”‚
β”‚ β”œβ”€ OS-native isolation (Seatbelt / bwrap)       β”‚
β”‚ β”œβ”€ Process-exec whitelist (interpreter only)    β”‚
β”‚ β”œβ”€ Filesystem / network / IPC lockdown          β”‚
β”‚ └─ Resource limits (rlimit CPU/mem/fork/fsize)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Full-Chain Security Comparison

Capability SkillLite E2B Docker Claude SRT Pyodide
Install-time scanning βœ… β€” β€” β€” β€”
Static code analysis βœ… β€” β€” β€” β€”
Supply-chain audit βœ… β€” β€” β€” β€”
Process-exec whitelist βœ… β€” β€” β€” β€”
IPC / kernel lockdown βœ… β€” β€” β€” β€”
Filesystem isolation βœ… partial partial partial βœ…
Network isolation βœ… βœ… β€” βœ… βœ…
Resource limits βœ… βœ… partial partial partial
Runtime sandbox βœ… βœ… βœ… βœ… βœ…
Zero-dependency install βœ… β€” β€” β€” β€”
Offline capable βœ… β€” partial βœ… βœ…

Other solutions focus on runtime isolation only. SkillLite adds install-time and pre-execution layers β€” three lines of defense in a single binary.

Runtime Security Scores (20-item test suite)

Platform Blocked Score
SkillLite (Level 3) 20/20 100%
Pyodide 7/20 35%
Claude SRT 7.5/20 37.5%
Docker (default) 2/20 10%
Full 20-item security test breakdown
Test Item SkillLite Docker Pyodide Claude SRT
File System
Read /etc/passwd βœ… Blocked ❌ Allowed βœ… Blocked ❌ Allowed
Read SSH private key βœ… Blocked βœ… Blocked βœ… Blocked βœ… Blocked
Write to /tmp dir βœ… Blocked ❌ Allowed ❌ Allowed βœ… Blocked
Directory traversal βœ… Blocked ❌ Allowed βœ… Blocked ❌ Allowed
List root directory βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Network
Send HTTP request βœ… Blocked ❌ Allowed βœ… Blocked βœ… Blocked
DNS query βœ… Blocked ❌ Allowed ❌ Allowed βœ… Blocked
Listen port βœ… Blocked ❌ Allowed ❌ Allowed βœ… Blocked
Process
Execute os.system() βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Execute subprocess βœ… Blocked ❌ Allowed βœ… Blocked ❌ Allowed
Enumerate processes βœ… Blocked ❌ Allowed ❌ Allowed βœ… Blocked
Send process signal βœ… Blocked ❌ Allowed βœ… Blocked ⚠️ Partially
Resource Limits
Memory bomb βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Fork bomb βœ… Blocked ❌ Allowed βœ… Blocked ❌ Allowed
CPU intensive compute βœ… Blocked βœ… Blocked ❌ Allowed βœ… Blocked
Code Injection
Dynamic import os βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Use eval/exec βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Modify built-in funcs βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Information Leakage
Read environment vars βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
Get system info βœ… Blocked ❌ Allowed ❌ Allowed ❌ Allowed
# Reproduce: run security comparison tests
cd benchmark && python3 security_vs.py

⚑ Performance

Dimension SkillLite Docker Pyodide SRT
Warm Start 40 ms 194 ms 672 ms 596 ms
Cold Start 492 ms 120s ~5s ~1s
Memory ~10 MB ~100 MB ~50 MB ~84 MB
Deployment Single binary Requires daemon Requires Node.js Requires installation

3-5x faster execution, 10x lower memory footprint vs Docker/SRT.

Performance benchmark details & commands

Performance Benchmark Comparison

cd benchmark/
python benchmark_runner.py --compare-levels --compare-ipc -n 100 -c 10

# Cold start comparison
python benchmark_runner.py --cold-start --compare-ipc

# Full test: cold start + high concurrency
python benchmark_runner.py --cold-start --cold-iterations 20 --compare-levels --compare-ipc -o results.json

See benchmark/README.md for full documentation.


🎯 Why SkillLite?

Feature SkillLite Claude Code Sandbox Pyodide OpenAI Plugins Semantic Kernel
Built-in Sandbox βœ… Rust Native βœ… Node.js Native ⚠️ Docker ⚠️ Cloud (Closed) ❌ None
Sandbox Tech Seatbelt + Namespace Seatbelt + bubblewrap WebAssembly/Docker Cloud Isolation β€”
Supply-Chain Defense βœ… Full-chain β€” β€” β€” β€”
Local Execution βœ… βœ… βœ… ❌ ❌
Zero Dependencies βœ… Single Binary ❌ Needs Node.js ❌ Needs Runtime ❌ ❌
Cold Start ⚑ Milliseconds Medium 🐒 Seconds β€” β€”
LLM Agnostic βœ… Any LLM ❌ Claude Only βœ… ❌ OpenAI Only βœ…

Claude/Anthropic's Claude Code Sandbox (Oct 2025) uses the same underlying tech (Seatbelt + bubblewrap) β€” SkillLite adds full-chain supply-chain defense on top.


πŸš€ Quick Start

Installation (Recommended: pip)

pip install skilllite
skilllite init        # sandbox binary + .skills/ + download skills
skilllite list        # verify installation

Zero-config quick start (auto-detect LLM, setup skills, launch chat):

skilllite quickstart

Run Your First Example

from skilllite import chat

result = chat("Calculate 15 * 27", skills_dir=".skills")
print(result)

Or use the CLI: skilllite chat

Environment Configuration

cp .env.example .env   # Edit: BASE_URL, API_KEY, MODEL
File Description
.env.example Quick start template
.env.example.full Full variable list
docs/en/ENV_REFERENCE.md Complete reference

Platform Support: macOS, Linux, and Windows (via WSL2 Bridge).


πŸ“š Tutorials

Tutorial Time Description
01. Basic Usage 5 min Simplest examples, one-line execution
02. Skill Management 10 min Create and manage skills
03. Agentic Loop 15 min Multi-turn conversations and tool calls
04. LangChain Integration 15 min Integration with LangChain framework
05. LlamaIndex Integration 15 min RAG + skill execution
06. MCP Server 10 min Claude Desktop integration
07. OpenCode Integration 10 min One-command OpenCode integration

πŸ‘‰ View All Tutorials


πŸ’‘ Usage

Direct Skill Execution

from skilllite import run_skill

result = run_skill("./.skills/calculator", '{"operation": "add", "a": 15, "b": 27}')
print(result["text"])

Skill Repository Management

skilllite add owner/repo                    # Add all skills from a GitHub repo
skilllite add owner/repo@skill-name         # Add a specific skill by name
skilllite add ./local-path                  # Add from local directory
skilllite list                              # List all installed skills
skilllite remove <skill-name>               # Remove an installed skill

Framework Integration

pip install langchain-skilllite   # LangChain adapter
from langchain_skilllite import SkillLiteToolkit
from langgraph.prebuilt import create_react_agent

tools = SkillLiteToolkit.from_directory(
    "./skills",
    sandbox_level=3,  # 1=no sandbox, 2=sandbox only, 3=sandbox+scan
    confirmation_callback=lambda report, sid: input("Continue? [y/N]: ").lower() == 'y'
)
agent = create_react_agent(ChatOpenAI(model="gpt-4"), tools)

See 05. LlamaIndex Integration for LlamaIndex usage.

Security Levels

Level Description
1 No sandbox β€” direct execution
2 Sandbox isolation only
3 Sandbox + static security scan (requires confirmation for high-severity issues)

Supported LLM Providers

Provider base_url
OpenAI https://api.openai.com/v1
DeepSeek https://api.deepseek.com/v1
Qwen https://dashscope.aliyuncs.com/compatible-mode/v1
Moonshot https://api.moonshot.cn/v1
Ollama (Local) http://localhost:11434/v1

πŸ› οΈ Create Custom Skill

Each Skill is a directory with a SKILL.md:

my-skill/
β”œβ”€β”€ SKILL.md           # Skill metadata (required)
β”œβ”€β”€ scripts/main.py    # Entry script
β”œβ”€β”€ references/        # Reference documents (optional)
└── assets/            # Resource files (optional)
SKILL.md example
---
name: my-skill
description: My custom Skill that does something useful.
license: MIT
compatibility: Requires Python 3.x with requests library, network access
metadata:
  author: your-name
  version: "1.0"
---

# My Skill

Detailed description of the Skill.

## Input Parameters

- `query`: Input query string (required)

## Output Format

Returns JSON result.

Dependencies are declared in compatibility (not requirements.txt). Entry point is auto-detected (main.py > main.js > main.ts > main.sh).


πŸ“¦ Core Components

  • skilllite (Rust binary) β€” Sandbox executor, CLI, Agent loop, MCP server β€” single binary
  • python-sdk (pip install skilllite) β€” Thin bridge (~600 lines), zero runtime deps
  • langchain-skilllite (pip install langchain-skilllite) β€” LangChain adapter
CLI Commands
Command Description
skilllite init Initialize project (.skills/ + download skills + dependencies + audit)
skilllite quickstart Zero-config: detect LLM, setup skills, launch chat
skilllite chat Interactive agent chat (or --message for single-shot)
skilllite add owner/repo Add skills from GitHub
skilllite remove <name> Remove an installed skill
skilllite list List installed skills
skilllite show <name> Show skill details
skilllite run <dir> '<json>' Execute a skill directly
skilllite scan <dir> Scan skill for security issues
skilllite mcp Start MCP server (Cursor/Claude Desktop)
skilllite serve Start IPC daemon (stdio JSON-RPC)
skilllite init-cursor Initialize Cursor IDE integration
skilllite init-opencode Initialize OpenCode integration
skilllite clean-env Clean cached runtime environments
skilllite reindex Re-index all installed skills
Build from Source

Install Rust (if not already installed)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

Build & Install Commands (from repository root)

Package Binary Command Description
skilllite skilllite cargo build -p skilllite Full (Agent + Chat + MCP + sandbox + audit)
skilllite skilllite cargo build -p skilllite --features memory_vector Full + vector memory search
skilllite skilllite cargo build -p skilllite --no-default-features Minimal: run/exec/bash/scan only
skilllite skilllite-sandbox cargo build -p skilllite --bin skilllite-sandbox --no-default-features --features sandbox_binary Sandbox + MCP only

Install (to ~/.cargo/bin/)

Command What you get
cargo install --path skilllite skilllite β€” full
cargo install --path skilllite --features memory_vector skilllite β€” full + vector memory
cargo install --path skilllite --bin skilllite-sandbox --no-default-features --features sandbox_binary skilllite-sandbox β€” sandbox + MCP only

Default features = sandbox, audit, agent. Vector memory (memory_vector) is not in default.

Project Structure (Cargo Workspace)

skilllite/
β”œβ”€β”€ Cargo.toml              # [workspace] members
β”œβ”€β”€ skilllite/              # Main binary (CLI entry point)
└── crates/
    β”œβ”€β”€ skilllite-assistant/ # Desktop app (Tauri + React)
    β”œβ”€β”€ skilllite-core/     # Config, skill metadata, path validation
    β”œβ”€β”€ skilllite-sandbox/  # Sandbox executor (independently deliverable)
    β”œβ”€β”€ skilllite-executor/ # Session, transcript, memory
    └── skilllite-agent/    # LLM Agent loop, tool extensions

Dependency direction: skilllite β†’ agent β†’ sandbox + executor β†’ core. See ARCHITECTURE.md.

OpenCode Integration
pip install skilllite
skilllite init-opencode   # Auto-configure OpenCode MCP
opencode

The init-opencode command automatically detects the best way to start the MCP server, creates opencode.json, and discovers your skills.

Desktop Assistant (skilllite-assistant)

Tauri 2 + React Desktop, located at crates/skilllite-assistant/:

cd crates/skilllite-assistant
npm install
npm run tauri dev    # dev mode (HMR)
npm run tauri build

See crates/skilllite-assistant/README.md.


πŸ“„ License

MIT β€” See THIRD_PARTY_LICENSES.md for third-party details.

πŸ“š Documentation

About

A lightweight secure Self-evolution engine built in Rust, featuring a built-in native system-level sandbox, zero dependencies, and fully local execution.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors