Agent Skills Framework Extension
Content Marketing Patterns Skill
When to Use This Skill
Use this skill when implementing content marketing patterns patterns in your codebase.
How to Use This Skill
- Review the patterns and examples below
- Apply the relevant patterns to your implementation
- Follow the best practices outlined in this skill
Technical content creation, developer relations strategies, and documentation-driven marketing.
Core Capabilities
- Technical Blog Posts - In-depth technical articles
- Tutorial Creation - Step-by-step guides
- Documentation Marketing - Docs as growth driver
- SEO Optimization - Search-optimized content
- Developer Relations - Community engagement content
- Content Calendar - Strategic content planning
Technical Blog Post Generator
scripts/blog-post-generator.py
from dataclasses import dataclass from typing import List, Dict from datetime import datetime
@dataclass class BlogPost: title: str slug: str summary: str content: str keywords: List[str] target_audience: str reading_time: int seo_score: float
class TechnicalBlogGenerator: """Generate technical blog posts"""
def generate(
self,
topic: str,
angle: str,
target_audience: str = "intermediate developers"
) -> BlogPost:
"""Generate blog post"""
title = self._create_title(topic, angle)
slug = self._create_slug(title)
keywords = self._extract_keywords(topic)
content_sections = [
self._write_introduction(topic, angle),
self._write_problem_statement(topic),
self._write_solution(topic),
self._write_code_examples(topic),
self._write_best_practices(topic),
self._write_conclusion(topic)
]
content = "\n\n".join(content_sections)
reading_time = self._calculate_reading_time(content)
seo_score = self._calculate_seo_score(title, content, keywords)
return BlogPost(
title=title,
slug=slug,
summary=self._create_summary(topic, angle),
content=content,
keywords=keywords,
target_audience=target_audience,
reading_time=reading_time,
seo_score=seo_score
)
def _create_title(self, topic: str, angle: str) -> str:
"""Create compelling title"""
templates = [
f"How to {angle} with {topic}: A Complete Guide",
f"{topic} Best Practices: {angle}",
f"Mastering {topic}: {angle} for Production",
]
return templates[0]
def _create_slug(self, title: str) -> str:
"""Create URL slug"""
return title.lower().replace(' ', '-').replace(':', '')
def _extract_keywords(self, topic: str) -> List[str]:
"""Extract SEO keywords"""
base_keywords = topic.lower().split()
return base_keywords + [f"{topic.lower()} tutorial", f"how to {topic.lower()}"]
def _write_introduction(self, topic: str, angle: str) -> str:
"""Write introduction"""
return f"""# Introduction
{topic} is a powerful approach to {angle}. In this guide, we'll explore how to implement {topic} effectively in production environments.
What you'll learn:
-
Core concepts of {topic}
-
Production-ready implementations
-
Best practices and common pitfalls
-
Real-world code examples"""
def _write_problem_statement(self, topic: str) -> str: return f"""## The Problem
Without {topic}, developers face challenges in implementation and maintenance."""
def _write_solution(self, topic: str) -> str:
return f"""## The Solution
{topic} provides a structured approach to solving these challenges."""
def _write_code_examples(self, topic: str) -> str:
return f"""## Code Examples
Example implementation
def example_{topic.lower().replace(' ', '_')}(): pass
def _write_best_practices(self, topic: str) -> str:
return f"""## Best Practices
1. Start simple
2. Add complexity gradually
3. Test thoroughly"""
def _write_conclusion(self, topic: str) -> str:
return f"""## Conclusion
{topic} is essential for modern development."""
def _create_summary(self, topic: str, angle: str) -> str:
return f"Learn how to {angle} with {topic} in this comprehensive guide."
def _calculate_reading_time(self, content: str) -> int:
"""Calculate reading time in minutes"""
words = len(content.split())
return max(1, words // 200)
def _calculate_seo_score(self, title: str, content: str, keywords: List[str]) -> float:
"""Calculate SEO score"""
score = 0.0
# Title length (50-60 chars ideal)
if 50 <= len(title) <= 60:
score += 0.3
# Keyword density
content_lower = content.lower()
for keyword in keywords[:3]:
if keyword in content_lower:
score += 0.2
return min(score, 1.0)
# Usage
generator = TechnicalBlogGenerator()
post = generator.generate(
topic="Async Python",
angle="build high-performance APIs",
target_audience="intermediate Python developers"
)
print(f"Title: {post.title}")
print(f"Reading Time: {post.reading_time} min")
print(f"SEO Score: {post.seo_score:.2f}")
## Documentation-as-Marketing Framework
```typescript
// scripts/docs-marketing.ts
interface DocsSection {
title: string;
content: string;
type: 'getting-started' | 'tutorial' | 'reference' | 'guide';
cta?: string; // Call to action
}
class DocsMarketingOptimizer {
/**
* Optimize documentation for marketing
*/
optimize(sections: DocsSection[]): DocsSection[] {
return sections.map(section => {
const optimized = { ...section };
// Add CTAs to strategic sections
if (section.type === 'getting-started') {
optimized.cta = 'Start building with our free tier →';
} else if (section.type === 'tutorial') {
optimized.cta = 'See more examples in our cookbook →';
}
// Add SEO-friendly titles
optimized.title = this.optimizeTitle(section.title);
// Add code examples if missing
if (!section.content.includes('```')) {
optimized.content = this.addCodeExample(section.content);
}
return optimized;
});
}
private optimizeTitle(title: string): string {
// Add "How to" for better SEO
if (!title.toLowerCase().startsWith('how to')) {
return `How to ${title}`;
}
return title;
}
private addCodeExample(content: string): string {
return content + '\n\n```typescript\n// Example code\n```';
}
}
// Usage
const optimizer = new DocsMarketingOptimizer();
const sections: DocsSection[] = [
{
title: 'Get Started',
content: 'Install the SDK...',
type: 'getting-started'
}
];
const optimized = optimizer.optimize(sections);
## Content Calendar Planner
```python
scripts/content-calendar.py
from dataclasses import dataclass from datetime import datetime, timedelta from typing import List
@dataclass class ContentPiece: title: str type: str # 'blog', 'tutorial', 'video', 'docs' publish_date: datetime keywords: List[str] status: str # 'planned', 'draft', 'review', 'published'
class ContentCalendarPlanner: """Plan content calendar"""
def create_quarterly_calendar(
self,
quarter_start: datetime,
topics: List[str]
) -> List[ContentPiece]:
"""Create 90-day content calendar"""
calendar = []
# Weekly cadence
current_date = quarter_start
topic_index = 0
for week in range(12): # 12 weeks in quarter
if topic_index < len(topics):
topic = topics[topic_index]
# Monday: Blog post
calendar.append(ContentPiece(
title=f"{topic}: Deep Dive",
type="blog",
publish_date=current_date,
keywords=[topic.lower()],
status="planned"
))
# Wednesday: Tutorial
calendar.append(ContentPiece(
title=f"Tutorial: Building with {topic}",
type="tutorial",
publish_date=current_date + timedelta(days=2),
keywords=[f"{topic.lower()} tutorial"],
status="planned"
))
topic_index += 1
current_date += timedelta(weeks=1)
return calendar
Usage
planner = ContentCalendarPlanner()
topics = ["Async Python", "Docker Deployment", "API Design"] calendar = planner.create_quarterly_calendar( quarter_start=datetime(2025, 1, 1), topics=topics )
for piece in calendar[:5]: print(f"{piece.publish_date.date()}: {piece.title} ({piece.type})")
Usage Examples
Technical Blog Generation
Apply content-marketing-patterns skill to generate blog post about Rust async programming for intermediate developers
Documentation Optimization
Apply content-marketing-patterns skill to optimize getting-started docs with CTAs and SEO
Content Calendar
Apply content-marketing-patterns skill to create quarterly content calendar for developer audience
## Integration Points
- **educational-content-patterns** - Tutorial creation
- **research-patterns** - Technical accuracy
- **competitive-analysis** - Market positioning
---
## Success Output
When successful, this skill MUST output:
✅ SKILL COMPLETE: content-marketing-patterns
Completed:
- Content strategy defined for target audience
- Blog post/tutorial/documentation generated with SEO optimization
- Technical accuracy verified
- Content calendar created (if applicable)
- Reading time and SEO score calculated
Outputs:
- Generated content file (*.md or *.html)
- SEO keywords list
- Content calendar (if created)
- Analytics baseline metrics
## Completion Checklist
Before marking this skill as complete, verify:
- [ ] Target audience and content angle clearly defined
- [ ] Content generated with proper structure (intro, problem, solution, examples, conclusion)
- [ ] SEO optimization applied (title length, keyword density, meta description)
- [ ] Code examples tested and functional
- [ ] Reading time calculated and appropriate for audience
- [ ] All technical claims verified for accuracy
- [ ] CTAs included where appropriate
- [ ] Content formatted for target platform (blog, docs, social)
## Failure Indicators
This skill has FAILED if:
- ❌ Content generated without clear target audience definition
- ❌ SEO score below 0.6 (60%)
- ❌ Code examples contain syntax errors or don't run
- ❌ Technical inaccuracies present in content
- ❌ Content length inappropriate for stated reading time
- ❌ Missing required sections (introduction, conclusion, examples)
- ❌ No keyword research or optimization applied
## When NOT to Use
**Do NOT use this skill when:**
- Creating internal documentation (use `codi-documentation-writer` instead)
- Writing API reference docs (use `api-design-patterns` instead)
- Generating pure tutorial content without marketing goals (use `educational-content-patterns`)
- Creating sales copy or marketing materials without technical depth (use `copywriting-patterns`)
- Producing academic or research papers (use `research-patterns`)
- Drafting legal or compliance documentation
- Simple blog announcements without technical content
## Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|--------------|---------|----------|
| Keyword stuffing | Damages readability and SEO rankings | Use natural keyword density (2-3% max) |
| No target audience research | Generic content that resonates with no one | Define specific developer persona first |
| Missing code examples | Reduces technical credibility | Include at least 2-3 working code samples |
| Ignoring SEO best practices | Content won't be discovered organically | Apply SEO scoring and optimization |
| Over-technical jargon | Alienates broader audience | Match complexity to audience level |
| No CTA or next steps | Readers don't know what to do next | Always include clear call-to-action |
| Creating content in isolation | Doesn't fit broader content strategy | Plan content calendar first |
## Principles
This skill embodies:
- **#1 Recycle → Extend → Re-Use → Create** - Reuse content frameworks and SEO patterns
- **#3 Keep It Simple** - Clear, accessible technical writing
- **#5 Eliminate Ambiguity** - Specific audience targeting and clear messaging
- **#6 Clear, Understandable, Explainable** - Developer-friendly explanations
- **#10 Quality Over Speed** - Well-researched, accurate technical content
**Full Principles:** [CODITECT-STANDARD-AUTOMATION.md](/reference/standards/coditect-standard-automation)