Content Workflow Engine
Automate end-to-end content workflows from ideation to publication and distribution. This skill provides tools and patterns for creating scalable content pipelines that integrate AI generation, scheduling, publishing, and analytics.
Quick Start
Basic Content Pipeline
CODEBLOCK0
Common Use Cases
- 1. Blog Content Pipeline: AI ideation → AI writing → SEO optimization → WordPress publishing → Social media sharing
- Social Media Calendar: Content batching → Platform formatting → Scheduled posting → Engagement tracking
- Newsletter Workflow: Content collection → Template filling → Email sending → Open rate monitoring
- Video Content Pipeline: Script generation → Voice synthesis → Video editing → YouTube upload → Description optimization
Workflow Decision Tree
Follow this decision tree to choose the right workflow pattern:
CODEBLOCK1
Core Capabilities
1. Content Ideation & Planning
- - AI Brainstorming: Generate content ideas based on keywords, trends, or audience
- Content Calendar Management: Schedule and organize content across platforms
- Topic Research: Gather information and sources for content creation
Example: Generate blog ideas
CODEBLOCK2
2. Content Creation & Generation
- - AI Writing Assistance: Generate drafts, expand outlines, rewrite content
- Multi-format Support: Create content for blogs, social media, emails, scripts
- Brand Voice Consistency: Maintain consistent tone and style across content
Example: Create blog post from outline
CODEBLOCK3
3. Content Optimization
- - SEO Optimization: Add keywords, meta descriptions, and optimize structure
- Readability Scoring: Improve content clarity and engagement
- Platform-specific Formatting: Adapt content for different platforms (Twitter, LinkedIn, etc.)
Example: Optimize blog post for SEO
CODEBLOCK4
4. Publishing & Distribution
- - Platform Integration: Publish to WordPress, Medium, Substack, etc.
- Social Media Scheduling: Schedule posts across platforms
- Email Newsletter Distribution: Send to mailing lists
Example: Publish to WordPress and schedule social media
CODEBLOCK5
5. Analytics & Monitoring
- - Performance Tracking: Monitor views, engagement, conversions
- A/B Testing: Test different content variations
- ROI Calculation: Measure content effectiveness
Example: Generate content performance report
CODEBLOCK6
Workflow Templates
Template 1: Automated Blog Pipeline
CODEBLOCK7
Usage:
CODEBLOCK8
Template 2: Social Media Content Batch
CODEBLOCK9
Usage:
CODEBLOCK10
Template 3: Newsletter Automation
CODEBLOCK11
Usage:
CODEBLOCK12
Integration Guide
Supported Platforms
Publishing Platforms
- - WordPress: REST API integration for automatic posting
- Medium: API for story creation and publishing
- Substack: Email-based newsletter distribution
- Ghost: Headless CMS API support
Social Media Platforms
- - Twitter/X: API v2 for posting and scheduling
- LinkedIn: API for company/page posts
- Facebook: Graph API for page management
- Instagram: Basic Display API (limited automation)
Email Services
- - Mailchimp: API for campaign management
- ConvertKit: API for email automation
- SendGrid: Transactional email API
Analytics Tools
- - Google Analytics: Data API for performance tracking
- Plausible: Simple analytics API
- Fathom: Privacy-focused analytics
API Configuration
Store API credentials in environment variables or config file:
CODEBLOCK13
Setup script:
CODEBLOCK14
Error Handling & Monitoring
Common Issues
- 1. API Rate Limits: Implement exponential backoff and request queuing
- Content Formatting Errors: Validate content before publishing
- Platform Policy Violations: Check content against platform guidelines
- Network Failures: Implement retry logic with circuit breakers
Monitoring Setup
CODEBLOCK15
Performance Optimization
Batch Processing
- - Process content in batches to reduce API calls
- Schedule non-urgent tasks during off-peak hours
- Use local caching for frequently accessed data
Parallel Execution
- - Run independent workflow stages in parallel
- Use worker queues for high-volume content
- Implement load balancing across similar tasks
Cost Optimization
- - Use cheaper AI models for draft generation
- Cache API responses when possible
- Schedule content during low-traffic periods
Resources
Scripts (scripts/)
- -
create_workflow.py - Create new workflow definitions - INLINECODE2 - Execute workflow with input data
- INLINECODE3 - Generate content ideas
- INLINECODE4 - AI-assisted content creation
- INLINECODE5 - SEO optimization tools
- INLINECODE6 - Platform publishing integration
- INLINECODE7 - Social media scheduling
- INLINECODE8 - Performance reporting
- INLINECODE9 - Pre-built workflow templates
References (references/)
- -
scheduled_blog.md - Detailed guide for scheduled blog pipelines - INLINECODE12 - Multi-platform social media workflows
- INLINECODE13 - Automated newsletter systems
- INLINECODE14 - Complex video content pipelines
- INLINECODE15 - Complete API integration guide
- INLINECODE16 - Troubleshooting and error recovery
- INLINECODE17 - Optimization techniques
Assets (assets/)
- -
templates/ - Content templates for different formats - INLINECODE20 - Configuration file examples
- INLINECODE21 - Example workflow definitions
- INLINECODE22 - Logos, images, and brand materials
Getting Help
Common Questions
Q: My workflow is failing at the publishing stage.
A: Check API credentials and platform permissions. Run INLINECODE23
Q: Content quality from AI is inconsistent.
A: Adjust prompt templates and add more context. See INLINECODE24
Q: How do I handle platform rate limits?
A: Implement queuing and backoff. Use INLINECODE25
Q: Can I customize workflows for my specific needs?
A: Yes, edit workflow definitions in assets/examples/ and modify as needed.
Debug Mode
Enable debug logging for troubleshooting:
CODEBLOCK16
View detailed logs:
CODEBLOCK17
Best Practices
- 1. Start Simple: Begin with 2-3 stage workflows before adding complexity
- Test Thoroughly: Run workflows in test mode before production
- Monitor Actively: Set up alerts for workflow failures
- Iterate Gradually: Add new stages one at a time
- Document Changes: Keep workflow documentation updated
- Backup Configurations: Regularly backup workflow definitions
- Review Performance: Monthly review of workflow effectiveness
- Stay Compliant: Regularly check platform API terms of service
Version History
- - v1.0: Initial release with basic workflow orchestration
- v1.1: Added social media scheduling and analytics
- v1.2: Enhanced error handling and monitoring
- v1.3: Added video content pipeline support
- v1.4: Improved performance and cost optimization
Note: This skill requires API access to various platforms. Ensure you have proper authentication and comply with platform terms of service.
技能名称: content-workflow-engine
详细描述:
内容工作流引擎
自动化从构思到发布和分发的内容端到端工作流。该技能提供用于创建可扩展内容管道的工具和模式,集成AI生成、调度、发布和分析功能。
快速入门
基础内容管道
bash
创建新的内容工作流
python3 scripts/create_workflow.py --name blog-pipeline --type blog
向工作流添加阶段
python3 scripts/add_stage.py --workflow blog-pipeline --stage ideation --tool ai-brainstorm
python3 scripts/add_stage.py --workflow blog-pipeline --stage writing --tool ai-writer
python3 scripts/add_stage.py --workflow blog-pipeline --stage editing --tool grammar-check
python3 scripts/add_stage.py --workflow blog-pipeline --stage publishing --tool wordpress
python3 scripts/add_stage.py --workflow blog-pipeline --stage distribution --tool social-media
运行工作流
python3 scripts/run_workflow.py --workflow blog-pipeline --input topic: AI content automation
常见用例
- 1. 博客内容管道:AI构思 → AI写作 → SEO优化 → WordPress发布 → 社交媒体分享
- 社交媒体日历:内容批量处理 → 平台格式化 → 定时发布 → 互动追踪
- 新闻通讯工作流:内容收集 → 模板填充 → 邮件发送 → 打开率监控
- 视频内容管道:脚本生成 → 语音合成 → 视频编辑 → YouTube上传 → 描述优化
工作流决策树
按照此决策树选择合适的工作流模式:
开始 → 内容类型?
├── 博客/文章 → 需要调度?
│ ├── 是 → 使用定时博客管道 (references/scheduled_blog.md)
│ └── 否 → 使用快速博客管道 (references/quick_blog.md)
├── 社交媒体 → 多平台?
│ ├── 是 → 使用多平台社交管道 (references/social_multi.md)
│ └── 否 → 使用单平台社交管道 (references/social_single.md)
├── 新闻通讯 → 定期节奏?
│ ├── 是 → 使用自动化新闻通讯管道 (references/newsletter_auto.md)
│ └── 否 → 使用一次性新闻通讯管道 (references/newsletter_oneoff.md)
└── 视频/音频 → 复杂编辑?
├── 是 → 使用高级视频管道 (references/video_advanced.md)
└── 否 → 使用简单视频管道 (references/video_simple.md)
核心能力
1. 内容构思与规划
- - AI头脑风暴:基于关键词、趋势或受众生成内容创意
- 内容日历管理:跨平台调度和组织内容
- 主题研究:收集内容创作所需的信息和来源
示例:生成博客创意
bash
python3 scripts/brainstorm.py --topic content automation --count 10 --format blog
2. 内容创作与生成
- - AI写作辅助:生成草稿、扩展大纲、重写内容
- 多格式支持:为博客、社交媒体、邮件、脚本创建内容
- 品牌语调一致性:保持内容语调风格统一
示例:根据大纲创建博客文章
bash
python3 scripts/writecontent.py --type blog --outline references/outlineai_content.md --tone professional
3. 内容优化
- - SEO优化:添加关键词、元描述,优化结构
- 可读性评分:提升内容清晰度和互动性
- 平台特定格式化:适配不同平台(Twitter、LinkedIn等)
示例:优化博客文章的SEO
bash
python3 scripts/optimize_seo.py --input draft.md --keywords content automation, AI writing, workflow
4. 发布与分发
- - 平台集成:发布到WordPress、Medium、Substack等
- 社交媒体调度:跨平台定时发布帖子
- 邮件新闻通讯分发:发送到邮件列表
示例:发布到WordPress并调度社交媒体
bash
python3 scripts/publish.py --platform wordpress --content final_post.md --schedule now
python3 scripts/schedulesocial.py --platforms twitter,linkedin --content socialsnippets.md --schedule tomorrow 9am
5. 分析与监控
- - 性能追踪:监控浏览量、互动量、转化率
- A/B测试:测试不同内容变体
- ROI计算:衡量内容效果
示例:生成内容性能报告
bash
python3 scripts/analyticsreport.py --period last30_days --metrics views,engagement,conversions
工作流模板
模板1:自动化博客管道
- 1. 构思(每日)
- 扫描细分领域热门话题
- 生成5个文章创意
- 基于关键词难度选择最佳
- 2. 写作(AI辅助)
- 创建详细大纲
- 生成初稿
- 用示例和数据扩展
- 3. 优化
- SEO优化
- 可读性改进
- 添加内/外链
- 4. 发布
- 格式化为WordPress
- 添加特色图片
- 安排发布时间
- 5. 分发
- 创建社交媒体片段
- 跨平台调度
- 加入新闻通讯队列
用法:
bash
python3 scripts/workflowtemplates/blogautomated.py --topic your niche --frequency weekly
模板2:社交媒体内容批量处理
- 1. 内容规划(每周)
- 规划每周主题
- 创建内容日历
- 分配内容类型(图片、视频、文字)
- 2. 内容创作(批量)
- 创建整周所有帖子
- 生成匹配的视觉素材
- 撰写标题和标签
- 3. 调度
- 上传到调度工具
- 设置最佳发布时间
- 添加互动提示
- 4. 监控
- 追踪互动指标
- 回复评论
- 调整未来内容
用法:
bash
python3 scripts/workflowtemplates/socialbatch.py --platforms instagram,twitter,linkedin --days 7
模板3:新闻通讯自动化
- 1. 内容收集(每周)
- 收集本周博客文章
- 选择行业新闻
- 添加个人评论
- 2. 模板填充
- 使用新闻通讯模板
- 插入内容部分
- 添加个性化标记
- 3. 测试与发送
- 发送测试给自己
- 检查格式
- 安排发送时间
- 4. 性能追踪
- 监控打开率
- 追踪点击率
- 更新订阅者分组
用法:
bash
python3 scripts/workflowtemplates/newsletterauto.py --source blogposts --template weeklyroundup
集成指南
支持的平台
发布平台
- - WordPress:REST API集成,用于自动发布
- Medium:用于故事创建和发布的API
- Substack:基于邮件的新闻通讯分发
- Ghost:无头CMS API支持
社交媒体平台
- - Twitter/X:用于发布和调度的API v2
- LinkedIn:用于公司/页面帖子的API
- Facebook:用于页面管理的Graph API
- Instagram:基础展示API(自动化有限)
邮件服务
- - Mailchimp:用于活动管理的API
- ConvertKit:用于邮件自动化的API
- SendGrid:事务性邮件API
分析工具
- - Google Analytics:用于性能追踪的数据API
- Plausible:简单分析API
- Fathom:注重隐私的分析工具
API配置
将API凭据存储在环境变量或配置文件中:
bash
示例 .env 文件
WORDPRESS_URL=https://yourblog.com/wp-json
WORDPRESS
USER=yourusername
WORDPRESS
APPPASSWORD=your
apppassword
TWITTERAPIKEY=your_key
TWITTERAPISECRET=your_secret
TWITTERACCESSTOKEN=your_token
TWITTERACCESSSECRET=your_secret
MAILCHIMPAPIKEY=your_key
MAILCHIMPLISTID=your_list
设置脚本:
bash
python3 scripts/setup_integrations.py --config