Writing Skills for Openclaw

A meta-skill that applies Test-Driven Development principles to create, test, and optimize documentation for AI agent capabilities.

freshman94
v1.0.0
Mar 2, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install write-skills-demo

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install write-skills-demo using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Writing Skills?

Writing Skills is essentially Test-Driven Development (TDD) applied to process documentation. It provides a structured framework for developers to create reliable and discoverable AI agent capabilities. Instead of just writing a guide, you follow a rigorous Red-Green-Refactor cycle: you write a test case (a pressure scenario), watch the agent fail to comply, write the documentation, and then verify that the agent follows the instructions. This methodology ensures that any Openclaw Skills you develop are truly effective at guiding agent behavior.

The core principle is simple: if you haven't observed an agent fail without the skill, you cannot be certain the skill addresses the correct problem. By treating documentation as production code, this skill helps maintain a high standard of quality across all Openclaw Skills, making them reusable, concise, and resistant to agent rationalizations.

Writing Skills Use Cases

  • Creating new reusable techniques, patterns, or tools for AI agents.
  • Modifying existing capabilities to close behavioral loopholes.
  • Standardizing complex workflows that require specific agent discipline.
  • Optimizing agent performance through better search discovery in the Openclaw Skills ecosystem.
  • Testing agent compliance under high-pressure scenarios like time constraints or sunk cost fallacies.

How Writing Skills Works

  1. RED Phase: Create a pressure scenario and run it with a subagent without the skill to document baseline failures and verbatim rationalizations.
  2. GREEN Phase: Write a minimal SKILL.md document that specifically addresses the identified failures.
  3. Verification: Run the same scenario with the skill active to ensure the agent now complies with the instructions.
  4. REFACTOR Phase: Identify any new rationalizations the agent uses to bypass the rules and update the Openclaw Skills document to close those loopholes.
  5. Optimization: Apply Claude Search Optimization (CSO) to ensure the skill is discoverable by using rich descriptions and relevant keywords.

Writing Skills Setup

To start developing your own Openclaw Skills, navigate to your agent's skill directory and create a new folder for your skill.

# Navigate to the skills directory
cd ~/.claude/skills # For Claude Code
# Create a new skill directory
mkdir my-new-skill
# Create the mandatory markdown file
touch my-new-skill/SKILL.md

Ensure your SKILL.md contains the required YAML frontmatter with name and description fields before adding your content.

Writing Skills Data Schema & Taxonomy

Each of the Openclaw Skills follows a strict directory and file structure to ensure compatibility and efficiency:

Component Requirement Description
SKILL.md Required The main reference file containing YAML frontmatter and Markdown content.
Frontmatter Required YAML block with name (kebab-case) and description (starts with 'Use when...').
Supporting files Optional Used for heavy references (>100 lines) or reusable scripts/tools.
Flowcharts Optional Mermaid or Graphviz diagrams for non-obvious decision points.
Examples Required At least one high-quality, runnable code example in a relevant language.

Writing Skills Advanced Features

  • Claude Search Optimization (CSO): Techniques to make Openclaw Skills discoverable by agents through trigger-based descriptions.
  • Rationalization Tables: Explicitly mapping common agent excuses to reality to prevent rule-breaking.
  • Token Efficiency: Strategies to keep frequently loaded Openclaw Skills under specific word counts (e.g., <150 words for workflows).
  • Pressure Scenario Testing: Methodologies for testing agent discipline using authority, exhaustion, and scarcity pressures.
  • Graphviz Integration: Guidelines for using flowcharts to visualize complex logic without cluttering text.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*