Advanced OpenClaw Skills: Build Complex Workflows
Advanced OpenClaw skills guide: build complex multi-step workflows, custom tool integrations, and automated agents using the DenchClaw skill system.
Advanced OpenClaw Skills: Build Complex Workflows
Skills are OpenClaw's extension mechanism. A skill is a SKILL.md file that teaches the agent how to use a new capability. For simple use cases, the built-in skills cover everything. For complex, custom workflows — this guide shows you how to build your own.
What Makes a Good Skill#
A skill is not just documentation. It's a structured prompt that tells the agent:
- What the skill does — one clear sentence
- When to use it — specific trigger patterns
- What tools it uses — shell commands, APIs, files
- How to execute — step-by-step instructions
- Error handling — what to do when things go wrong
Skills live in ~/.openclaw-dench/workspace/skills/your-skill/SKILL.md.
Skill SKILL.md Structure#
# [Skill Name] Skill
## What This Skill Does
[One clear sentence]
## When to Use This Skill
Use when: [specific trigger patterns]
Do NOT use when: [anti-patterns]
## Prerequisites
- [Tool/credential required]
- [Any setup steps]
## Execution
### Step 1: [First step]
[Detailed instructions]
```bash
[Command or code]Step 2: [Second step]#
[Continue...]
Error Handling#
- If [error condition]: [how to recover]
Output Format#
[What you return to the user]
## Example: Building a Lead Enrichment Skill
Here's a real example — a skill that enriches contacts using web search:
```markdown
# Lead Enrichment Skill
## What This Skill Does
Enriches a lead's company and LinkedIn profile using web search and returns structured data to update the CRM entry.
## When to Use This Skill
Use when:
- User asks to "enrich" a contact or lead
- User asks to "find info" about a company
- Batch enrichment is requested for multiple leads
## Prerequisites
- DenchClaw workspace with leads/contacts object
- Web search access
## Execution
### Step 1: Get the target lead
Load the lead's current data from DuckDB using the CRM skill.
### Step 2: Search for company information
Search: "[company name] [city] employees funding"
Extract: company size range, industry, funding stage, HQ location
### Step 3: Search for contact information
Search: "[person name] [company name] LinkedIn"
Extract: current title confirmation, LinkedIn URL, recent activity summary
### Step 4: Validate email (if provided)
Use exec to check MX records: `host -t MX [email domain]`
An existing MX record = likely valid email domain
### Step 5: Update the CRM entry
Use the CRM skill to update:
- Industry field
- Company Size field
- LinkedIn URL field
- Funding Stage field
- Set "Enriched At" to today
### Step 6: Report
Return: fields updated, confidence level (high/medium/low), any gaps
## Error Handling
- If company not found: report "Could not find company data" and skip that entry
- If rate limited on search: wait 3 seconds and retry once
- If email domain MX fails: set Email Validated = "Unknown"
Save this as ~/.openclaw-dench/workspace/skills/lead-enrichment/SKILL.md and it's immediately available.
Building a Multi-Step Workflow Skill#
Complex workflows need sequencing. Here's a skill that runs a weekly sales review:
# Weekly Sales Review Skill
## What This Skill Does
Runs a comprehensive weekly sales review: pipeline health check, stale deal alerts, team performance summary, and forecast.
## When to Use This Skill
Use when: user says "run weekly review", "sales review", or it's Monday before 9am (via heartbeat)
## Execution
### Step 1: Pipeline snapshot
Query: SELECT Stage, COUNT(*) as deals, SUM(Value) as total FROM v_deals
WHERE Stage NOT IN ('Closed Won', 'Closed Lost') GROUP BY Stage
### Step 2: Stale deals (no activity in 14+ days)
Query deals where Last Updated < 14 days ago in active stages.
Flag any deal > $10k that's been stale.
### Step 3: Closing this week
Query deals with Close Date within 7 days.
### Step 4: Win/loss last week
Query Closed Won and Closed Lost from last 7 days.
### Step 5: New leads
Count and list top leads added in last 7 days by score.
### Step 6: Generate summary
Compose a structured report with sections above.
Highlight top 3 risks and top 1 opportunity.
### Step 7: Deliver
Send to Telegram. Post to #sales Slack channel if connected.
## Output Format
Bullet-point summary with sections. Emoji indicators:
🟢 On track | 🟡 Watch | 🔴 At riskSkills with External APIs#
Skills can call any external API using exec or dench.http.fetch():
# Apollo Enrichment Skill
## Prerequisites
- APOLLO_API_KEY set in DenchClaw environment
## Execution
### Enrichment call
```bash
curl -H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
--data '{"api_key": "'$APOLLO_API_KEY'", "q_organization_name": "'$COMPANY_NAME'"}' \
https://api.apollo.io/v1/organizations/searchParse the JSON response and extract: employee_count, industry, annual_revenue_printed, primary_domain.
## Skills That Call Other Skills
Skills can chain together:
```markdown
# Lead Processing Skill
## What This Skill Does
Full lead processing pipeline: capture → enrich → score → notify
## Execution
### Step 1
Use the Lead Enrichment skill to fill in missing fields.
### Step 2
Use the Lead Scoring skill to calculate ICP match score.
### Step 3
If score >= 70: notify the sales team via Telegram with lead summary.
If score < 40: set Status to Disqualified and archive.
Otherwise: add to "Manual Review" queue.
Skills for Browser Automation#
Browser automation skills describe what to do in a browser session:
# LinkedIn Profile Scraper Skill
## Prerequisites
- Chrome profile with LinkedIn logged in (handled by DenchClaw)
- LinkedIn not in rate-limited state
## Execution
### Navigate to profile
Open: [LinkedIn URL from entry field]
Wait for: main profile content to load
### Extract fields
- Current company: .pv-entity__secondary-title (first result)
- Current title: [data-field="experience-title"]
- Location: .pv-top-card--list-bullet li:first-child
- Connection degree: .dist-value
### Extract recent activity
Scroll to Activity section.
Get last 3 posts: post text, date, engagement count.
### Return data
Structured JSON with all extracted fields.
Update CRM entry with extracted data.
## Rate Limiting
Add 2-second delay between consecutive profile loads.
If "We don't have enough data" appears: skip this profile and log as unavailable.Publishing Skills to ClawHub#
Once your skill is working, share it:
- Test thoroughly: Run it on 10+ real cases.
- Write the SKILL.md: Follow the template strictly.
- Add a README: Human-readable description with examples.
- Create a version: Semantic versioning (1.0.0).
cd ~/.openclaw-dench/workspace/skills/my-skill
clawhub publishOther DenchClaw users can install: Install the [skill-name] skill from clawhub
Debugging Skills#
When a skill doesn't work as expected:
Debug the lead enrichment skill. Show me exactly what steps you're following and why each one is succeeding or failing.
The agent narrates its execution, showing which parts of the SKILL.md it's following and where it gets stuck.
For structured logging, add explicit reporting steps to your skill:
After each major step, emit: "Step [N] complete: [what was done] ✓"
If any step fails: "Step [N] failed: [error] — skipping and continuing"For more on the DenchClaw platform including the App Builder and CRM system, see what is DenchClaw. For the power user guide with advanced DuckDB patterns, see DenchClaw power user guide.
Frequently Asked Questions#
How is a skill different from an OpenClaw tool?#
A tool is compiled code with a JSON schema that OpenClaw calls as a function. A skill is a markdown instruction file that tells the agent how to use existing tools. Skills are easier to write and share; tools are more precise and performant.
Can skills access the internet?#
Yes, via exec with curl or fetch, and via the web_search and web_fetch tools available to the agent.
How do I version control my skills?#
Your skills are in ~/.openclaw-dench/workspace/skills/. That directory is part of your workspace, which you can version with git. cd ~/.openclaw-dench/workspace && git init to start tracking.
Can I monetize skills on ClawHub?#
Yes — ClawHub supports paid skill listings. Pricing is handled by the marketplace.
What's the maximum complexity for a skill?#
No hard limit. Skills can be multiple pages long with detailed instructions for complex multi-step workflows. The limiting factor is context window — very long skills should use references/ sub-documents.
Ready to try DenchClaw? Install in one command: npx denchclaw. Full setup guide →
