OpenClaw Plugins Guide: Extend Your Agent
Plugins let you add new capabilities to your OpenClaw agent without modifying core code. Learn to build, install, and share plugins.
The real power of OpenClaw comes from its plugin architecture. Instead of waiting for official features, you can build exactly what you need — or install plugins created by the community.
What Are Plugins?
Plugins are self-contained Python modules that add new tools, skills, or integrations to your agent. They live in the skills/ directory and are automatically discovered when your agent starts.
📦 Plugin Structure
skills/
├── weather/
│ ├── __init__.py # Plugin entry point
│ ├── client.py # API client
│ └── tools.py # Agent tools
├── stocks/
│ ├── __init__.py
│ └── tools.py
└── my_custom/
└── __init__.py
Building Your First Plugin
Let's create a simple weather plugin:
# skills/weather/__init__.py import requests def get_weather(city): """Get weather for a city""" url = f"https://wttr.in/{city}?format=%C+%t" try: response = requests.get(url, timeout=5) if response.status_code == 200: return response.text.strip() return "Weather service unavailable" except requests.Timeout: return "Request timed out" # Register with agent def setup(agent): agent.register_tool( name="weather", func=get_weather, description="Get current weather for a city" )
Installing Community Plugins
The community maintains plugins for hundreds of services:
- Clone into
skills/directory - Install dependencies if needed
- Restart your agent
# Install a community plugin cd skills git clone https://github.com/openclaw-plugins/spotify.git # Install dependencies pip install -r spotify/requirements.txt # Restart agent docker-compose restart
Best Practices
✅ Do's
- Keep plugins focused on one purpose
- Handle errors gracefully
- Document required environment variables
- Add timeouts to API calls
❌ Don'ts
- Don't hardcode API keys
- Don't make synchronous calls that block
- Don't modify core agent files
- Don't ignore rate limits
🚀 Build Something Great
Start with a simple plugin that solves a problem you have. Share it with the community!
Browse Community Plugins →