重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
google-ads-scripts by henkisdabro/wookstar-claude-plugins
npx skills add https://github.com/henkisdabro/wookstar-claude-plugins --skill google-ads-scripts关于使用 AdsApp API 开发 Google Ads Scripts 的指南。通过在 Google Ads 编辑器中运行的 JavaScript,实现广告系列管理、出价优化、效果报告和批量操作的自动化。
以编程方式管理广告系列 - 创建、修改、状态更改、批量更新。使用 AdsApp.campaigns() 并结合条件按状态、预算、名称模式或类型进行筛选。应用标签以便组织管理。
基于效果自动化关键词定位和出价调整。按质量得分筛选,根据 ROAS/CPA 目标调整最高每次点击费用出价,添加/移除否定关键词,并实施出价优化算法。
使用广告系列、广告组、关键词和广告统计数据生成自定义报告。检索自定义日期范围的指标,计算衍生指标(点击率、每次点击费用、转化率),并将数据导出到 Google Sheets。
控制支出并在各广告系列间分配预算。获取/设置每日广告系列预算,监控支出是否超过阈值,在达到限额时暂停广告系列,并根据效果分配预算。
通过自动化决策为广告系列管理注入智能。暂停效果不佳的关键词,为效果好的关键词提高出价,根据星期几的模式调整预算。
为 API 限制、配额问题和运行时错误实施健壮的错误处理。使用 try-catch 块、空值检查、基于表格的日志记录以进行审计追踪。注意 30 分钟的执行时间限制。
最常见的模式 - 暂停质量得分低且支出高的关键词:
function pauseLowQualityKeywords() {
const keywords = AdsApp.keywords()
.withCondition('keyword.status = ENABLED')
.withCondition('keyword.quality_info.quality_score < 4')
.withCondition('keyword.metrics.cost > 100000000')
.get();
let count = 0;
while (keywords.hasNext()) {
keywords.next().pause();
count++;
}
Logger.log(`Paused ${count} low-quality keywords`);
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
.withCondition() 而不是在 JavaScript 中筛选.withLimit() 和批处理(30 分钟超时)有关每种实践的具体代码示例,请参阅 references/best-practices.md。
使用 scripts/ 中的验证脚本进行部署前检查:
常见问题:
.withLimit() 缩小范围或分批处理使用 Logger.log() 进行调试 - 通过脚本编辑器中的 视图 > 日志 查看日志。
按需加载这些文件以获取详细文档:
每周安装次数
65
代码仓库
GitHub 星标数
46
首次出现
2026年1月30日
安全审计
安装于
opencode59
gemini-cli56
cursor56
codex55
claude-code51
github-copilot50
Guidance for developing Google Ads Scripts using the AdsApp API. Automate campaign management, bid optimisation, performance reporting, and bulk operations through JavaScript running in the Google Ads editor.
Manage campaigns programmatically - creation, modification, status changes, bulk updates. Use AdsApp.campaigns() with conditions to filter by status, budget, name patterns, or type. Apply labels for organisation.
Automate keyword targeting and bid adjustments based on performance. Filter by quality score, adjust max CPC bids based on ROAS/CPA targets, add/remove negative keywords, and implement bid optimisation algorithms.
Generate custom reports using campaign, ad group, keyword, and ad statistics. Retrieve metrics for custom date ranges, calculate derived metrics (CTR, CPC, conversion rate), and export data to Google Sheets.
Control spending and allocate budgets across campaigns. Get/set daily campaign budgets, monitor spend against thresholds, pause campaigns when limits are reached, and distribute budgets based on performance.
Build intelligence into campaign management with automated decision-making. Pause low-performing keywords, increase bids for high-performers, adjust budgets based on day-of-week patterns.
Implement robust error handling for API limits, quota issues, and runtime errors. Use try-catch blocks, null checks, sheet-based logging for audit trails. Be aware of the 30-minute execution limit.
The most common pattern - pause keywords with low quality scores and high spend:
function pauseLowQualityKeywords() {
const keywords = AdsApp.keywords()
.withCondition('keyword.status = ENABLED')
.withCondition('keyword.quality_info.quality_score < 4')
.withCondition('keyword.metrics.cost > 100000000')
.get();
let count = 0;
while (keywords.hasNext()) {
keywords.next().pause();
count++;
}
Logger.log(`Paused ${count} low-quality keywords`);
}
.withCondition() instead of filtering in JavaScript.withLimit() and batch processing for large accounts (30-min timeout)See references/best-practices.md for detailed code examples of each practice.
Use the validation scripts in scripts/ for pre-deployment checks:
Common issues:
.withLimit() or process in batchesUse Logger.log() for debugging - view logs via View > Logs in the script editor.
Load these on demand for detailed documentation:
Weekly Installs
65
Repository
GitHub Stars
46
First Seen
Jan 30, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode59
gemini-cli56
cursor56
codex55
claude-code51
github-copilot50
GitHub Actions 官方文档查询助手 - 精准解答 CI/CD 工作流问题
49,000 周安装