DEV Community

Davide Conte
Davide Conte

Posted on

I built a TypeScript boilerplate for OpenClaw skills — scaffold and publish to ClaWHub in one command

If you've been building OpenClaw skills, you've probably noticed something: there's no official TypeScript template. Every developer is copy-pasting the same SKILL.md structure, setting up tsconfig, wiring tools — from scratch, every time.

I got tired of it. So I built a scaffold CLI.

What it does

npx openclaw-skill-boilerplate my-skill
Enter fullscreen mode Exit fullscreen mode

One command. You get a complete, publish-ready OpenClaw skill project:

  • ✅ Valid SKILL.md with correct OpenClaw frontmatter
  • ✅ TypeScript strict mode
  • src/tools.ts + types.ts pattern
  • {{SKILL_NAME}} placeholder replacement in all templates
  • ✅ GitHub Actions CI (build + typecheck)
  • ✅ ClaWHub publish-ready structure

The problem it solves

OpenClaw's skill spec requires a specific SKILL.md frontmatter format:

---
name: my-skill
description: "What your skill does"
version: 0.1.0
author: your-name
tags:
  - category
triggers:
  - natural language trigger phrase
---
Enter fullscreen mode Exit fullscreen mode

Get it wrong and the skill won't load. Add to that the TypeScript setup, the tools pattern, the package.json bin config — it's 30+ minutes of setup before you write a single line of actual skill logic.

With this boilerplate: 30 seconds.

Project structure

my-skill/
├── SKILL.md           # OpenClaw entrypoint
├── package.json
├── tsconfig.json
└── src/
    ├── index.ts       # Main skill logic
    ├── tools.ts       # Tool definitions
    └── types.ts       # Shared types
Enter fullscreen mode Exit fullscreen mode

Publishing to ClaWHub

Once your skill is ready:

npm run build
npx clawhub@latest publish
Enter fullscreen mode Exit fullscreen mode

That's it.

Links

Open source, MIT. PRs welcome — especially if you've hit edge cases with the SKILL.md spec I haven't covered yet.

Top comments (0)