Skip to content

RLforlife/miniskill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miniskill

A minimal agent that can load and call skills, inspired by Clawdbot's skill system.

Features

  • Skill Loading: Load skills from a local directory
  • Skill Format: Follows the Agent Skills specification with YAML frontmatter
  • Script Execution: Execute skill scripts directly
  • Tool Support: Built-in tools (read, write, exec, web_fetch, ls, exists)
  • LLM Integration: Built-in Anthropic Claude integration
  • CLI Interface: Interactive chat and command-line tools

Installation

git clone https://github.com/yourusername/miniskill.git
cd miniskill
npm install
npm run build

Usage

Set environment variables

export ANTHROPIC_API_KEY="your-api-key"
export SKILLS_DIR="./skills"  # optional, defaults to ./skills
export MODEL="claude-sonnet-4-20250514"  # optional

Interactive Chat

npm start chat

List available skills

npm start skills

Read a skill file

npm start read hello-world

Run a skill script

npm start run hello-world greet.sh
npm start run hello-world greet.sh "Your Name"

Show skill resources

npm start info hello-world

Available Tools

The agent has access to the following tools:

Tool Description
read Read file contents (supports limit/offset)
write Create or overwrite files
exec Execute shell commands
web_fetch Fetch and extract readable content from URLs
ls List directory contents
exists Check if file/directory exists

Creating Skills

Skills are directories containing a SKILL.md file:

skill-name/
├── SKILL.md           # Required: skill metadata and instructions
├── scripts/           # Optional: executable scripts
├── references/        # Optional: reference documentation
└── assets/            # Optional: asset files

SKILL.md Format

---
name: my-skill
description: A description of when to use this skill
---

# My Skill

Instructions for using the skill...

Skills Frontmatter

Field Required Description
name Yes Skill name (lowercase, hyphens)
description Yes When to use this skill

API Usage

import { MiniskillAgent, getTools } from "miniskill";

const agent = new MiniskillAgent({
  apiKey: process.env.ANTHROPIC_API_KEY!,
  skillsDir: "./skills",
});

// Load skills
agent.loadSkills();

// Get available tools
const tools = agent.getTools();

// Chat with tool support
const response = await agent.chat("Read the hello-world skill and run its greet script");

// Execute scripts
await agent.runSkillScript("hello-world", "greet.sh", ["Alice"]);

// Call tools directly
const result = await agent.callTool("read", { path: "./skills/hello-world/SKILL.md" });

Example Skill

See skills/hello-world/ for a complete example skill with:

  • SKILL.md with documentation
  • scripts/greet.sh executable script

Inspired by

License

MIT

About

A minimal agent that can load and call skills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published