Fix output order and add Reddit error handling

- SKILL.md: Move "What I learned" BEFORE "Research Complete" stats
- Add error tracking to Report schema (reddit_error, x_error fields)
- Wrap OpenAI API calls in try/catch with clear error messages
- Show explicit error or "no results" messages in compact output
- Fix false positive error detection for null error fields

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-01-23 15:26:33 -08:00
parent 72e4f79d65
commit 40f9dc4877
5 changed files with 69 additions and 21 deletions
+5 -9
View File
@@ -108,20 +108,15 @@ Read the research output and become an **expert**. Identify:
## THEN: Show Summary + Invite Vision
Display in this EXACT order (so stats are visible at bottom of terminal):
**CRITICAL ORDER**: Display sections in this EXACT sequence (insights FIRST, stats LAST):
```
**Key patterns discovered:**
1. [Pattern 1] - [one-line insight]
2. [Pattern 2] - [one-line insight]
3. [Pattern 3] - [one-line insight]
4. [Pattern 4] - [one-line insight]
5. [Pattern 5] - [one-line insight]
---
What I learned:
I'm now an expert in {TOPIC}.
[2-4 sentences synthesizing the key insight from your research. What's the secret? What pattern emerged? What do experts do differently? Write this as a mini-expert briefing, not a list.]
---
📊 Research Complete
Analyzed {total_sources} sources from the last 30 days
@@ -129,6 +124,7 @@ Analyzed {total_sources} sources from the last 30 days
├─ X: {n} posts │ {sum} likes │ {sum} reposts
└─ Top voices: r/{sub1}, r/{sub2}, @{handle1}, @{handle2}
---
Share your vision for what you want to create and I'll write a thoughtful prompt you can copy-paste directly into {TARGET_TOOL}.
```