← 返回
内容创作 Key 中文

Write My Blog

Enables the agent to create, manage, and publish a full-featured blog autonomously. The agent can write posts, upload media, switch between 10 premium design...
使智能体能够自主创建、管理和发布功能完善的博客,可撰写文章、上传媒体并切换10种高级设计。
harshraj001
内容创作 clawhub v0.1.0 1 版本 99914.1 Key: 需要
★ 2
Stars
📥 1,123
下载
💾 45
安装
1
版本
#latest

概述

Write My Blog Skill

You 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.

Quick Start

1. Initial Setup

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:

  • Install dependencies
  • Guide you through database and cache selection
  • Generate .env.local configuration
  • Run database migrations
  • Create an admin user

2. Starting the Dev Server

cd <skill-directory>/platform
npm run dev

The blog will be available at http://localhost:3000.

3. Writing & Publishing Posts

Use the REST API to create posts. All API calls require the X-API-Key header.

Create a Post

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": ""
  }'

List Posts

curl http://localhost:3000/api/posts \
  -H "X-API-Key: YOUR_API_KEY"

Get a Single Post

curl http://localhost:3000/api/posts/my-first-post \
  -H "X-API-Key: YOUR_API_KEY"

Update a Post

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."
  }'

Delete a Post

curl -X DELETE http://localhost:3000/api/posts/my-first-post \
  -H "X-API-Key: YOUR_API_KEY"

4. Managing Themes

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

5. Uploading Media

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.

6. Viewing Analytics

curl http://localhost:3000/api/analytics \
  -H "X-API-Key: YOUR_API_KEY"

7. Updating Blog Settings

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
  }'

8. Deployment

Deploy to Vercel

bash <skill-directory>/scripts/deploy-vercel.sh

Deploy to Cloudflare

bash <skill-directory>/scripts/deploy-cloudflare.sh

API Reference

MethodEndpointDescription
---------------------------------------------------------------
POST/api/postsCreate a new blog post
GET/api/postsList 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/mediaUpload media file
GET/api/themesList available themes
PUT/api/themesSwitch active theme
GET/api/analyticsGet blog analytics
PUT/api/settingsUpdate blog settings

Content Guidelines

When writing blog posts:

  1. Use Markdown format for content
  2. Always provide a meaningful slug (URL-friendly, lowercase, hyphens)
  3. Include an excerpt (1-2 sentences) for SEO
  4. Add relevant tags as an array of strings
  5. Set status to "draft" or "published"
  6. Upload images via /api/media first, then reference the returned URL

Security Notes

  • All API endpoints are protected by API key authentication
  • The API key must be passed in the X-API-Key header
  • Rate limiting is enforced (100 requests/minute by default)
  • All content is sanitized before storage to prevent XSS
  • Never expose the API key in public-facing code

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 08:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 862 📥 200,282
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,254
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,125