Phase 4 / Ep 20: Advanced Skill Development —— Complex Skill with Scripts and Resource Files
🎯 Learning Objectives: Develop enterprise-grade complex Skills, and master multi-script collaboration and resource management.
1. Complex Skill Structure
crm-manager/
├── SKILL.md # Core instructions
├── scripts/
│ ├── search_contacts.py # Search contacts
│ ├── add_contact.py # Add contact
│ ├── generate_report.py # Generate report
│ └── utils/
│ └── db_connector.py # Database connector
├── resources/
│ ├── report_template.html # Report template
│ ├── email_template.md # Email template
│ └── config.json # Skill configuration
└── examples/
├── search_example.md # Search example
└── report_example.md # Report example
2. Multi-Script Collaboration
Define clear invocation scenarios for each script in SKILL.md:
## Available Operations
### Search Contacts
When the user wants to look up someone's information:
→ Execute scripts/search_contacts.py --name "John Doe"
### Add Contact
When the user wants to add a new contact:
→ Execute scripts/add_contact.py --name "xxx" --phone "xxx" --email "xxx"
### Generate Monthly Report
When the user requests to generate a customer report:
→ Execute scripts/generate_report.py --month 2026-04
→ The report will be generated using resources/report_template.html
3. Resources Directory
The Resources directory stores static resources required by the Skill—templates, configurations, and reference data. The Agent can read these files to assist with tasks.
4. Sharing Skills Across Agents
Place the Skill in a shared directory, and multiple Agents can reference it via symbolic links:
# Shared directory
mkdir -p ~/.openclaw/shared-skills/crm-manager/
# Both Agent A and Agent B reference it
ln -s ~/.openclaw/shared-skills/crm-manager ~/.openclaw/agents/personal/skills/crm-manager
ln -s ~/.openclaw/shared-skills/crm-manager ~/.openclaw/agents/sales-agent/skills/crm-manager
5. Version Management Strategy
- Use Semantic Versioning (SemVer)
- Indicate the version in the frontmatter of SKILL.md
- Major version upgrades require retesting for compatibility
- It is recommended to use Git to manage Skill source code
Coming Up Next: Ep 21: Publish your developed Skill to the ClawHub marketplace for the global community to use.