Co-Pilot / 辅助式
更新于 a month ago

creative-ad-agent

DDV0x
0.1k
dv0x/creative-ad-agent
80
Agent 评分

💡 摘要

一个由AI驱动的工具,使用以钩子为先的方法生成多样化的、以转化为重点的广告。

🎯 适合人群

寻求提升广告效果的数字营销人员寻找经济实惠广告解决方案的小企业主旨在简化广告创作的广告代理商希望生成引人入胜的宣传材料的内容创作者需要快速广告概念的企业家

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;依赖锁定与供应链风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

Creative Ad Agent

An AI-powered creative advertising agent that generates conversion-focused ads using a hook-first methodology. Built with the Claude Agent SDK, it analyzes brand websites, extracts factual data, and creates 6 diverse ad concepts with AI-generated images.

Features

  • Hook-First Ad Generation - Hooks are mined from research data using proven formulas (hooks = 80% of ad performance)
  • Research-Driven - Extracts real data from brand websites: offers, value props, proof points, testimonials
  • 6 Diverse Concepts - Each concept uses a different emotional trigger (social proof, urgency, curiosity, etc.)
  • AI Image Generation - Creates visuals via fal.ai Nano Banana Pro
  • Session Management - Stateful conversations with forking for A/B testing
  • Dual Deployment - Local development server + Cloudflare Workers production

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    ORCHESTRATOR (Main Agent)                 │
│                                                              │
│   ┌─────────────┐   ┌──────────────────┐   ┌─────────────┐  │
│   │  research   │ → │ hook-methodology │ → │  art-style  │  │
│   │   (Agent)   │   │     (Skill)      │   │   (Skill)   │  │
│   └─────────────┘   └──────────────────┘   └─────────────┘  │
│          ↓                   ↓                    ↓          │
│   research.md          hook-bank.md         prompts.json    │
│                                                   ↓          │
│                                          ┌─────────────┐    │
│                                          │ nano-banana │    │
│                                          │  (MCP/fal)  │    │
│                                          └─────────────┘    │
│                                                   ↓          │
│                                            6 PNG images      │
└─────────────────────────────────────────────────────────────┘

Workflow

  1. Parse - Extract URL and brand name from request
  2. Research - Agent fetches homepage, extracts offers/value props/proof points
  3. Hooks - Skill generates 10+ hooks, selects 6 with diversity matrix
  4. Art - Skill creates visual prompts for each hook
  5. Images - MCP generates images via fal.ai
  6. Complete - Returns 6 ad concepts with images

Quick Start

Prerequisites

Installation

# Clone the repository git clone https://github.com/DV0x/creative-ad-agent.git cd creative-ad-agent # Install server dependencies cd server && npm install # Create environment file cp .env.example .env # Edit .env with your API keys

Running Locally

# Start the server cd server npm run dev # Server runs at http://localhost:3001

Generate Ads

curl -X POST http://localhost:3001/generate \ -H "Content-Type: application/json" \ -d '{"prompt": "Create ads for https://example.com"}'

Project Structure

creative-ad-agent/
├── agent/                      # Agent ecosystem
│   └── .claude/
│       ├── agents/
│       │   └── research.md     # Data extraction agent
│       └── skills/
│           ├── hook-methodology/
│           │   ├── SKILL.md    # Hook generation skill
│           │   └── formulas.md # Hook formula reference
│           └── art-style/
│               ├── SKILL.md    # Visual prompt skill
│               └── workflows/  # Style-specific workflows
│
├── server/                     # Local Express server
│   ├── sdk-server.ts          # Main server
│   └── lib/
│       ├── ai-client.ts       # Claude SDK wrapper
│       ├── nano-banana-mcp.ts # fal.ai MCP integration
│       ├── session-manager.ts # Session handling
│       └── orchestrator-prompt.ts
│
├── client/                     # React frontend
│   └── src/
│       ├── App.tsx
│       ├── hooks/useGenerate.ts
│       └── components/
│
├── creative-agent-cf/          # Cloudflare Workers deployment
│   ├── src/                   # Worker code
│   └── sandbox/               # Container code
│
└── docs/                       # Documentation

API Endpoints

| Endpoint | Method | Description | |----------|--------|-------------| | /generate | POST | Generate ad campaign | | /health | GET | Health check | | /sessions | GET | List active sessions | | /sessions/:id | GET | Get session info | | /sessions/:id/continue | POST | Resume session | | /sessions/:id/fork | POST | Fork for A/B testing | | /images/:session/:file | GET | Serve generated image |

Hook Methodology

The system uses a research-first approach where every hook is traceable to specific data:

| Hook Type | Emotional Trigger | Example | |-----------|------------------|---------| | Stat/Data | Social Proof | "847 homeowners saved $12,340 last year" | | Story/Result | Empathy + Relief | "Sarah was paying $2,100/mo. Now she pays $1,650" | | FOMO/Urgency | Loss Aversion | "Rates just dropped 0.5%. Lock yours before Friday" | | Curiosity | Intrigue | "The 3-minute check that saved Mark $347/month" | | Call-out | Recognition | "Toronto renters paying $2,500+: You could own for less" | | Contrast/Enemy | Differentiation | "Banks want you confused. We want you approved" |

Art Styles

The default style is Soft Brutalism Clay - neo-brutalist borders with warm clay textures. Additional workflows available:

  • soft-brutalism-clay.md - Default
  • anderson-clay-diorama.md - Wes Anderson-inspired theatrical scenes

Cloudflare Deployment

cd creative-agent-cf # Set secrets wrangler secret put ANTHROPIC_API_KEY wrangler secret put FAL_KEY # Deploy npm run deploy

See docs/cloudflare-deployment-plan.md for detailed instructions.

React Client

cd client npm install npm run dev # Opens at http://localhost:5173

Features:

  • Real-time SSE streaming
  • Phase progress indicators
  • Terminal-style log output
  • Image gallery with lightbox

Configuration

| Variable | Required | Description | |----------|----------|-------------| | ANTHROPIC_API_KEY | Yes | Claude API key | | FAL_KEY | Yes | fal.ai image generation key | | PORT | No | Server port (default: 3001) | | CLAUDE_CODE_MAX_OUTPUT_TOKENS | No | Token limit (default: 16384) |

Documentation

Tech Stack

  • Runtime: Node.js, TypeScript
  • AI: Claude Agent SDK, Claude Opus 4.5
  • Images: fal.ai Nano Banana Pro
  • Server: Express.js
  • Client: React, Zustand, Vite, Tailwind CSS
  • Production: Cloudflare Workers + Sandbox

Contributing

Contributions are welcome! Please read the existing code patterns and ensure your changes follow the hook-first methodology philosophy.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

Acknowledgments

  • Built with Claude Agent SDK
  • Image generation by fal.ai
  • Hook methodology inspired by conversion copywriting principles
五维分析
清晰度8/10
创新性8/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析

优点

  • 利用以研究为驱动的方法进行广告创作
  • 生成多样化的广告概念以吸引各种情感
  • 集成AI进行图像生成,增强视觉吸引力
  • 支持本地和云部署选项

缺点

  • 需要API密钥才能正常工作,这可能是一个障碍
  • 新用户的设置过程复杂
  • 依赖外部服务进行图像生成
  • 高级功能的文档有限

相关技能

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 DV0x.