name: Drafty description: Create, manage, and publish blog posts on Drafty.com using the Drafty API
Drafty Blog Management Skill
This skill helps you create, edit, and manage blog posts on Drafty.com directly from Claude Code.
What is Drafty?
Drafty is a modern blogging platform focused on clean writing and publishing. Your blog lives at drafty.com/@username.
Authentication
To use this skill, you need a Drafty Pro account with an API key. Get yours at:
- Go to https://www.drafty.com/dash
- Settings → Advanced → Developer Tools
- Copy your API key (starts with
drafty_)
Store it in your environment:
export DRAFTY_API_KEY="drafty_xxxxx"
Core Workflows
Creating a New Post
When a user asks to create a blog post:
- Draft the content in Markdown format
- Generate a title (concise, SEO-friendly)
- Call the API to publish:
curl -X POST https://www.drafty.com/api/integrations/posts \
-H "Content-Type: application/json" \
-H "X-Drafty-API-Key: $DRAFTY_API_KEY" \
-d '{
"title": "Understanding AI Agents",
"content": "# Understanding AI Agents\n\nAI agents are...",
"visibility": "public",
"tags": ["ai", "agents"]
}'
- Return the post URL to the user
Listing Existing Posts
To see recent posts:
curl https://www.drafty.com/api/integrations/posts?limit=10 \
-H "X-Drafty-API-Key: $DRAFTY_API_KEY"
Returns JSON with post metadata and URLs.
Updating a Post
To update an existing post:
curl -X PATCH https://www.drafty.com/api/integrations/posts/{postId} \
-H "Content-Type: application/json" \
-H "X-Drafty-API-Key: $DRAFTY_API_KEY" \
-d '{
"title": "Updated Title",
"content": "# Updated Content\n\n...",
"visibility": "public"
}'
Best Practices
Content Guidelines
- Markdown format: Use standard Markdown with GFM extensions
- Title optimization: Keep titles under 60 characters for SEO
- Post structure: Start with H1 (
#), use logical heading hierarchy - Code blocks: Use triple backticks with language tags
- Images: Reference external URLs or use Unsplash integration
Visibility Options
public: Visible on your blog and in searchunlisted: Accessible via direct link onlyprivate: Only visible to you when logged in
Tags
- Use lowercase, hyphenated tags:
"ai-agents","web-development" - Maximum 5 tags per post for best organization
- Tags create automatic filtering on your blog
Common Tasks
"Write a blog post about X"
- Research the topic (if needed)
- Draft Markdown content with proper structure
- Generate an SEO-friendly title
- Choose appropriate tags
- Create the post via API
- Return the published URL
"List my recent posts"
- Call GET endpoint with reasonable limit (10-20)
- Format results in readable table
- Include post URLs for easy access
"Update my latest post"
- List posts to get the most recent
- Extract the post ID
- Make requested changes to title/content
- Update via PATCH endpoint
- Confirm update with URL
Error Handling
Authentication Errors (401)
- Verify API key is set:
echo $DRAFTY_API_KEY - Check key starts with
drafty_ - Ensure key is valid (not expired/regenerated)
Rate Limits (429)
- Free users: 10 posts/hour
- Pro users: Higher limits
- Wait and retry after cooldown
Validation Errors (400)
- Ensure title and content are not empty
- Check visibility is one of: public, unlisted, private
- Verify JSON structure is correct
API Reference
Base URL: https://www.drafty.com/api/integrations
POST /posts
Create a new blog post
Request Body:
{
"title": "string (required)",
"content": "string (required, Markdown)",
"visibility": "public|unlisted|private (default: public)",
"tags": ["string"] (optional)
}
Response:
{
"success": true,
"postId": "abc123",
"url": "https://drafty.com/@username/post-slug"
}
GET /posts?limit=N
List user's posts (max limit: 50)
Response:
{
"posts": [
{
"id": "abc123",
"title": "Post Title",
"slug": "post-slug",
"visibility": "public",
"url": "https://drafty.com/@username/post-slug",
"publishedAt": "2025-01-16T12:00:00Z"
}
]
}
PATCH /posts/{postId}
Update an existing post
Request Body (all fields optional):
{
"title": "string",
"content": "string (Markdown)",
"visibility": "public|unlisted|private",
"tags": ["string"]
}
Response:
{
"success": true,
"url": "https://drafty.com/@username/post-slug"
}
Examples
See examples.md for complete workflow examples.
Advanced Features
OAuth Integration
For web apps, use OAuth instead of API keys. See /docs/CUSTOM_GPT_GUIDE.md for details.
MCP Server
For Claude Desktop integration, see /docs/MCP_SERVER_GUIDE.md for building an MCP server.
Getting Help
- API Issues: Check https://www.drafty.com/docs/api
- Skill Issues: Review error messages and validate API key
- Feature Requests: support@drafty.com