Content Writer
Generate AI-powered content for blogs, social media, and emails with tone adjustment and platform-specific formatting.
Capabilities
- Blog Post Generation: Create structured blog posts with customizable length and tone
- Social Media Captions: Platform-optimized content for Twitter/X, LinkedIn, Instagram, Facebook
- Email Templates: Professional emails for welcome sequences, follow-ups, promotions, newsletters
- Tone Adjustment: Choose from professional, casual, friendly, formal, enthusiastic, empathetic, authoritative, witty
- Template System: Built-in templates with variable substitution for quick content creation
- Content History: All generated content is saved to SQLite for future reference
Installation
cd skills/content-writer
npm install
npm run build
Usage
CLI
# Generate a blog post
npx content-writer generate --topic "AI in Business" --type blog --tone professional --words 500
# Generate a social media post
npx content-writer generate -T "Product Launch" -t social -p linkedin --tone enthusiastic
# Generate an email
npx content-writer generate -T "Welcome" -t email -e welcome --tone friendly
# View generation history
npx content-writer history --limit 10
# View statistics
npx content-writer stats
# List available templates
npx content-writer templates
# List available tones
npx content-writer tones
Library
import { ContentWriterSkill } from '@openclaw/content-writer';
const writer = new ContentWriterSkill();
// Generate a blog post
const blogPost = await writer.generateContent({
topic: "The Future of AI",
contentType: "blog",
tone: "professional",
wordCount: 800,
keywords: ["AI", "technology", "future"],
audience: "business leaders",
callToAction: "Subscribe to our newsletter for more insights!"
});
console.log(blogPost.content);
// Generate a social media post
const socialPost = await writer.generateContent({
topic: "New Product Launch",
contentType: "social",
platform: "linkedin",
tone: "enthusiastic",
keywords: ["productlaunch", "innovation", "tech"],
callToAction: "Learn more at our website!"
});
// Generate an email
const email = await writer.generateContent({
topic: "Welcome to Our Service",
contentType: "email",
emailType: "welcome",
tone: "friendly",
audience: "new subscribers"
});
// Get generation history
const history = await writer.getHistory('blog', 10);
// Get templates
const templates = await writer.getTemplates('email');
// Apply a template with variables
const template = templates[0];
const content = writer.applyTemplate(template, {
companyName: "Acme Corp",
firstName: "John",
benefit1: "24/7 Support",
benefit2: "Free Training",
benefit3: "Priority Access",
senderName: "Jane",
senderTitle: "Customer Success"
});
await writer.close();
Content Types
Blog Posts
- Configurable word count
- SEO keyword integration
- Structured with introduction, sections, and conclusion
- Call-to-action support
Social Media
Platform-specific constraints and optimizations:
- Twitter/X: 280 character limit, 3 recommended hashtags
- LinkedIn: 3000 character limit, 5 recommended hashtags
- Instagram: 2200 character limit, up to 30 hashtags
- Facebook: 63206 character limit, up to 10 hashtags
Emails
Email types available:
- welcome: Onboarding new subscribers
- follow-up: Professional follow-ups
- promotional: Sales and offers
- newsletter: Regular updates
- cold-outreach: Initial contact emails
- thank-you: Appreciation emails
Tones
- professional: Clear, business-appropriate language
- casual: Relaxed, conversational style
- friendly: Warm and approachable
- formal: Proper grammar, sophisticated vocabulary
- enthusiastic: Excited and energetic
- empathetic: Understanding and compassionate
- authoritative: Expert and confident
- witty: Clever and humorous
Database
Content is stored in SQLite at ~/.openclaw/skills/content-writer/content.db:
- generated_content: All generated content with metadata
- content_templates: Reusable templates with variables
- tone_preferences: Default tone preferences per content type
No External Dependencies
This skill uses local AI generation patterns and does not require external API keys. It works entirely offline.
1---2name: content-writer3description: Generate content using AI - blog posts, social media captions, email templates4---56# Content Writer78Generate AI-powered content for blogs, social media, and emails with tone adjustment and platform-specific formatting.910## Capabilities1112- **Blog Post Generation**: Create structured blog posts with customizable length and tone13- **Social Media Captions**: Platform-optimized content for Twitter/X, LinkedIn, Instagram, Facebook14- **Email Templates**: Professional emails for welcome sequences, follow-ups, promotions, newsletters15- **Tone Adjustment**: Choose from professional, casual, friendly, formal, enthusiastic, empathetic, authoritative, witty16- **Template System**: Built-in templates with variable substitution for quick content creation17- **Content History**: All generated content is saved to SQLite for future reference1819## Installation2021```bash22cd skills/content-writer23npm install24npm run build25```2627## Usage2829### CLI3031```bash32# Generate a blog post33npx content-writer generate --topic "AI in Business" --type blog --tone professional --words 5003435# Generate a social media post36npx content-writer generate -T "Product Launch" -t social -p linkedin --tone enthusiastic3738# Generate an email39npx content-writer generate -T "Welcome" -t email -e welcome --tone friendly4041# View generation history42npx content-writer history --limit 104344# View statistics45npx content-writer stats4647# List available templates48npx content-writer templates4950# List available tones51npx content-writer tones52```5354### Library5556```typescript57import { ContentWriterSkill } from '@openclaw/content-writer';5859const writer = new ContentWriterSkill();6061// Generate a blog post62const blogPost = await writer.generateContent({63 topic: "The Future of AI",64 contentType: "blog",65 tone: "professional",66 wordCount: 800,67 keywords: ["AI", "technology", "future"],68 audience: "business leaders",69 callToAction: "Subscribe to our newsletter for more insights!"70});7172console.log(blogPost.content);7374// Generate a social media post75const socialPost = await writer.generateContent({76 topic: "New Product Launch",77 contentType: "social",78 platform: "linkedin",79 tone: "enthusiastic",80 keywords: ["productlaunch", "innovation", "tech"],81 callToAction: "Learn more at our website!"82});8384// Generate an email85const email = await writer.generateContent({86 topic: "Welcome to Our Service",87 contentType: "email",88 emailType: "welcome",89 tone: "friendly",90 audience: "new subscribers"91});9293// Get generation history94const history = await writer.getHistory('blog', 10);9596// Get templates97const templates = await writer.getTemplates('email');9899// Apply a template with variables100const template = templates[0];101const content = writer.applyTemplate(template, {102 companyName: "Acme Corp",103 firstName: "John",104 benefit1: "24/7 Support",105 benefit2: "Free Training",106 benefit3: "Priority Access",107 senderName: "Jane",108 senderTitle: "Customer Success"109});110111await writer.close();112```113114## Content Types115116### Blog Posts117- Configurable word count118- SEO keyword integration119- Structured with introduction, sections, and conclusion120- Call-to-action support121122### Social Media123Platform-specific constraints and optimizations:124- **Twitter/X**: 280 character limit, 3 recommended hashtags125- **LinkedIn**: 3000 character limit, 5 recommended hashtags126- **Instagram**: 2200 character limit, up to 30 hashtags127- **Facebook**: 63206 character limit, up to 10 hashtags128129### Emails130Email types available:131- **welcome**: Onboarding new subscribers132- **follow-up**: Professional follow-ups133- **promotional**: Sales and offers134- **newsletter**: Regular updates135- **cold-outreach**: Initial contact emails136- **thank-you**: Appreciation emails137138## Tones139140- **professional**: Clear, business-appropriate language141- **casual**: Relaxed, conversational style142- **friendly**: Warm and approachable143- **formal**: Proper grammar, sophisticated vocabulary144- **enthusiastic**: Excited and energetic145- **empathetic**: Understanding and compassionate146- **authoritative**: Expert and confident147- **witty**: Clever and humorous148149## Database150151Content is stored in SQLite at `~/.openclaw/skills/content-writer/content.db`:152153- **generated_content**: All generated content with metadata154- **content_templates**: Reusable templates with variables155- **tone_preferences**: Default tone preferences per content type156157## No External Dependencies158159This skill uses local AI generation patterns and does not require external API keys. It works entirely offline.