Community编程与开发github.com

westng/ocean-watch

巨量引擎广告投放 Codex Skill:通过官方 Ocean Engine Marketing API,在本机完成 OAuth 授权、广告计划创建、素材查询、素材维度报表汇总和盯盘策略分析,支持商品模板配置、当天视频素材批量建计划、多账户并发和安全的本地凭据存储。

ocean-watch 是什么?

ocean-watch is a Codex agent skill that 巨量引擎广告投放 Codex Skill:通过官方 Ocean Engine Marketing API,在本机完成 OAuth 授权、广告计划创建、素材查询、素材维度报表汇总和盯盘策略分析,支持商品模板配置、当天视频素材批量建计划、多账户并发和安全的本地凭据存储。.

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add westng/ocean-watch

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

ocean-watch 是做什么的?

Ocean Engine Advertising Codex Skill: Complete OAuth authorization, ad campaign creation, creative query, creative dimension report aggregation, and monitoring strategy analysis locally via the official Ocean Engine Marketing API. Supports product template configuration, bulk campaign creation from today's video creatives, concurrent multi-account management, and secure local credential storage.

Overview

This skill uses the official Ocean Engine Marketing API to execute advertising workflows directly on your local machine. It handles the entire lifecycle from authorization (OAuth) to campaign management and performance monitoring.

Features

  • Local OAuth Authorization: Authenticate securely without exposing tokens over the network.
  • Ad Campaign Creation: Define and launch campaigns programmatically using campaign templates.
  • Creative Query & Reports: Retrieve creative assets and aggregated report data at the creative dimension level.
  • Monitoring Strategy Analysis: Set up and analyze monitoring strategies to track campaign performance.
  • Product Template Configuration: Pre-configure product templates to accelerate campaign creation.
  • Bulk Campaign Creation from Today's Videos: Automatically batch-create campaigns using video creatives uploaded within the current day.
  • Concurrent Multi-Account Support: Operate on multiple ad accounts simultaneously for higher efficiency.
  • Secure Local Credential Storage: Store API keys and tokens locally with encryption to prevent leakage.

Prerequisites

  • Codex environment (local setup)
  • A valid Ocean Engine developer account with API access
  • App ID and Secret from Ocean Engine Open Platform
  • (Optional) Access tokens for each ad account you manage

Installation

  1. Clone this skill's repository to your local Codex skills directory.
  2. Install required dependencies:
pip install -r requirements.txt
  1. Set up environment variables or a config file with your credentials:
OCEAN_APP_ID=your_app_id
OCEAN_APP_SECRET=your_app_secret

Usage

  1. Authorize: Run the OAuth flow to obtain access tokens for your ad accounts.
  2. Configure Templates: Define product templates in the config file or via the provided template editor.
  3. Create Campaigns: Use the skill to create campaigns, specifying targeting, budget, creatives, and schedule.
  4. Monitor: Set up monitoring rules and get automated alerts or reports.

Example Commands

# Authorize an ad account
codex skill run westng/ocean-watch --action authorize --account-id 12345

# Create a campaign from a template
codex skill run westng/ocean-watch --action create-campaign --template-id "template_video_sale"

# Query creative performance reports
codex skill run westng/ocean-watch --action report --dimension creative --date-range last_7_days

Configuration

All configuration is stored in a local config.yaml or .env file. Example:

credentials:
  app_id: "your_app_id"
  app_secret: "your_app_secret"

accounts:
  - id: "12345"
    name: "Main Account"
  - id: "67890"
    name: "Test Account"

templates:
  - id: "template_video_sale"
    name: "Video Sales Campaign"
    budget: 100000
    bid_type: "CPM"
    creative_type: "video"

Security Notes

  • Credentials are encrypted at rest using local machine key storage.
  • OAuth tokens are never transmitted to third parties.
  • Logs are sanitized to avoid leaking sensitive information.

Troubleshooting

  • Authorization failed: Verify app ID and secret in config, and ensure redirect URL matches the one registered in Ocean Engine.
  • API rate limit: The skill implements exponential backoff; you may also stagger requests across accounts.
  • Template not found: Ensure template ID is correctly spelled and exists in your config file.

License

MIT

相关技能