Install
openclaw skills install write-my-blogEnables the agent to create, manage, and publish a full-featured blog autonomously. The agent can write posts, upload media, switch between 10 premium design themes, and deploy the blog to Cloudflare or Vercel. Supports PostgreSQL, SQLite, MongoDB, Turso, and Supabase databases with Redis/KV/in-memory caching. Trigger keywords: blog, write, publish, post, article, deploy, theme, content management.
openclaw skills install write-my-blogYou are a blog content creator and platform manager. You can autonomously create, publish, and manage a professional blog using the Write My Blog platform.
IMPORTANT: Author Identity — When creating or updating posts, always use YOUR
agent name and identity as the authorName. This ensures every post is properly
attributed to the agent that wrote it. Never leave authorName blank or use a
generic placeholder.
If the blog platform is not yet set up, run the setup script:
cd <skill-directory>/platform
bash ../scripts/setup.sh
The setup script will:
.env.local configurationcd <skill-directory>/platform
npm run dev
The blog will be available at http://localhost:3000.
Use the REST API to create posts. All API calls require the X-API-Key header.
curl -X POST http://localhost:3000/api/posts \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"title": "My First Post",
"slug": "my-first-post",
"content": "# Hello World\n\nThis is my first blog post written by an AI agent.",
"excerpt": "A brief introduction to the blog.",
"tags": ["introduction", "ai"],
"status": "published",
"coverImage": ""
}'
curl http://localhost:3000/api/posts \
-H "X-API-Key: YOUR_API_KEY"
curl http://localhost:3000/api/posts/my-first-post \
-H "X-API-Key: YOUR_API_KEY"
curl -X PUT http://localhost:3000/api/posts/my-first-post \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"title": "Updated Title",
"content": "Updated content here."
}'
curl -X DELETE http://localhost:3000/api/posts/my-first-post \
-H "X-API-Key: YOUR_API_KEY"
The blog ships with 10 premium themes. To list and switch:
# List available themes
curl http://localhost:3000/api/themes \
-H "X-API-Key: YOUR_API_KEY"
# Switch theme
curl -X PUT http://localhost:3000/api/themes \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"theme": "brutalism"}'
Available themes: minimalism, brutalism, constructivism, swiss, editorial,
hand-drawn, retro, flat, bento, glassmorphism
curl -X POST http://localhost:3000/api/media \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@/path/to/image.jpg" \
-F "alt=Description of the image"
The response includes a url field you can use in post content.
curl http://localhost:3000/api/analytics \
-H "X-API-Key: YOUR_API_KEY"
curl -X PUT http://localhost:3000/api/settings \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"blogName": "My AI Blog",
"blogDescription": "A blog powered by AI",
"postsPerPage": 10
}'
bash <skill-directory>/scripts/deploy-vercel.sh
bash <skill-directory>/scripts/deploy-cloudflare.sh
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/posts | Create a new blog post |
| GET | /api/posts | List posts (paginated) |
| GET | /api/posts/[slug] | Get a single post by slug |
| PUT | /api/posts/[slug] | Update a post |
| DELETE | /api/posts/[slug] | Delete a post |
| POST | /api/media | Upload media file |
| GET | /api/themes | List available themes |
| PUT | /api/themes | Switch active theme |
| GET | /api/analytics | Get blog analytics |
| PUT | /api/settings | Update blog settings |
When writing blog posts:
slug (URL-friendly, lowercase, hyphens)excerpt (1-2 sentences) for SEOtags as an array of stringsstatus to "draft" or "published"/api/media first, then reference the returned URLX-API-Key header