Skip to main content

Skill Development

Create and publish your own skills for the ZhenSkill marketplace

Overview

Skills are modular extensions that add specific capabilities to Claude Code. By creating a skill, you can share functionality with the community and help other developers be more productive.

This guide will walk you through the process of creating, testing, and publishing a skill to the ZhenSkill marketplace.

Prerequisites

Before creating a skill, you should have:

  • Node.js 18+ and npm installed
  • The clawhub CLI installed (installation guide)
  • Claude Code CLI installed and configured
  • Basic understanding of JavaScript/TypeScript
  • A GitHub account (for hosting your skill's code)
  • A ZhenSkill account (for publishing)

Skill Structure

A ZhenSkill skill follows a standardized directory structure:

my-skill/
├── skill.json # Skill manifest (required)
├── README.md # Documentation (required)
├── LICENSE # License file (required)
├── src/ # Source code
│ ├── index.ts # Main entry point
│ └── ...
├── tests/ # Test files
│ └── ...
├── examples/ # Example usage (recommended)
│ └── ...
├── package.json # Node dependencies
├── tsconfig.json # TypeScript config (if using TS)
└── .gitignore

Skill Manifest

The skill.json file is the heart of your skill. It defines metadata, capabilities, and configuration.

Minimal Example

{
"name": "my-skill",
"displayName": "My Awesome Skill",
"version": "1.0.0",
"description": "A brief description of what this skill does",
"author": "Your Name",
"authorEmail": "you@example.com",
"license": "MIT",
"category": "development",
"tags": ["tool", "automation"],
"platform": ["macos", "linux", "windows"],
"requiresApiKey": false
}

Complete Schema

FieldTypeRequiredDescription
namestringYesUnique skill identifier (lowercase, hyphens)
displayNamestringYesHuman-readable name
versionstringYesSemantic version (e.g., "1.0.0")
descriptionstringYesShort description (max 200 chars)
longDescriptionstringNoDetailed description (Markdown)
authorstringYesAuthor name
authorEmailstringYesContact email
licensestringYesLicense identifier (e.g., "MIT")
categorystringYesPrimary category
tagsstring[]NoSearch tags
platformstring[]YesSupported platforms
requiresApiKeybooleanYesRequires external API keys
homepagestringNoProject homepage URL
repositorystringNoSource code repository URL

Available Categories

  • video-media - Video and media processing
  • development - Development tools
  • data-analytics - Data and analytics
  • automation - Automation and workflows
  • documentation - Documentation tools
  • search-discovery - Search and discovery
  • design - Design and creative tools
  • productivity - Productivity tools

Development

Create a New Skill

Use the clawhub CLI to scaffold a new skill:

clawhub create my-skill

This will create a new directory with the basic structure and template files.

Implement Your Skill

Create your main entry point in src/index.ts:

import { Skill } from '@zhenskill/skill-sdk'
export default class MySkill extends Skill {
async execute(params: any) {
// Your skill logic here
return {
success: true,
data: "Hello from my skill!"
}
}
}

Add Dependencies

If your skill needs external packages, add them to package.json:

npm install --save axios

Testing Your Skill

Local Testing

Test your skill locally before publishing:

# Build your skill
npm run build
# Test locally
clawhub test ./dist

Unit Tests

Write unit tests in the tests/ directory:

import { test, expect } from '@jest/globals'
import MySkill from '../src/index'
test('skill executes successfully', async () => {
const skill = new MySkill()
const result = await skill.execute()
expect(result.success).toBe(true)
})

Run tests with:

npm test

Integration Testing

Test your skill with Claude Code:

# Link your skill for testing
clawhub link ./
# Now use it in Claude Code
# Ask Claude to use your skill

Publishing Your Skill

Pre-publish Checklist

All required files present (skill.json, README.md, LICENSE)
Tests passing (npm test)
Documentation complete and accurate
Version follows semantic versioning
No sensitive information in code
License file included

Build for Production

npm run build

Publish to ZhenSkill

First, login to your ZhenSkill account:

clawhub login

Then publish your skill:

clawhub publish

The CLI will validate your skill, upload it to the registry, and make it available in the marketplace.

Updating Your Skill

To publish an update:

  1. Update your code
  2. Increment the version in skill.json
  3. Update the changelog/README
  4. Run clawhub publish again

Best Practices

Code Quality

  • Write clear, documented code
  • Follow TypeScript/JavaScript best practices
  • Handle errors gracefully
  • Validate user inputs
  • Use meaningful variable and function names

Documentation

  • Write a comprehensive README with:
    • Clear description of what the skill does
    • Installation instructions
    • Usage examples
    • Configuration options
    • Troubleshooting tips
  • Include code examples that actually work
  • Document all configuration options
  • Keep documentation up-to-date with code changes

Security

  • Never hardcode API keys or secrets
  • Use environment variables for sensitive data
  • Validate and sanitize all inputs
  • Keep dependencies updated
  • Follow the principle of least privilege

Performance

  • Minimize external dependencies
  • Use async/await for I/O operations
  • Cache results when appropriate
  • Provide progress feedback for long operations
  • Clean up resources (files, connections)

Versioning

  • Follow semantic versioning
  • Document breaking changes clearly
  • Maintain a changelog
  • Test thoroughly before releasing major versions

User Experience

  • Provide clear error messages
  • Use descriptive parameter names
  • Include helpful defaults
  • Show progress for long-running operations
  • Make the skill easy to configure

Example Skills

Learn by example! Check out these popular skills to see how they're structured:


Getting Help

Need help developing your skill?