Auto-loaded when Claude Code starts in the cloned bundle directory. Read these once; they govern every /trendingai run.
Read README.md cover-to-cover. The /trendingai skill walks you through env-var setup and the pipeline. Everything you need is there.
/trendingai slash command → reads .claude/commands/trendingai.md → invokes the TrendingAI skill at .claude/skills/TrendingAI/SKILL.md.
Trigger phrases that route the same way: run trendingai, let's do our AI trending report, AI trending report, fresh trendingai run, full harvest.
- All synthesis happens INLINE in this Claude Code session. Opus 4.7 (the model running this conversation) IS the synthesis layer. NO Task subagents. NO
claude --printsubprocess. NO@anthropic-ai/sdkimports. NOANTHROPIC_API_KEYreads (the orchestrating session is the model — it authenticates via OAuth). - The renderer is FROZEN. Do not edit
src/render-features-first.tsfor cosmetic changes. Layout/visual changes are out of scope. - The deterministic surfaces are FROZEN. Data sources, harvesters, extractors (
src/features-first.ts), clustering math, scoring formulas,scripts/classify-one-to-watch.ts,scripts/fetch-captions-and-match.ts— do not edit. They produce byte-identical output against unchanged input by design. - Each run produces a NEW numbered file. Never overwrite the existing
out/features-confirmed.html(immutable baseline included with bundle) or any priorout/features-confirmed-runNNN-*.html. New runs land atout/features-confirmed-run{NNN+1}-{anchor}.html. Updateout/latest.htmlsymlink to point at the freshest. - JSON-schema validation is mandatory. After EVERY synthesis stage writes its output JSON, call
bun scripts/validate-synthesis.ts --stage <name> --file <path>. On failure (exit 1), retry the synthesis ONCE with the same prompt/data; on second failure, mark the affected row witherror: "schema-incomplete"and continue. - Hard $ cost ceiling per run: ~$0.30. Data-source providers + Whisper transcription. Anthropic is $0 marginal (subscription via session OAuth). Announce estimated spend at Stage 1 before harvest fires.
- Wall-clock target: <25 min end-to-end for fresh-harvest. If a stage exceeds 5 min, narrate the delay; if any stage exceeds 10 min OR the pipeline exceeds 25 min total, surface the overrun and ask the user whether to continue.
- Don't run
bun run features:sentiment:legacyor any*:legacyscript. They exist as reference only — they useclaude --printwhich lost subscription billing post-2026-06-15. - Don't suggest installing
@anthropic-ai/sdk,anthropic, or any other SDK package. The bundle has none and shouldn't. - Don't suggest a workflow that bypasses the per-stage JSON validation. The validator catches schema drift before the renderer breaks.
- Don't overwrite
out/features-confirmed.html(the baseline reference). Each run is archival-additive. - Don't fabricate citations, quotes, or feature URLs. Synthesis stages cite real URLs from harvested data only; honest empty arrays beat fake content.
| Stage | Hard cost |
|---|---|
| Data harvesting + reply threads + transcription | ~$0.10-$0.20 |
| Whisper audio transcription (for video reels) | ~$0.05 |
| Anthropic Opus (synthesis) | $0 marginal (subscription) |
| Total fresh-harvest run | ~$0.15-$0.30 |
| Render-only path | $0 |
- Pipeline narrated stage-by-stage with timestamp + count + status.
- JSON validated after every synthesis stage.
out/features-confirmed-run{NNN}-{anchor}.htmlwritten with run-incremented N.out/latest.htmlsymlink updated.- Report opens in user's browser via
interceptor open(or the absolute path is printed for manual open if Interceptor is unavailable). - Final narration summarizes: run number, output path, size, content counts, wall-clock, hard $ spend.