Back to Skills

content-agent

majiayu000
Updated Today
2 views
58
9
58
View on GitHub
Metaaidata

About

The content-agent skill generates personalized marketing content like emails and proposals by analyzing contact data and interaction history. It uses Claude AI to create contextually relevant drafts for review when specific engagement triggers are met. This tool is ideal for automating high-quality, data-driven content creation within the Unite-Hub platform.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/content-agent

Copy and paste this command in Claude Code to install this skill

Documentation

Content Generation Agent Skill

Overview

The Content Agent creates personalized, high-converting marketing content by:

  1. Reading contact profiles and interaction history
  2. Analyzing engagement patterns and sentiment
  3. Generating contextually relevant content using Claude
  4. Storing drafts for human review/approval
  5. Tracking performance metrics

Content Types

1. Followup Email

When to generate:

  • Contact received email 7+ days ago (nextFollowUp date passed)
  • Status is "lead" or "prospect"
  • AI score > 60 (engaged)

Context to include:

  • Reference their last interaction
  • Mention their company/industry
  • Highlight relevant case study or service
  • Include clear CTA

Example prompt:

Generate a professional followup email for:
- Name: John Smith
- Company: TechStartup Inc
- Job Title: CEO
- Last interaction: "Interested in Q4 marketing services"
- Sentiment: positive
- Industry: Technology

The email should:
1. Reference their interest in partnership
2. Mention 1 specific success story relevant to tech startups
3. Propose a 15-minute strategy call
4. Be warm but professional
5. Keep under 150 words

2. Proposal Email

When to generate:

  • Contact has shown high engagement (AI score > 80)
  • Status is "prospect"
  • Multiple positive interactions

Context to include:

  • Personalized value proposition
  • Estimated ROI/results
  • Timeline and deliverables
  • Investment/pricing range
  • Next steps

Example prompt:

Generate a proposal email for:
- Name: Lisa Johnson
- Company: eCommerce Solutions
- Pain point: "Revamping marketing strategy"
- Budget indicator: Mid-market (medium budget)
- Timeline: Q4 2024

The proposal should:
1. Address their specific pain point
2. Outline 3-4 key deliverables
3. Mention expected metrics (e.g., "35% revenue increase")
4. Suggest 60-day engagement
5. Request a call to discuss

3. Case Study Reference

When to generate:

  • Contact from specific industry
  • AI score indicates readiness
  • Relevant success story exists

Context to include:

  • Similar company/industry case study
  • Key metrics and results
  • How it applies to their situation

How the Agent Works

Step 1: Identify Target Contacts

Query contacts where:

status = "prospect" OR "lead"
aiScore > 60
nextFollowUp <= NOW

Step 2: For Each Contact

A. Load Contact History

GET contact details
GET contact's emails (interaction history)
GET any previous generated content for this contact

B. Build Context Object

{
  name: "John Smith",
  company: "TechStartup Inc",
  jobTitle: "CEO",
  industry: "Technology",
  aiScore: 78,
  sentiment: "positive",
  lastInteraction: "Interested in Q4 partnership",
  emailsSent: 2,
  engagementDays: 15,
  hasProposalBefore: false
}

C. Determine Content Type

Logic:

IF aiScore > 80 AND !hasProposalBefore
  → Generate "proposal"
ELSE IF aiScore > 60 AND lastInteraction > 7 days ago
  → Generate "followup"
ELSE IF industry has matching case study
  → Generate "case_study_reference"
ELSE
  → Generate "general_followup"

D. Build Claude Prompt

Template:

You are a professional B2B marketing copywriter for a marketing agency.

Generate a [CONTENT_TYPE] email for:
- Name: [NAME]
- Company: [COMPANY]
- Job Title: [JOB_TITLE]
- Industry: [INDUSTRY]
- Last interaction: [LAST_INTERACTION]
- Sentiment of previous emails: [SENTIMENT]
- Our success with similar companies: [CASE_STUDY_BRIEF]

Requirements:
1. Personalized to their specific situation
2. Reference their industry/company when possible
3. Include specific, measurable outcomes (if proposal)
4. Professional but warm tone
5. Clear call-to-action
6. [TYPE_SPECIFIC_REQUIREMENTS]

Keep under [WORD_LIMIT] words.

Generate the email body only (no "Subject:" or greeting).

E. Call Claude API

POST https://api.anthropic.com/v1/messages

{
  "model": "claude-sonnet-4-5-20250929",
  "max_tokens": 1000,
  "system": "You are an expert B2B marketing copywriter...",
  "messages": [
    {
      "role": "user",
      "content": "[BUILT_PROMPT]"
    }
  ]
}

F. Parse Response

Extract text from response:

response.content[0].text

G. Store as Draft

Call Convex mutation:

POST convex mutation content.store({
  orgId: "...",
  workspaceId: "...",
  contactId: "[CONTACT_ID]",
  contentType: "[TYPE]",
  title: "[AUTO_GENERATED_TITLE]",
  prompt: "[USED_PROMPT]",
  text: "[CLAUDE_RESPONSE]",
  aiModel: "sonnet",
  htmlVersion: null // Optional HTML formatting
})

H. Log Audit Event

POST convex mutation system.logAudit({
  orgId: "...",
  action: "content_generated",
  resource: "generatedContent",
  agent: "content-agent",
  details: {
    contactId: "...",
    contentType: "[TYPE]",
    aiScore: 78,
    tokensUsed: 234
  },
  status: "success"
})

Step 3: Summary Report

Output:

✅ Content Generation Complete

Total generated: X
Followup emails: X
Proposals: X
Case studies: X
Drafts awaiting approval: X

By AI score:
- High priority (>80): X contacts
- Medium priority (60-80): X contacts

Sample generated content:
- John Smith (TechStartup): Followup email
- Lisa Johnson (eCommerce): Proposal

Next steps:
1. Review drafts in dashboard
2. Approve/edit content
3. Schedule for sending
4. Track performance metrics

Error Handling

If Claude API call fails:

Log audit event with status: "error"
Try fallback: Use template-based content
Continue to next contact

If contact data incomplete:

Skip contact with warning
Log as skipped in audit trail

Performance Tracking

After content is approved and sent:

Track:
- Opens (if integration available)
- Clicks
- Replies
- Conversions

Update generatedContent record with metrics:
{
  status: "sent",
  sentAt: timestamp,
  performanceMetrics: {
    opens: 0,
    clicks: 0,
    replies: 0
  }
}

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/content-agent

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill