Skill Installer
A Rust library for installing and managing agent skills with embedded skill support.
Overview
This library provides a Rust implementation of skill installation functionality similar to Vercel Labs' skills CLI. It supports:
- Skill discovery from multiple sources (GitHub, GitLab, local, direct, and embedded)
- Installation with symlink or copy modes
- Canonical path management
- Lock file management for tracking installed skills
- Embedded skills bundled at compile time
- CLI introspection support (Agentic CLI Design Principle 7)
Features
Core Functionality
- Skill Discovery: Find and parse SKILL.md files from various sources
- Installation Modes:
- Symlink mode with automatic fallback to copy
- Copy mode for direct file copying
- Canonical Path: Single source of truth at
.agents/skills/<skill-name> - Lock Management: Track installed skills with deterministic hashing
- Embedded Skills: Bundle skills into the binary at compile time using
include_str!
Embedded Skills
The CLI installs skill(s) embedded in the binary by default.
Architecture
Modules
types: Core data structures (Skill, Source, LockEntry, etc.)embedded: Compile-time embedded skill definitionsdiscovery: Skill discovery and parsing logicinstaller: Installation with symlink/copy supportlock: Lock file managementcli: CLI command definitions and introspection
Usage
Basic Installation Flow
use *;
use TempDir;
// Setup
let temp_dir = new.unwrap;
let canonical_dir = temp_dir.path.join;
let lock_path = temp_dir.path.join;
// Create source (embedded skill)
let source = Source ;
// Discover skills
let config = default;
let skills = discover_skills.unwrap;
// Install skill
let install_config = new;
let installed_path = install_skill.unwrap;
// Update lock
let lock_manager = new;
lock_manager.update_entry.unwrap;
CLI Introspection
use *;
// Get all commands as JSON
let commands_json = output_commands_json.unwrap;
println!;
// Get schema for a specific command
let schema = get_command_schema.unwrap;
println!;
Testing
The library follows a mock-first approach for testing:
- All tests run without external network access
- External dependencies (Git, HTTP, Tree API) are abstracted via traits
- Integration tests use temporary directories
- Embedded skill tests verify compile-time bundling
Run tests:
Run linting:
Format code:
Design Principles
This library implements Agentic CLI Design Principle 7: Introspectable:
- Self-describing commands via
commands --output json - JSON Schema output via
schema --command <name> --output json-schema - Machine-readable output formats
- Embedded skills enable offline installation
Data Model
Skill
Source
LockEntry
Future Work
- GitHub/GitLab real API integration with authentication
- Additional source types
- UI/TUI integration
- Advanced skill filtering and search
License
This project is part of the agent skills ecosystem.