Skip to content
Back to skills

Write My Blog

ASecurity

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

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
databasesgobashsqlapidatabasesecurity

Works with

  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro scans all 20 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add johnalbertini14-glitch/openclaw-skills --skill write-my-blog --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write My Blog?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Write My Blog
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/johnalbertini14-glitch-write-my-blog/badge)](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-write-my-blog)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: write-my-blog
description: >
  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 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.
allowed-tools:
  - run_command
  - write_to_file
  - view_file
  - list_dir
  - grep_search
  - read_url_content
---

# 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:

```bash
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

```bash
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

```bash
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

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

#### Get a Single Post

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

#### Update a Post

```bash
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

```bash
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:

```bash
# 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

```bash
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

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

### 7. Updating Blog Settings

```bash
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
bash <skill-directory>/scripts/deploy-vercel.sh
```

#### Deploy to Cloudflare

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

## API Reference

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

## 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

Files in this skill

  • README.md4.3 KB
  • SKILL.md5.4 KB
  • _meta.json283 B
  • platform/next-env.d.ts228 B
  • platform/next.config.mjs971 B
  • platform/package-lock.json91.2 KB
  • platform/package.json1.1 KB
  • platform/src/app/api/analytics/route.ts721 B
  • platform/src/app/api/media/route.ts2.3 KB
  • platform/src/app/api/posts/[slug]/route.ts3.7 KB
  • platform/src/app/api/posts/route.ts3.7 KB
  • platform/src/app/api/settings/route.ts1.5 KB
  • platform/src/app/api/themes/route.ts3 KB
  • platform/src/app/globals.css2.3 KB
  • platform/src/app/layout.tsx1.6 KB
  • platform/src/app/page.tsx2.5 KB
  • platform/src/app/post/[slug]/page.tsx2.4 KB
  • platform/src/lib/auth/middleware.ts4.6 KB
  • platform/src/lib/cache/adapter.ts323 B
  • platform/src/lib/cache/index.ts1010 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.