Writing

From oyi77/1ai-skills · View interactive version

Writing is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when full-stack content production factory — ad copy, emails, long-form articles, product descriptions. Turn words into revenue with data-driven writing pipelines.

How to use this skill

Skill file

Overview

This skill is the full-stack content production factory — ad copy, emails, long-form articles, and product descriptions — with data-driven writing pipelines. Use it when words are the deliverable and volume matters. It turns briefs into on-brand copy at scale.

Content Writing Factory — Ad Copy, Emails, Long-Form, Product Descriptions

When Not to Use

Dependencies

Commands

# Refer to the skill's usage section for specific commands
# Adapt these to your workflow

Money-Making Overview

| Service | Client Price | Your Time | ROI |

|---------|-------------|-----------|-----|

| Ad copy (5 variations) | $500–$2,000 | 1–2 hrs | $400–$1,000/hr |

| Email sequence (5 emails) | $750–$3,000 | 2–4 hrs | $300–$750/hr |

| Long-form article (2,000 words) | $400–$1,500 | 1–2 hrs | $300–$750/hr |

| Product description (10 items) | $300–$1,000 | 1 hr | $300–$1,000/hr |

| Full content bundle (all 4 types) | $2,000–$7,000 | 5–10 hrs | $400–$700/hr |

Target clients: E-commerce brands, SaaS startups, newsletters, agencies, course creators who need copy that converts but can't afford a full-time copywriter.

Delivery model: Per-project pricing or monthly retainer ($2,000–$5,000/mo for 4 articles + 2 email sequences + ad copy).

Combined Capabilities

| Capability | Best For | Output Format | Avg Conversion Lift |

|-----------|----------|--------------|-------------------|

| Ad Copy | Meta, Google, TikTok, LinkedIn ads | Headline + body + CTA (5 variants) | 15–40% CTR improvement |

| Email Writing | Newsletters, sequences, sales | Plain-text or HTML emails | 20–50% open rate, 3–10% click rate |

| Long-Form Content | SEO blogs, thought leadership, guides | 1,500–3,000 word articles | 5–20x organic traffic |

| Product Descriptions | E-commerce, SaaS features, landing pages | Feature-benefit bullets + SEO copy | 10–30% conversion uplift |

Concrete Action Flow

Phase 1: Brief & Research (30 min)

import json
from dataclasses import dataclass, asdict

@dataclass
class ContentBrief:
    project_type: str  # "ad_copy" | "email" | "long_form" | "product_desc"
    client: str
    product_or_topic: str
    target_audience: str
    tone: str  # professional, casual, urgent, luxury
    key_benefits: list[str]
    call_to_action: str
    seo_keywords: list[str] = None
    competitor_examples: list[str] = None
    platform: str = "web"

    def to_prompt(self) -> str:
        return f"""
Write {self.project_type.replace('_', ' ')} for {self.client}.
Topic: {self.product_or_topic}
Audience: {self.target_audience}
Tone: {self.tone}
Key Benefits: {', '.join(self.key_benefits)}
CTA: {self.call_to_action}
Keywords: {', '.join(self.seo_keywords or [])}
Platform: {self.platform}
"""


# Save brief for repeatable workflow
def save_brief(brief: ContentBrief, path: str = "brief.json"):
    with open(path, "w") as f:
        json.dump(asdict(brief), f, indent=2)

Phase 2: Ad Copy Generation (1 hr)

def generate_ad_variants(
    product: str,
    audience: str,
    benefits: list[str],
    cta: str,
    platform: str = "facebook",
) -> list[dict]:
    """
    Generate 5 ad copy variations using different hooks.
    Returns list of { headline, body, cta } dicts.
    """
    hooks = {
        "problem": f"Stop {audience.lower()} from losing money on {product.lower()}.",
        "result": f"Get {benefits[0].lower()} — starting today.",
        "curiosity": f"Most {audience.lower()} don't know about this {product.lower()} secret.",
        "social": f"Join {audience.lower()} who switched to {product.lower()}.",
        "urgency": f"Last chance to get {benefits[0].lower()} with {product.lower()}.",
    }

    variants = []
    for hook_type, headline in hooks.items():
        body = compile_ad_body(hook_type, product, audience, benefits)
        variants.append({
            "variant": hook_type,
            "headline": headline,
            "body": body,
            "cta": cta,
            "platform": platform,
        })
    return variants


def compile_ad_body(hook: str, product: str, audience: str, benefits: list[str]) -> str:
    """Build ad body copy from structured components."""
    bullet_benefits = "\n".join(f"  ✓ {b}" for b in benefits)
    bodies = {
        "problem": f"Are you {audience.lower()} tired of:\n{bullet_benefits}\n\n{product} fixes all of that. Here's how:",
        "result": f"What if you could {benefits[0].lower()} in the next 24 hours?\n\n{product} makes it possible:\n{bullet_benefits}",
        "curiosity": f"Here's something most {audience.lower()} get wrong about {product.lower()}.\n\nThe truth is simpler than you think:\n{bullet_benefits}",
        "social": f"{len(benefits)} reasons {audience.lower()} choose {product}:\n{bullet_benefits}\n\nSee what the hype is about.",
        "urgency": f"Time is running out.\n\n{product} delivers {benefits[0].lower()} — but only for a limited time:\n{bullet_benefits}",
    }
    return bodies.get(hook, bullet_benefits)

Phase 3: Email Sequence Writing (2 hrs)

def generate_email_sequence(
    product: str,
    audience: str,
    benefits: list[str],
    cta: str,
    sender_name: str = "Team",
) -> list[dict]:
    """
    Generate a 5-email sales sequence.
    """
    sequence = [
        {
            "subject": f"Quick question for {audience.lower()}",
            "preview": "I have a thought...",
            "body": f"Hey there,\n\nI noticed you're {audience.lower()}. I wanted to share something that's been helping people like you get {benefits[0].lower()}.\n\nMore tomorrow,\n{sender_name}",
        },
        {
            "subject": f"The {benefits[0]} problem (and how to fix it)",
            "preview": "Here's what most people miss...",
            "body": f"Hi again,\n\nMost {audience.lower()} struggle with {benefits[0].lower()}. They try everything but nothing sticks.\n\n{product} was built specifically for this. Let me show you how:\n\n" + "\n".join(f"• {b}" for b in benefits) + f"\n\nCheck it out: {cta}\n\n{sender_name}",
        },
        {
            "subject": f"Real results from {audience.lower()}",
            "preview": "See what others are saying...",
            "body": f"Hey,\n\nDon't take my word for it. Here's what other {audience.lower()} achieved with {product}:\n\n\"{benefits[0]} in just 2 weeks!\"\n\"Finally, a solution that works.\"\n\"Wish I found this sooner.\"\n\nYou could be next.\n\n{cta}\n\n{sender_name}",
        },
        {
            "subject": f"Still thinking about {benefits[0].lower()}?",
            "preview": "Let me address your concerns...",
            "body": f"Hi,\n\nIf you're still on the fence, here are the most common questions I get:\n\nQ: Does it really work?\nA: {benefits[0]} is exactly what {product} delivers, guaranteed.\n\nQ: Is it right for me?\nA: If you're {audience.lower()}, yes.\n\nQ: What if it doesn't work?\nA: You're covered. No risk.\n\nReady to decide? {cta}\n\n{sender_name}",
        },
        {
            "subject": f"Final chance — {benefits[0].lower()}",
            "preview": "This is your last email from me...",
            "body": f"Hey,\n\nI wanted to give you one last opportunity to try {product}.\n\n{benefits[0].lower()} is just a click away:\n\n{cta}\n\nIf now's not the right time, no hard feelings. I'll see you down the road.\n\nBest,\n{sender_name}",
        },
    ]
    return sequence

Phase 4: Long-Form Article (2 hrs)

def generate_article_outline(
    topic: str,
    audience: str,
    keywords: list[str],
    sections: int = 6,
) -> list[dict]:
    """
    Generate an SEO-optimized long-form article outline.
    Returns list of { heading, sub_points, word_target, keywords }.
    """
    outline = [
        {
            "heading": f"Introduction: Why {topic} Matters for {audience}",
            "sub_points": [
                f"The current state of {topic}",
                f"Why {audience} should care",
                "What you will learn in this guide",
            ],
            "word_target": 250,
            "keywords": [topic, f"{topic} guide"],
        },
    ]
    for i in range(1, sections):
        outline.append({
            "heading": f"Section {i}: {'Key ' if i > 1 else ''}Strategy {i} — {' '.join(topic.split()[:3])}",
            "sub_points": [
                f"Understanding {topic} from {audience} perspective",
                "Step-by-step implementation",
                "Common mistakes to avoid",
            ],
            "word_target": 350,
            "keywords": [f"{topic} strategy", f"{topic} tips"],
        })
    outline.append({
        "heading": "Conclusion: Your Next Steps",
        "sub_points": [
            "Recap of key takeaways",
            "Immediate action items",
            "Resources for further reading",
        ],
        "word_target": 200,
        "keywords": [f"{topic} summary", f"{topic} next steps"],
    })
    return outline


def estimate_read_time(word_count: int) -> str:
    """Estimate reading time for an article."""
    minutes = max(1, round(word_count / 200))
    return f"{minutes} min read"


def extract_headings(outline: list[dict]) -> str:
    """Extract markdown headings from outline."""
    lines = ["# " + outline[0]["heading"].replace("Introduction: ", "") + "\n"]
    for sec in outline[1:]:
        lines.append(f"\n## {sec['heading']}\n")
        for sp in sec["sub_points"]:
            lines.append(f"- {sp}\n")
    lines.append(f"\n---\n*Estimated reading time: {estimate_read_time(sum(s['word_target'] for s in outline))}*")
    return "".join(lines)

Phase 5: Product Descriptions (1 hr)

def generate_product_description(
    product_name: str,
    features: list[str],
    benefits: list[str],
    audience: str,
    seo_keywords: list[str] = None,
) -> dict:
    """
    Generate structured product description with variants.
    Returns short, medium, and long formats.
    """
    base = {
        "product": product_name,
        "audience": audience,
    }

    # Short (social media / listing title)
    benefit_line = " • ".join(benefits[:3])
    base["short"] = f"{product_name} — {benefit_line}. Perfect for {audience}."

    # Medium (product page summary)
    bullets = "\n".join(f"  ✓ {b}" for b in benefits)
    base["medium"] = f"""## {product_name}

Designed for {audience.lower()} who need {benefits[0].lower()}.

What you get:
{bullets}

### Key Features
{chr(10).join(f"  • {f}" for f in features)}

Ready to {benefits[0].lower()}? Get {product_name} today.
"""

    # Long (SEO-optimized landing page)
    seo_section = ""
    if seo_keywords:
        seo_section = f"\n\n{product_name} is trusted by {audience.lower()} for {', '.join(seo_keywords)}."
    base["long"] = f"""# {product_name} — The Complete Solution for {audience}

{product_name} is purpose-built for {audience.lower()} who want {benefits[0].lower()} without the complexity.

## Why Choose {product_name}?

{chr(10).join(f"1. **{b}** — Our platform delivers {b.lower()} consistently." for b in benefits)}

## Features

{chr(10).join("### " + f + chr(10) + "Learn how " + product_name + "'s " + f.lower() + " capability streamlines your workflow." for f in features)}

## Get Started

Join thousands of {audience.lower()} using {product_name}.{seo_section}

[CTA: {benefits[0]} with {product_name} →]
"""
    return base


def generate_bulk_descriptions(
    products: list[dict],
    audience: str,
) -> str:
    """
    Generate descriptions for multiple products from a CSV-like list.
    Each product dict: { name, features: [], benefits: [], keywords: [] }
    Returns markdown with all descriptions.
    """
    sections = ["# Product Descriptions\n"]
    for p in products:
        desc = generate_product_description(
            p["name"], p.get("features", []), p.get("benefits", []),
            audience, p.get("keywords"),
        )
        sections.append(f"---\n\n## {p['name']}\n\n### Short\n{desc['short']}\n\n### Medium\n{desc['medium']}\n")
    return "\n".join(sections)

Phase 6: Format & Deliver

#!/usr/bin/env bash
# generate-content-bundle.sh
# Bundle all content into a client-ready deliverable.
# Usage: ./generate-content-bundle.sh client-name output-dir

set -euo pipefail
CLIENT="${1:?Usage: $0 client-name output-dir}"
OUT="${2:-./deliverables/$CLIENT}"
mkdir -p "$OUT"/{ads,emails,articles,products}

echo "Generated content bundle for $CLIENT"
echo "  Ads:        $OUT/ads/"
echo "  Emails:     $OUT/emails/"
echo "  Articles:   $OUT/articles/"
echo "  Products:   $OUT/products/"
echo "  Bundle:     $OUT/content-bundle.zip"
#!/usr/bin/env python3
"""
Full content factory orchestration.
Generate all 4 content types from a brief.
"""
import json, sys
from pathlib import Path

def produce_content_bundle(brief_path: str, output_dir: str):
    with open(brief_path) as f:
        brief = json.load(f)

    out = Path(output_dir)
    out.mkdir(parents=True, exist_ok=True)

    # Ad copy
    ads = generate_ad_variants(
        brief["product_or_topic"], brief["target_audience"],
        brief["key_benefits"], brief["call_to_action"],
    )
    with open(out / "ad-copy.json", "w") as f:
        json.dump(ads, f, indent=2)

    # Email sequence
    emails = generate_email_sequence(
        brief["product_or_topic"], brief["target_audience"],
        brief["key_benefits"], brief["call_to_action"],
    )
    with open(out / "email-sequence.json", "w") as f:
        json.dump(emails, f, indent=2)

    # Article outline
    outline = generate_article_outline(
        brief["product_or_topic"], brief["target_audience"],
        brief.get("seo_keywords", []),
    )
    with open(out / "article-outline.md", "w") as f:
        f.write(extract_headings(outline))

    # Product descriptions
    if brief.get("product_name"):
        desc = generate_product_description(
            brief["product_name"], brief.get("features", []),
            brief["key_benefits"], brief["target_audience"],
            brief.get("seo_keywords"),
        )
        with open(out / "product-description.md", "w") as f:
            f.write(desc["long"])

    print(f"Content bundle written to {output_dir}/")

if __name__ == "__main__":
    produce_content_bundle(sys.argv[1], sys.argv[2])

First Action in 60 Minutes

  1. Create a brief — brief = ContentBrief("ad_copy", "ClientX", "ProductY", "SaaS founders", "professional", ["save time", "reduce costs"], "Get Started")
  2. Generate ad variants — ads = generate_ad_variants("ProductY", "SaaS founders", ["save time", "reduce costs"], "Get Started")
  3. Generate email sequence — emails = generate_email_sequence(...) and save as JSON
  4. Draft article outline — outline = generate_article_outline("remote work productivity", "managers", ["remote work", "productivity tips"])
  5. Write product description — desc = generate_product_description("Widget Pro", ["API access", "team dashboards"], ["save 10 hrs/week", "reduce errors"], "engineers")
  6. Ship it — Zip everything into a client folder. That's your $500–$2,000 deliverable.

Verification

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "AI writes it all, no skill needed" | AI generates drafts; humans who know frameworks, hooks, and sequences command $200/hr+. The skill is the system. |

| "Ad copy is just words" | The right hook doubles CTR. Every variant you test is data your client pays for. |

| "Email sequences are dead" | Email ROI is 4,200%. Clients pay premium for sequences that actually convert. |

| "Product descriptions are filler" | Good product copy is the difference between browse and buy. E-commerce clients know this. |

| "Long-form is dying" | Long-form SEO content drives 10x more traffic than short posts. It's the highest-margin content type for agencies. |

Client Deliverable Checklist

Output Format

Standard client delivery folder:

client-name-content/
  brief.json               # approved brief for repeatability
  ads/
    facebook/              # 5 variants per platform
    google/
    linkedin/
  emails/
    01-welcome.md
    02-nurture.md
    03-sales.md
    04-close.md
  articles/
    article-outline.md
    draft.md
  products/
    description-short.md
    description-long.md
  content-bundle.zip       # all of the above

Verification Checklist

When to Use

Use this skill when working with writing.

Workflow

See the parent skill for authoritative workflow documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.