# genpark-content-factory

Adopt this skill: https://proskills.md/skills/other/alphaparkinc-openclaw-genpark-content-factory

Page: https://proskills.md/skills/other/alphaparkinc-openclaw-genpark-content-factory
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: SKILL.md
size: 1254
sha: 5cdc84ac5c40823cd8fdcba1730ce0835c02138c
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/SKILL.md

```text
---
name: genpark-content-factory
description: High-volume bulk social media graphic and post generator.
version: 1.0.0
---

# genpark-content-factory

## Overview
This skill operates as an autonomous content agency. It monitors niche trends on platforms like X (Twitter) and Reddit, identifies high-engagement formats, and bulk-generates a full month's worth of multi-platform content (text, carousels, video scripts) scheduled for automatic posting. 

## Core Capabilities
- **Trend Ingestion**: Scrape niche-specific subreddits or trending hashtags to discover viral concepts.
- **Bulk Content Creation**: Convert one core idea into an X thread, a LinkedIn post, an Instagram Carousel outline, and a TikTok short script.
- **Scheduling**: Integrate with tools like Buffer or natively schedule via platform APIs to ensure a constant stream of posts.

## Usage Guide
When a user asks to generate a content strategy:
1. Ask for their specific niche (e.g., "AI SaaS", "Fitness Coaching").
2. Retrieve the top 5 trending discussions in that niche from the past week.
3. Automatically generate 30 unique, hook-driven social media posts designed for organic reach.
4. Output the results in a structured format (CSV or JSON) ready for bulk scheduling upload.
```

## File: README.md
size: 2071
sha: 9395cf8706a762a82950ca7e42ee3579b023cbf5
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/README.md

````text
# openclaw-genpark-content-factory

[![OpenClaw](https://img.shields.io/badge/OpenClaw-Ecosystem-blue.svg)](https://github.com/alphaparkinc/openclaw-genpark-content-factory)
[![Zero Dependency](https://img.shields.io/badge/Dependencies-Standard_Library_Only-success.svg)](https://www.python.org/)
[![MCP Ready](https://img.shields.io/badge/MCP-Model_Context_Protocol-orange.svg)](https://modelcontextprotocol.io/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Production Grade](https://img.shields.io/badge/Status-Production_Ready-brightgreen.svg)](https://github.com/Alpha-Park/openclaw-genpark-content-factory)

Production-grade agentic micro-skill designed for the OpenClaw and GenPark swarms. Built strictly using the Python standard library with zero external runtime dependencies.

## Architecture & Flow

```mermaid
flowchart TD
    A[Agent Planner / Host] -->|Tool Invocation| B(MCP Server Entrypoint)
    B --> C[OpenClawGenParkContentFactory]
    C --> D[Deterministic Mathematical Algorithms]
    D --> E[Validated JSON Response]
    E -->|Structured Payload| A
```

## Features

- **Standard Library Only**: 100% Python standard library with no wheels, C-extensions, or pip requirements.
- **Model Context Protocol (MCP)**: Native FastMCP JSON-RPC interface for seamless tool-calling in Claude, Cursor, and OpenClaw.
- **Algorithmic Rigor**: Rigorous closed-form mathematical equations and quantitative deterministic metrics.
- **Multi-Tenant Mirrored**: Dual-deployed across `@alphaparkinc` and `@Alpha-Park`.

## Installation & Usage

```bash
git clone https://github.com/Alpha-Park/openclaw-genpark-content-factory.git
cd openclaw-genpark-content-factory
python example_usage.py
```

## MCP Configuration

Add to your `claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "openclaw-genpark-content-factory": {
      "command": "python",
      "args": ["-m", "openclaw-genpark-content-factory.mcp_server"]
    }
  }
}
```

## License

MIT License. See [LICENSE](LICENSE) for details.
````

## File: .gitignore
size: 64
sha: ed8ae579cca3201f66148b37156e8f84a58a6680
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/.gitignore

```text
__pycache__/\n*.py[cod]\n.env\n.venv/\nvenv/\n*.log\n.DS_Store\n
```

## File: client.py
size: 6397
sha: d97d6a41f7d584f405174c2f22e801d1362e0d12
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/client.py

```text
# -*- coding: utf-8 -*-
"""
OpenClaw GenPark Content Factory Client
Pure Python Standard Library (Zero External Dependencies)
Implements headline emotional impact scoring, prose rhythm variance (syllable standard deviation),
and video engagement hook retention modeling.
"""

import math
import re
from typing import Dict, Any, List, Optional

class OpenClawGenParkContentFactory:
    """
    Automated editorial and virality mechanics engine for content generation agents.
    """

    def __init__(self):
        self.power_words = {
            "breakthrough", "secret", "proven", "exponential", "insane",
            "autonomous", "mastery", "unlocked", "revolution", "elite",
            "ultimate", "guaranteed", "flawless", "effortless", "critical"
        }
        self.curiosity_triggers = {
            "why", "how", "this", "stop", "never", "before", "truth", "revealed", "warning"
        }

    def evaluate_headline_impact_score(self, headline: str) -> Dict[str, Any]:
        """
        Evaluates headline virality posture based on word count balance, power word density,
        and curiosity trigger activation.
        
        Score components:
          - Optimal Length (6 to 12 words): up to 30 pts
          - Power Words: 15 pts each (up to 30 pts)
          - Curiosity Triggers: 15 pts each (up to 30 pts)
          - Numerical/Digit Hook: 10 pts bonus
        """
        clean_headline = headline.strip()
        words = [w.strip(" .,!?:;()[]{}") for w in clean_headline.lower().split() if w.strip(" .,!?:;()[]{}")]
        word_count = len(words)

        if word_count == 0:
            return {"headline": headline, "headline_score": 0.0, "classification": "EMPTY"}

        # 1. Length scoring
        if 6 <= word_count <= 12:
            length_score = 30.0
        elif 4 <= word_count <= 15:
            length_score = 20.0
        else:
            length_score = 10.0

        # 2. Power words
        found_power = [w for w in words if w in self.power_words]
        power_score = min(30.0, len(found_power) * 15.0)

        # 3. Curiosity triggers
        found_curiosity = [w for w in words if w in self.curiosity_triggers]
        curiosity_score = min(30.0, len(found_curiosity) * 15.0)

        # 4. Numerical Hook
        has_digit = any(char.isdigit() for char in clean_headline)
        digit_score = 10.0 if has_digit else 0.0

        total_score = min(100.0, length_score + power_score + curiosity_score + digit_score)

        if total_score >= 80:
            classification = "HIGH_CONVERTING_VIRAL"
        elif total_score >= 60:
            classification = "MODERATE_ENGAGEMENT"
        else:
            classification = "WEAK_LOW_CTR"

        return {
            "headline": headline,
            "word_count": word_count,
            "headline_score": round(total_score, 1),
            "classification": classification,
            "has_numerical_hook": has_digit,
            "power_words_detected": found_power,
            "curiosity_triggers_detected": found_curiosity
        }

    def analyze_prose_rhythm_cadence(self, text: str) -> Dict[str, Any]:
        """
        Analyzes prose cadence and dynamic pacing through sentence length standard deviation:
          sigma = sqrt( sum((len - mean)^2) / N )
        Higher variance prevents monotonous robotic cadence and enhances reader retention.
        """
        raw_sentences = text.replace("!", ".").replace("?", ".").split(".")
        sentences = [s.strip() for s in raw_sentences if s.strip()]
        if not sentences:
            return {"sentence_count": 0, "rhythm_classification": "EMPTY"}

        lengths = [len([w.strip(" .,!?:;()[]{}") for w in s.split() if w.strip(" .,!?:;()[]{}")]) for s in sentences]
        n = len(lengths)
        mean_len = sum(lengths) / n

        variance = sum((l - mean_len) ** 2 for l in lengths) / n
        std_dev = math.sqrt(variance)

        # Syllables estimation heuristic
        all_words = re.findall(r"[a-zA-Z]+", text.lower())
        vowel_count = sum(len(re.findall(r"[aeiouy]+", w)) for w in all_words)
        syllables_per_word = round(vowel_count / max(1, len(all_words)), 2)

        if std_dev >= 7.0:
            pacing = "EXCELLENT_DYNAMIC_CADENCE"
        elif std_dev >= 4.0:
            pacing = "MODERATE_NATURAL_RHYTHM"
        else:
            pacing = "MONOTONOUS_ROBOTIC_PACING"

        return {
            "sentence_count": n,
            "mean_sentence_length_words": round(mean_len, 2),
            "sentence_length_std_dev": round(std_dev, 2),
            "syllables_per_word": syllables_per_word,
            "pacing_classification": pacing,
            "sentence_lengths": lengths
        }

    def predict_hook_retention_curve(
        self,
        video_length_seconds: int = 60,
        hook_strength_score: float = 85.0,
        topic_pacing_wpm: float = 160.0
    ) -> Dict[str, Any]:
        """
        Forecasts viewer retention curve along short-form video timelines using an exponential decay model:
          R(t) = R_0 * exp(-lambda * t)
        """
        # Pacing multiplier (optimal between 150-180 wpm)
        pacing_penalty = max(0.0, abs(topic_pacing_wpm - 165.0) / 100.0)
        
        # Base retention at t=3s
        r_3s = min(95.0, max(40.0, hook_strength_score * 0.95 - (pacing_penalty * 10.0)))
        
        # Decay lambda
        decay_lambda = 0.025 + (100.0 - hook_strength_score) * 0.0004 + (pacing_penalty * 0.01)

        retention_timeline = []
        checkpoints = [1, 3, 5, 10, 15, 30, 45, video_length_seconds]
        checkpoints = sorted(list(set([t for t in checkpoints if t <= video_length_seconds])))

        for t in checkpoints:
            ret = r_3s * math.exp(-decay_lambda * max(0, t - 3))
            retention_timeline.append({
                "timestamp_seconds": t,
                "projected_retention_pct": round(min(100.0, max(5.0, ret)), 1)
            })

        avg_retention = round(sum(p["projected_retention_pct"] for p in retention_timeline) / len(retention_timeline), 1)

        return {
            "video_duration_seconds": video_length_seconds,
            "initial_3s_hook_retention_pct": round(r_3s, 1),
            "completion_rate_pct": retention_timeline[-1]["projected_retention_pct"],
            "average_watch_time_pct": avg_retention,
            "retention_curve": retention_timeline
        }
```

## File: example_usage.py
size: 1283
sha: 299ed1d8dc31023d65648a230c5013554dd2e76a
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/example_usage.py

```text
# -*- coding: utf-8 -*-
from client import OpenClawGenParkContentFactory

factory = OpenClawGenParkContentFactory()

# 1. Headline Scoring
hl = "7 Breakthrough Secrets That Unlocked Autonomous Agent Workflows"
res_hl = factory.evaluate_headline_impact_score(hl)
print(f"Headline Impact: Score={res_hl['headline_score']} ({res_hl['classification']})")
print(f"  Power words: {res_hl['power_words_detected']}, Curiosity: {res_hl['curiosity_triggers_detected']}")

# 2. Prose Rhythm Cadence
article = """
Autonomous AI is here. It changes everything about software development.
Developers who adapt quickly will experience extraordinary productivity gains, while those who resist will inevitably fall behind.
Build fast. Deploy often.
"""
cadence = factory.analyze_prose_rhythm_cadence(article)
print()
print(f"Cadence Analysis: StdDev={cadence['sentence_length_std_dev']} words ({cadence['pacing_classification']})")
print(f"  Sentence lengths: {cadence['sentence_lengths']}")

# 3. Retention Modeling
ret = factory.predict_hook_retention_curve(video_length_seconds=45, hook_strength_score=88.0, topic_pacing_wpm=165.0)
print()
print(f"Retention Curve: 3s Hook={ret['initial_3s_hook_retention_pct']}%, Completion={ret['completion_rate_pct']}% (Avg: {ret['average_watch_time_pct']}%)")
```

## File: LICENSE
size: 1071
sha: bafb53b2fc9253ffcac08bb8f6e8a474ddf0a5d2
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/LICENSE

```text
MIT License

Copyright (c) 2026 AlphaPark Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## File: mcp_server.py
size: 1866
sha: 3d691aa46e0c3eee200969f3778c85c3efda3dee
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/mcp_server.py

```text
# -*- coding: utf-8 -*-
"""
OpenClaw GenPark Content Factory MCP Server
FastMCP standard interface for headline evaluation, prose rhythm analysis, and retention prediction.
"""

import json
from typing import Dict, Any
from client import OpenClawGenParkContentFactory

try:
    from mcp.server.fastmcp import FastMCP
    mcp = FastMCP("openclaw-genpark-content-factory")
except ImportError:
    class MockFastMCP:
        def __init__(self, name):
            self.name = name
        def tool(self):
            def decorator(f):
                return f
            return decorator
    mcp = MockFastMCP("openclaw-genpark-content-factory")

factory = OpenClawGenParkContentFactory()

@mcp.tool()
def evaluate_headline_impact_score(headline: str) -> str:
    """
    Evaluates headline virality posture based on word count balance, power words, and curiosity triggers.
    """
    res = factory.evaluate_headline_impact_score(headline)
    return json.dumps(res, indent=2)

@mcp.tool()
def analyze_prose_rhythm_cadence(text: str) -> str:
    """
    Analyzes prose cadence and dynamic pacing through sentence length standard deviation.
    """
    res = factory.analyze_prose_rhythm_cadence(text)
    return json.dumps(res, indent=2)

@mcp.tool()
def predict_hook_retention_curve(
    video_length_seconds: int = 60,
    hook_strength_score: float = 85.0,
    topic_pacing_wpm: float = 160.0
) -> str:
    """
    Forecasts viewer retention curve along short-form video timelines using an exponential decay model.
    """
    res = factory.predict_hook_retention_curve(video_length_seconds, hook_strength_score, topic_pacing_wpm)
    return json.dumps(res, indent=2)

def main():
    print("Testing Content Factory:")
    print(evaluate_headline_impact_score("7 Proven Secrets That Will Revolutionize Your Agent Workflows"))

if __name__ == "__main__":
    main()
```

## File: requirements.txt
size: 76
sha: 0528add65f81b98e5d4083b7522a6a0ba35bc019
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/requirements.txt

```text
# Zero external dependencies required -- Python 3.9+ standard library only\n
```

## File: skill.json
size: 377
sha: d519636dc1486402975c28ac24bd78b10c4e2ae1
upstream: https://github.com/alphaparkinc/openclaw-genpark-content-factory/blob/HEAD/skill.json

```text
{
  "name": "openclaw-genpark-content-factory",
  "version": "1.0.0",
  "description": "OpenClaw GenPark Content Factory - Headline emotional impact scoring, prose rhythm cadence variance, and video retention decay modeling with zero dependencies.",
  "tools": [
    "evaluate_headline_impact_score",
    "analyze_prose_rhythm_cadence",
    "predict_hook_retention_curve"
  ]
}
```
