ads-next
Continuous coach. Reads the most recent <platform>-audit-results.json files (cwd + ~/.claude-ads/history/), ranks Quick Wins and Critical Issues by impact × ease using the user's saved spend mix, surfaces the top 3 next actions, and optionally walks the user through fixing the #1 right now. Detects regressions vs the previous audit (score drops, new failures) and flags them as Priority 0. Use when user says next, what should I do, recommend, fix, suggest, what's next, qué sigue, recomienda, próximo paso.
Hainrixz · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add Hainrixz/claude-ads --skill ads-next技能说明
name: ads-next description: "Continuous coach. Reads the most recent -audit-results.json files (cwd + ~/.claude-ads/history/), ranks Quick Wins and Critical Issues by impact × ease using the user's saved spend mix, surfaces the top 3 next actions, and optionally walks the user through fixing the #1 right now. Detects regressions vs the previous audit (score drops, new failures) and flags them as Priority 0. Use when user says next, what should I do, recommend, fix, suggest, what's next, qué sigue, recomienda, próximo paso." user-invokable: false argument-hint: "[show | compare | walk]" allowed-tools: Bash, Read, Write, AskUserQuestion
Continuous coaching: what to fix next
/ads next turns audits into a stream of small, ordered, verified actions.
It's the second half of the seguimiento loop: /ads start connects, /ads audit measures, /ads next coaches.
Subcommand routing
| Arg | Behavior |
|---|---|
| (none) | Default — Discover → Rank → Top 3 → offer to walk through #1. |
show | Discover → Rank → print top 10 → exit (no walk-through prompt — good for client reports). |
compare | Print full delta between the two most-recent audits per platform via python3 scripts/profile.py compare <p>. |
walk | Skip the prompt — go straight to walking the user through the top action. |
Core rules
- Read the profile first.
python3 scripts/profile.py get— if exit 2, suggest/ads startand exit (a coach with no context is just guessing). - One action at a time during walk-through. Same step-by-step verified
loop as
/ads startPhase C.3. - Never invent issues. If no audits are found in cwd or history, print
the exact command to generate one (
/ads auditor platform-specific) and exit.
Phase 1 — Discover audit JSON
Search for *-audit-results.json files in this order, newest first:
<cwd>— current working directory. Glob*-audit-results.json.~/.claude-ads/history/— the persistent log. Read~/.claude-ads/history/index.jsonand resolve files for the most recent audit per platform.
Validate each file:
- Must parse as JSON.
- Must include
platform,health_score,checks. platformmust be one ofmeta,google,tiktok.
If a file fails validation, skip it and print a single WARNING: skipped <path> (<reason>) line. Don't abort the run.
If zero valid audits found but python3 scripts/conciencia.py list
returns active campaigns, skip to Phase 3 with only the CON-* items.
If zero valid audits found and no awareness files:
No audits yet. Run one first:
/ads audit — full multi-platform
/ads <meta|google|tiktok> — single platform deep-dive
Then exit.
Phase 2 — Persist any new audits to history
For each audit file discovered in cwd that is NEWER than the most recent
entry for that platform in ~/.claude-ads/history/index.json (compare
generated_at), copy it to history via:
python3 scripts/profile.py save-audit <path>
This is what builds the multi-session memory — every audit run from anywhere on disk eventually ends up in the history index.
Phase 3 — Rank items by impact × ease
Pool every quick_win, every critical_issue, and every check with
result in (FAIL, WARNING) across all valid audits. Deduplicate by
(platform, check_id) — if a check appears in both critical_issues and
checks, treat as one item using the critical metadata.
For each item, compute an impact score:
severity_weight = { critical: 5.0, high: 3.0, medium: 1.5, low: 0.5 }[severity]
effort_inverse = 1 / (fix_time_minutes + 1) # default fix_time = 30 if null
budget_share = platform_budget_share(platform) # see below
impact = severity_weight × effort_inverse × budget_share × 100
platform_budget_share — derive from the user's profile + audit
account_id presence:
- If profile lists 1 active platform, share = 1.0 for that platform.
- If profile lists 2 or 3, share =
1 / nbaseline. Then bump the platform that the user spends most on (usemonthly_spend_usd÷ platform count as the rough prior; if the user has set per-platform spend in the future, use that instead) by +0.1 (cap at 0.8). - If profile is empty, fall back to equal weight.
Business-outcome items (from /ads conciencia). Run
python3 scripts/conciencia.py list, then show <key> for each active
offline campaign, and add these items to the pool (platform = the campaign's
platform, check_id = CON-<rule>; rules and wording in
ads/references/conciencia.md):
| Rule | Condition (cumulative metrics) | severity | fix_time |
|---|---|---|---|
CON-LOSS | cost_per_close > campaign ticket_value | critical | 30 |
CON-JUNK | junk_rate > 0.5 | high | 30 |
CON-DROP | trend.close_rate < 0 and latest close_rate < half the previous | high | 30 |
CON-GAP | platform_vs_real < 0.6 | medium | 30 |
CON-BLIND | campaign registered with 0 check-ins, or a lead/message campaign in an audit with no awareness file | low | 5 |
Each finding cites the numbers and the check-in count, e.g. "% basura 62 %
(31 / 50 conversaciones, 2 check-ins)". Never create a CON-* item from a
null metric other than CON-BLIND.
Sort all items by impact descending.
Phase 4 — Regression detection (Priority 0)
For each platform with ≥2 audits in history, run:
python3 scripts/profile.py compare <platform>
Inspect the JSON output:
-
score_delta < -5→ PRIORITY 0 alert appended at the top of the ranked list. Format:⚠ <Platform> health dropped from <prev>/100 (<prev_grade>) → <new>/100 (<new_grade>) since your last audit. New issues: <comma list of new_issues> R