omniskill

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 0 Imported by: 0

README

OmniSkill

Go CI Go Lint Go SAST Go Report Card Docs Docs License

Unified skill infrastructure for AI agents in Go.

Overview

OmniSkill provides a common interface for defining, registering, and invoking AI agent capabilities across multiple execution environments:

  • skill/ - Core Skill and Tool interfaces, CommandTool for CLI wrapping
  • loader/ - Skill loaders for SKILL.md markdown and Go formats
  • installer/ - Dependency management for skill requirements
  • clawhub/ - ClawHub marketplace integration for skill discovery
  • pack/ - Skill pack interface for embedding markdown skills
  • registry/ - Skill registration and discovery
  • mcp/server/ - MCP server runtime with tools, prompts, resources
  • mcp/client/ - MCP client for connecting to remote servers
  • mcp/oauth2/ - OAuth 2.1 Authorization Server for authenticated MCP
  • voicetools/ - Voice call control tools (transfer, hold, consult, conference)

Skills can be invoked via:

  • Library mode - Direct in-process calls without protocol overhead
  • MCP Server - Expose via Model Context Protocol (stdio, HTTP, SSE)
  • MCP Client - Consume remote MCP servers as local skills

Installation

go get github.com/plexusone/omniskill

Quick Start

Define a Skill
package main

import (
    "context"
    "github.com/plexusone/omniskill/skill"
)

func main() {
    // Create a tool
    addTool := skill.NewTool("add", "Add two numbers",
        map[string]skill.Parameter{
            "a": {Type: "number", Required: true},
            "b": {Type: "number", Required: true},
        },
        func(ctx context.Context, params map[string]any) (any, error) {
            a := params["a"].(float64)
            b := params["b"].(float64)
            return map[string]any{"sum": a + b}, nil
        },
    )

    // Create a skill
    mathSkill := &skill.BaseSkill{
        SkillName:        "math",
        SkillDescription: "Mathematical operations",
        SkillTools:       []skill.Tool{addTool},
    }
}
Library Mode

Call tools directly without MCP overhead:

import (
    "github.com/plexusone/omniskill/mcp/server"
    "github.com/modelcontextprotocol/go-sdk/mcp"
)

rt := server.New(&mcp.Implementation{
    Name:    "calculator",
    Version: "1.0.0",
}, nil)

rt.RegisterSkill(mathSkill)

// Direct invocation - no JSON-RPC, no transport
result, err := rt.CallTool(ctx, "add", map[string]any{"a": 1.0, "b": 2.0})
MCP Server Mode

Expose skills via MCP for Claude Desktop or other clients:

// stdio (for Claude Desktop)
rt.ServeStdio(ctx)

// HTTP with SSE
rt.ServeHTTP(ctx, &server.HTTPServerOptions{Addr: ":8080"})

// With OAuth2 authentication (for ChatGPT.com)
rt.ServeHTTP(ctx, &server.HTTPServerOptions{
    Addr: ":8080",
    OAuth2: &server.OAuth2Options{
        Users: map[string]string{"admin": "password"},
    },
})
MCP Client Mode

Connect to remote MCP servers and use them as skills:

import (
    "os/exec"
    "github.com/plexusone/omniskill/mcp/client"
)

c := client.New("my-app", "1.0.0", nil)

// Connect to MCP server
cmd := exec.Command("npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp")
session, err := c.ConnectCommand(ctx, cmd)
defer session.Close()

// Wrap as skill
fsSkill := session.AsSkill(client.WithSkillName("filesystem"))

// Use like any local skill
for _, tool := range fsSkill.Tools() {
    fmt.Println(tool.Name())
}
Registry

Central skill registration and discovery:

import "github.com/plexusone/omniskill/registry"

reg := registry.New()
reg.Register(mathSkill)
reg.Register(fsSkill)

// Discover all tools
for _, tool := range reg.ListTools() {
    fmt.Printf("%s: %s\n", tool.Name(), tool.Description())
}

// Initialize all skills
reg.Init(ctx)
defer reg.Close()
Auto-Registration

Skills registered with the runtime can auto-register with a registry:

reg := registry.New()
rt := server.New(impl, &server.Options{
    Registry: reg,  // Enable auto-registration
})

rt.RegisterSkill(mathSkill)  // Also registers with reg

Package Structure

github.com/plexusone/omniskill
├── skill/       # Core Skill and Tool interfaces, CommandTool
├── loader/      # Skill loaders for SKILL.md and Go formats
├── installer/   # Dependency management for skills
├── clawhub/     # ClawHub marketplace integration
│   ├── hub.go       # API client
│   ├── manifest.go  # CLAWHUB.json parsing
│   ├── resolver.go  # Dependency resolution
│   └── security.go  # Security scanning
├── pack/        # Skill pack interface for markdown bundles
├── registry/    # Skill registration and discovery
├── voicetools/  # Voice call control tools
│   ├── context.go     # CallContext, Call, Transport interfaces
│   ├── registry.go    # NewVoiceSkill() registration
│   ├── transfer.go    # transfer_call tool
│   ├── hold.go        # hold_call, unhold_call tools
│   ├── consult.go     # consult_agent tool
│   └── conference.go  # add_to_conference tool
├── mcp/
│   ├── server/  # MCP server runtime
│   ├── client/  # MCP client for remote servers
│   └── oauth2/  # OAuth 2.1 authorization server
└── doc.go

Voice Tools

The voicetools package provides AI agent tools for controlling voice calls:

import (
    "github.com/plexusone/omniskill/voicetools"
)

// Create call context with transport and agent registry
callCtx := voicetools.NewCallContext(call, transport, agentRegistry)

// Create voice skill with all call control tools
voiceSkill := voicetools.NewVoiceSkill(callCtx)

// Register with MCP server
rt.RegisterSkill(voiceSkill)
Available Tools
Tool Description
transfer_call Transfer call to another number or agent queue
hold_call Place caller on hold with optional music
unhold_call Resume call from hold
consult_agent Query specialist AI without transferring
add_to_conference Add participants to conference call

Documentation

Feature Comparison

Feature Library Mode MCP Server MCP Client
Direct tool calls - -
JSON-RPC overhead None Yes Yes
Claude Desktop - -
Remote servers - -
Skill interface

Design Philosophy

  1. Define Once, Use Everywhere - Skills work in library mode, as MCP servers, or wrapping MCP clients
  2. Protocol at the Edge - MCP is for external communication; internal calls bypass JSON-RPC
  3. Type Safety - Generic handlers with automatic JSON schema inference
  4. Composable - Skills can wrap other skills or remote MCP sessions

License

MIT License - see LICENSE file for details.

Documentation

Overview

Package omniskill provides a unified skill/tool infrastructure for AI applications.

OmniSkill is organized into focused subpackages:

  • mcp/server: MCP server runtime with tools, prompts, resources, and multiple transport options (stdio, HTTP, SSE)
  • mcp/client: MCP client for connecting to external MCP servers
  • mcp/oauth2: OAuth 2.1 Authorization Server with PKCE support for MCP authentication

Quick Start

For building MCP servers, import the server package:

import "github.com/plexusone/omniskill/mcp/server"

rt := server.New(&mcp.Implementation{
    Name:    "my-server",
    Version: "1.0.0",
}, nil)

// Add tools, prompts, resources
server.AddTool(rt, tool, handler)

// Library mode: call directly
result, err := rt.CallTool(ctx, "add", map[string]any{"a": 1, "b": 2})

// Server mode: serve via HTTP
rt.ServeHTTP(ctx, &server.HTTPServerOptions{
    Addr: ":8080",
})

For connecting to MCP servers as a client:

import "github.com/plexusone/omniskill/mcp/client"

c := client.New("my-app", "1.0.0", nil)
session, err := c.ConnectCommand(ctx, exec.Command("npx", "-y", "@modelcontextprotocol/server-github"), nil)
tools, err := session.ListTools(ctx)

For OAuth 2.1 authentication with PKCE (required by ChatGPT.com and other MCP clients):

import "github.com/plexusone/omniskill/mcp/oauth2"

srv, err := oauth2.New(&oauth2.Config{
    Issuer: "https://example.com",
    Users:  map[string]string{"admin": "password"},
})

See the individual package documentation for detailed usage.

Design Philosophy

OmniSkill enables defining skills once and exposing them across multiple formats: MCP protocol, compiled Go skills, OpenAPI, and more.

MCP (Model Context Protocol) is treated as the primary interoperability protocol, while providing zero-overhead library-mode for Go consumers.

Directories

Path Synopsis
Package clawhub provides ClawHub skills marketplace integration.
Package clawhub provides ClawHub skills marketplace integration.
Package installer provides installation management for skill dependencies.
Package installer provides installation management for skill dependencies.
Package loader provides skill loaders for different formats.
Package loader provides skill loaders for different formats.
mcp
client
Package client provides an MCP client wrapper for connecting to MCP servers.
Package client provides an MCP client wrapper for connecting to MCP servers.
oauth2
Package oauth2 provides a standalone OAuth 2.1 Authorization Server with PKCE support, designed for MCP server authentication.
Package oauth2 provides a standalone OAuth 2.1 Authorization Server with PKCE support, designed for MCP server authentication.
Package pack provides interfaces for markdown skill packs.
Package pack provides interfaces for markdown skill packs.
Package registry provides skill registration and discovery.
Package registry provides skill registration and discovery.
Package skill defines the core interfaces for skills and tools.
Package skill defines the core interfaces for skills and tools.
Package voicetools provides voice call control tools for AI agents.
Package voicetools provides voice call control tools for AI agents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL