npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

clawskills-strands

v0.1.0

Published

Convert OpenClaw skills (markdown documentation) to executable Strands Agents tools

Readme

clawskills-strands

Convert OpenClaw skills (markdown documentation) to executable Strands Agents tools.

Overview

OpenClaw skills are markdown files that document CLI commands and workflows. In OpenClaw, agents read these files and execute commands manually. This package converts those skills into directly executable Strands Agents tools, making them immediately usable without the read-then-exec pattern.

Installation

npm install clawskills-strands

Peer Dependencies:

  • @strands-agents/sdk - Required for tool creation
  • zod - Required for schema validation

Quick Start

import { Agent } from '@strands-agents/sdk'
import { BedrockModel } from '@strands-agents/sdk'
import { loadSkills, convertSkillsToTools } from 'clawskills-strands'

// Load all 52 bundled OpenClaw skills (included with package)
const skills = await loadSkills({
  useBundled: true
})

// Convert to Strands tools
const tools = await convertSkillsToTools(skills)

// Use with Strands Agent
const agent = new Agent({
  model: new BedrockModel({ region: 'us-east-1' }),
  tools: tools
})

// Agent can now use skills directly as tools!
await agent.invoke('Get the weather for London')

Features

  • 52 Bundled Skills: All OpenClaw skills included and ready to use
  • Skill Loader: Load skills from bundled package or external directories
  • Skill Parser: Parse SKILL.md files with frontmatter and JSON5 metadata
  • Tool Converter: Automatically convert skills to executable Strands tools
  • Type-Safe: Full TypeScript support with proper types
  • Standalone: No OpenClaw dependency required
  • Extensible: Easy to add custom skill directories

API Reference

loadSkills(options?)

Load skills from various sources.

const skills = await loadSkills({
  useBundled: true,        // Include bundled skills (default: true)
  skillsDir: './my-skills', // Primary directory to load from
  extraDirs: [             // Additional directories
    './custom-skills',
    process.env.OPENCLAW_SKILLS_DIR
  ]
})

Returns: Promise<Skill[]> - Array of loaded skills

loadBundledSkills()

Load only the skills bundled with the package.

const bundledSkills = await loadBundledSkills()

loadSkillByName(name, options?)

Load a specific skill by name.

const weatherSkill = await loadSkillByName('weather', {
  useBundled: true
})

convertSkillToTool(skill, options?)

Convert a single skill to a Strands tool.

const tool = await convertSkillToTool(skill, {
  useBash: true,  // Use bash for command execution (default: true)
  executor: customExecutor  // Optional custom executor function
})

Returns: Promise<Tool> - A Strands-compatible tool

convertSkillsToTools(skills, options?)

Convert multiple skills to Strands tools.

const tools = await convertSkillsToTools(skills)

How It Works

Skill Format

Skills are markdown files with YAML frontmatter:

---
name: weather
description: Get current weather and forecasts
metadata: { "openclaw": { "emoji": "🌤️", "requires": { "bins": ["curl"] } } }
---

# Weather

```bash
curl -s "wttr.in/London?format=3"

### Conversion Process

1. **Parse**: Extract frontmatter and content from SKILL.md
2. **Analyze**: Extract CLI command patterns from code blocks
3. **Infer Schema**: Automatically infer Zod input schema from commands
4. **Create Tool**: Generate Strands tool with executable callback

### Example Output

```json
{
  "skillsLoaded": 3,
  "toolsCreated": 3,
  "tools": [
    {
      "name": "weather",
      "description": "Get current weather and forecasts (no API key required).",
      "hasSchema": true
    }
  ]
}

Examples

Basic Usage

import { loadSkills, convertSkillsToTools } from 'clawskills-strands'
import { Agent, BedrockModel } from '@strands-agents/sdk'

const skills = await loadSkills({ useBundled: true })
const tools = await convertSkillsToTools(skills)

const agent = new Agent({
  model: new BedrockModel({ region: 'us-east-1' }),
  tools: tools
})

Custom Skills Directory

const skills = await loadSkills({
  useBundled: true,
  skillsDir: './my-custom-skills',
  extraDirs: ['./workspace-skills']
})

Single Skill

import { loadSkillByName, convertSkillToTool } from 'clawskills-strands'

const skill = await loadSkillByName('github')
const githubTool = await convertSkillToTool(skill)

See examples/ directory for complete examples with outputs.

Skill Conversion Details

Supported Skill Patterns

The converter intelligently handles different skill types:

  • CLI Tools (e.g., gh, memo, curl): Extracts command patterns
  • API Tools (e.g., Notion, GitHub API): Infers parameters from examples
  • Simple Commands: Creates generic command parameter
  • Complex Workflows: Extracts multiple command patterns

Schema Inference

The converter analyzes skill content to infer input schemas:

  • GitHub skills: Infers repo, prNumber, issueNumber, limit
  • Weather skills: Infers location, format
  • Notes skills: Infers action, title, query, folder
  • Generic: Falls back to command + args parameters

Command Building

Commands are built from:

  1. Skill-specific patterns (e.g., GitHub, Weather)
  2. Extracted command templates from markdown
  3. Parameter substitution from user input

Project Structure

clawskills-strands/
├── src/
│   ├── types.ts          # Type definitions
│   ├── parser.ts          # Skill file parser
│   ├── loader.ts          # Skill loader
│   ├── converter.ts       # Skill to tool converter
│   └── index.ts           # Main exports
├── skills/                # Bundled skills (copied from OpenClaw)
├── examples/              # Usage examples
│   ├── src/               # Example source files
│   └── outputs/           # Example run outputs
├── dist/                  # Compiled output
└── package.json

Development

# Install dependencies
npm install

# Build
npm run build

# Test
npm test

# Run examples
npx tsx examples/run-example.ts

Publishing

# Build and test
npm run prepublishOnly

# Publish
npm publish

License

MIT

Contributing

Contributions welcome! This package converts OpenClaw skills to Strands tools, making them directly usable in Strands Agents.