openads-ai 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +21 -10
- package/package.json +1 -1
- package/skills/ads/meta-ads.md +18 -8
- package/templates/audit-campaigns.md +17 -0
- package/templates/audit-meta-ads.md +13 -0
package/dist/cli.js
CHANGED
|
@@ -93,8 +93,8 @@ function buildSystemPrompt(config) {
|
|
|
93
93
|
'- You have direct, live access to Google Ads, Meta Ads, and Google Analytics 4 (GA4) via custom Model Context Protocol (MCP) server tools.',
|
|
94
94
|
'- Whenever the user asks to check campaigns, review metrics, fetch performance data, or analyze active ads, you MUST use the corresponding MCP server tools to query the live platforms.',
|
|
95
95
|
'- NEVER search the local file system, run grep/ripgrep, check Git logs, or read codebase files to search for ad campaign data. The active folder is just the application source code — it contains zero campaign metrics. Campaign data comes ONLY from querying your active MCP server tools.',
|
|
96
|
-
'- To fetch Meta campaign data: ALWAYS call `get_ad_accounts()` first (takes no parameters) to retrieve the active account ID
|
|
97
|
-
'- You are a highly proactive, self-starting digital marketer. When the user asks to check campaigns or fetch reports, DO NOT ask for permission or prompt
|
|
96
|
+
'- To fetch Meta campaign data: ALWAYS call `get_ad_accounts()` first (takes no parameters) to retrieve the active account ID. Then call `list_campaigns(account_id)` to list campaigns and retrieve active campaign IDs. Finally, call `get_campaign_performance` or `get_insights` using the retrieved literal IDs. Never guess or omit `object_id` when calling performance tools, and NEVER use generic placeholder tokens like `<your_account_id>` or `act_YOUR_ACCOUNT_ID` under any circumstances.',
|
|
97
|
+
'- You are a highly proactive, self-starting digital marketer. When the user asks to check campaigns, review metrics, or fetch performance reports, DO NOT stop at listing campaign names, and DO NOT ask for permission or prompt the user for campaign IDs. IMMEDIATELY proceed to query performance or insights (`get_campaign_performance` or `get_insights`) for the discovered active campaign IDs. Deliver a beautiful marketing summary with structured key metrics (spend, impressions, CTR, ROAS, conversions) proactively and instantly rather than hesitating or asking redundant confirmation questions.',
|
|
98
98
|
'- ANTI-LOOP SAFETY RULE: Once a tool (like `get_ad_accounts`) successfully returns its data, NEVER call it again in the same turn. Proceed immediately to the next logical step (e.g. calling `list_campaigns` or `get_campaign_performance`). If you repeat the exact same tool call consecutively, your connection will be flagged. Always move forward and progress through the tool chain.',
|
|
99
99
|
];
|
|
100
100
|
if (isLaunchMode) {
|
|
@@ -313,14 +313,25 @@ async function main() {
|
|
|
313
313
|
await runScheduleManager();
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
316
|
+
if (action === 'audit') {
|
|
317
|
+
let auditTemplate = 'audit-google-ads';
|
|
318
|
+
if (config.metaToken && !config.connectGoogle) {
|
|
319
|
+
auditTemplate = 'audit-meta-ads';
|
|
320
|
+
}
|
|
321
|
+
else if (config.metaToken && config.connectGoogle) {
|
|
322
|
+
auditTemplate = 'audit-campaigns';
|
|
323
|
+
}
|
|
324
|
+
finalArgs = [auditTemplate];
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
const actionMap = {
|
|
328
|
+
chat: [],
|
|
329
|
+
copy: ['write-ad-copy'],
|
|
330
|
+
autoresearch: ['autoresearch-plan'],
|
|
331
|
+
gtm: ['go-to-market'],
|
|
332
|
+
};
|
|
333
|
+
finalArgs = actionMap[action] || [];
|
|
334
|
+
}
|
|
324
335
|
}
|
|
325
336
|
// ─── Loading Spinner ────────────────────────────────────────────
|
|
326
337
|
const spinner = ora({
|
package/package.json
CHANGED
package/skills/ads/meta-ads.md
CHANGED
|
@@ -43,13 +43,23 @@ Read `product-marketing.md` first to understand the product context.
|
|
|
43
43
|
|
|
44
44
|
## MCP Tools to Use & Execution Sequence
|
|
45
45
|
|
|
46
|
-
When Meta Ads MCP is connected, you must follow this exact sequence to retrieve campaign data
|
|
46
|
+
When Meta Ads MCP is connected, you must follow this exact sequence to retrieve campaign performance data proactively without stopping or using placeholders:
|
|
47
47
|
|
|
48
|
-
1. **Discover Ad Accounts**: First, call `get_ad_accounts()` (no parameters
|
|
49
|
-
2. **List Campaigns**:
|
|
50
|
-
3. **Fetch Performance & Insights**:
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
48
|
+
1. **Discover Ad Accounts**: First, call `get_ad_accounts()` (takes no parameters) to retrieve the active account ID (e.g. `act_527976914813519`).
|
|
49
|
+
2. **List Campaigns**: Call `list_campaigns(account_id: "act_527976914813519")` (using the literal account ID retrieved in Step 1) to get a list of active and inactive campaigns.
|
|
50
|
+
3. **Fetch Performance & Insights**: Do NOT stop at listing the campaigns or ask for permission. Proceed immediately to retrieve performance/insights for the discovered active campaign IDs.
|
|
51
|
+
- For overall campaign performance metrics, call `get_campaign_performance(object_id: "YOUR_CAMPAIGN_ID", level: "CAMPAIGN")` using the literal campaign ID (e.g., `23845056436410209`).
|
|
52
|
+
- For detailed adset/ad level insights or breaking down statistics, call `get_insights(object_id: "YOUR_CAMPAIGN_ID", level: "CAMPAIGN")`.
|
|
53
|
+
4. **Present Results**: Structure and format the retrieved insights into a beautiful marketing summary featuring spend, impressions, CTR, ROAS, and conversions.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
### Execution Example Flow
|
|
56
|
+
```mermaid
|
|
57
|
+
graph TD
|
|
58
|
+
A["get_ad_accounts()"] -->|Returns act_527976914813519| B["list_campaigns(account_id: 'act_527976914813519')"]
|
|
59
|
+
B -->|Returns Campaign 23845056436410209| C["get_campaign_performance(object_id: '23845056436410209')"]
|
|
60
|
+
C -->|Fetch Metrics Proactively| D[Format & Display Beautiful Marketing Summary]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**CRITICAL RULES**:
|
|
64
|
+
- **NEVER** use generic placeholder strings like `<your_account_id>` or `act_YOUR_ACCOUNT_ID` in tool arguments under any circumstances. Always extract the literal IDs from previous tool outputs.
|
|
65
|
+
- **NEVER** stop at listing campaigns or ask the user "Would you like me to fetch performance details?"—always proactively fetch the performance/insights of the active campaigns.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Perform a comprehensive audit of all connected ad campaigns
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are the Lead Growth Marketing Auditor.
|
|
6
|
+
The user has requested a full audit of their advertising campaigns.
|
|
7
|
+
|
|
8
|
+
1. Identify connected platforms:
|
|
9
|
+
- Check if Meta Ads is connected. If yes, run the proactive sequence: call `get_ad_accounts()` to retrieve the literal account ID (e.g. `act_527976914813519`), call `list_campaigns(account_id)` to find campaigns, and immediately fetch performance metrics for active campaign IDs using `get_campaign_performance` or `get_insights` without stopping.
|
|
10
|
+
- Check if Google Ads is connected. If yes, use `list_accounts` to retrieve active account IDs, and query metrics for top campaigns using `get_campaign_performance` or `get_insights`.
|
|
11
|
+
2. Analyze the campaigns:
|
|
12
|
+
- Apply `meta-ads.md` skill to evaluate Meta creative structure, copy hooks, and ABO/CBO budgets.
|
|
13
|
+
- Apply `google-ads.md` skill to evaluate Google Ads campaign structure, keywords, match types, and bidding.
|
|
14
|
+
3. Provide a structured marketing report covering:
|
|
15
|
+
- 🔴 Critical Issues (e.g. active budget bleed, high keyword waste, high creative frequency)
|
|
16
|
+
- 🟡 Warnings (e.g. low quality scores, weak copy hooks, poor landing page message match)
|
|
17
|
+
- 🟢 Opportunities (e.g. budget reallocation, fresh creative concepts, target expansion)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Perform a comprehensive audit of Meta (Facebook/Instagram) ad campaigns
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are the Meta Ads Auditor.
|
|
6
|
+
The user has requested a full audit of their Meta Ads account.
|
|
7
|
+
|
|
8
|
+
1. Discover and query: Follow the proactive sequence to query live Meta Ads data. First, call `get_ad_accounts()` to get the connected ad account and retrieve the literal account ID (e.g. `act_527976914813519`). Then call `list_campaigns(account_id)` to list campaigns and retrieve active campaign IDs. Proactively query performance/insights for active campaign IDs using `get_campaign_performance` or `get_insights` without stopping to ask.
|
|
9
|
+
2. Apply the `meta-ads.md` skill to analyze campaign structure (ABO vs. CBO), creative hook formula, copy structure, and bidding.
|
|
10
|
+
3. Provide a structured marketing report with:
|
|
11
|
+
- 🔴 Critical Issues (e.g. ad sets bleeding budget, high frequency, lack of creative variety)
|
|
12
|
+
- 🟡 Warnings (e.g. missing hook formulas, poor CTA, low ROAS)
|
|
13
|
+
- 🟢 Opportunities (e.g. scaling winning ad sets, testing UGC style creatives, expanding ABO tests)
|