fix(release): v2.9.5 - remove re-introduced Save Research section
PR merges on March 7 (PR #48 Xiaohongshu, upstream merge) regressed SKILL.md by re-introducing the "Save Research to Documents" section that v2.9.4 removed. Those branches were forked before v2.9.4 and brought the old content back via merge resolution. Fixes: remove save section, restore --save-dir flag on bash command, update agent mode line, add tool-call guard to STOP instruction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: last30days
|
||||
version: "2.9.1"
|
||||
version: "2.9.5"
|
||||
description: "Research a topic from the last 30 days. Also triggered by 'last30'. Sources: Reddit, X, YouTube, TikTok, Instagram, Hacker News, Polymarket, web. Become an expert and write copy-paste-ready prompts."
|
||||
argument-hint: 'last30 AI video tools, last30 best project management tools'
|
||||
allowed-tools: Bash, Read, Write, AskUserQuestion, WebSearch
|
||||
@@ -44,7 +44,7 @@ metadata:
|
||||
- prompts
|
||||
---
|
||||
|
||||
# last30days v2.9.1: Research Any Topic from the Last 30 Days
|
||||
# last30days v2.9.5: Research Any Topic from the Last 30 Days
|
||||
|
||||
> **Permissions overview:** Reads public web/platform data and optionally saves research briefings to `~/Documents/Last30Days/`. X/Twitter search uses optional user-provided tokens (AUTH_TOKEN/CT0 env vars) — no browser session access. All credential usage and data writes are documented in the [Security & Permissions](#security--permissions) section.
|
||||
|
||||
@@ -139,7 +139,7 @@ If `--agent` appears in ARGUMENTS (e.g., `/last30days plaud granola --agent`):
|
||||
5. **Skip** the follow-up invitation ("I'm now an expert on X...")
|
||||
6. **Output** the complete research report and stop - do not wait for further input
|
||||
|
||||
Agent mode still saves the research briefing to `~/Documents/Last30Days/` using the same logic as interactive mode (see "Save Research to Documents" section).
|
||||
Agent mode saves raw research data to `~/Documents/Last30Days/` automatically via `--save-dir` (handled by the script, no extra tool calls).
|
||||
|
||||
Agent mode report format:
|
||||
|
||||
@@ -183,7 +183,7 @@ if [ -z "${SKILL_ROOT:-}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 "${SKILL_ROOT}/scripts/last30days.py" "$ARGUMENTS" --emit=compact --no-native-web # Add --x-handle=HANDLE if RESOLVED_HANDLE is set
|
||||
python3 "${SKILL_ROOT}/scripts/last30days.py" "$ARGUMENTS" --emit=compact --no-native-web --save-dir=~/Documents/Last30Days # Add --x-handle=HANDLE if RESOLVED_HANDLE is set
|
||||
```
|
||||
|
||||
Use a **timeout of 300000** (5 minutes) on the Bash call. The script typically takes 1-3 minutes.
|
||||
@@ -514,57 +514,9 @@ For `/last30days war in Iran` (NEWS):
|
||||
|
||||
---
|
||||
|
||||
## Save Research to Documents
|
||||
|
||||
After displaying the invitation, save the complete research briefing to `~/Documents/Last30Days/`. This happens automatically on every run.
|
||||
|
||||
**Generate the filename** from TOPIC:
|
||||
- Lowercase, replace spaces/special chars with hyphens, remove consecutive hyphens, trim to 60 chars
|
||||
- Example: "Claude Code Best Practices" → `claude-code-best-practices.md`
|
||||
- If file already exists, append today's date: `{slug}-YYYY-MM-DD.md`
|
||||
|
||||
**End your invitation with a single `📎` footer line:**
|
||||
|
||||
```
|
||||
📎 ~/Documents/Last30Days/{slug}.md
|
||||
```
|
||||
|
||||
**Then immediately save using a background Bash command** (`run_in_background: true`):
|
||||
|
||||
```bash
|
||||
mkdir -p ~/Documents/Last30Days && cat > ~/Documents/Last30Days/{slug}.md << 'RESEARCH_EOF'
|
||||
# {TOPIC}
|
||||
|
||||
> Researched {date} | Query type: {QUERY_TYPE} | Target tool: {TARGET_TOOL or "general"}
|
||||
|
||||
## What I learned
|
||||
|
||||
{The full synthesis section you just displayed - all topics, patterns, and citations}
|
||||
|
||||
## Stats
|
||||
|
||||
{The full stats box with source counts and engagement - copy exactly as displayed}
|
||||
|
||||
## Follow-up suggestions
|
||||
|
||||
{The 2-3 specific suggestions from the invitation block}
|
||||
|
||||
---
|
||||
*Generated by [last30days](https://github.com/mvanhorn/last30days-skill) v2.9.1*
|
||||
RESEARCH_EOF
|
||||
```
|
||||
|
||||
**CRITICAL RULES:**
|
||||
1. NEVER use the `Write` tool — it displays "Wrote N lines..." which ruins the experience
|
||||
2. ALWAYS use `run_in_background: true` so the Bash call is nearly invisible
|
||||
3. The `📎` line is part of your text message, not a separate tool call
|
||||
4. The invitation + `📎` line must be the LAST visible thing on screen
|
||||
|
||||
---
|
||||
|
||||
## WAIT FOR USER'S RESPONSE
|
||||
|
||||
**STOP and wait** for the user to respond.
|
||||
**STOP and wait** for the user to respond. Do NOT call any tools after displaying the invitation. The research script already saved raw data to `~/Documents/Last30Days/` via `--save-dir`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -132,9 +132,11 @@ Two features bundled in one PR:
|
||||
The Reddit public fallback alone makes this worth merging - it makes Reddit work with zero API keys. Xiaohongshu adds value for Chinese-market research.
|
||||
|
||||
**Before merge:**
|
||||
- [ ] Run full test suite to confirm no regressions
|
||||
- [x] Run full test suite to confirm no regressions (292/297 pass, 5 pre-existing)
|
||||
- [x] Verify Xiaohongshu gracefully skips when API is unavailable (returns False, no crash)
|
||||
- [x] Resolved merge conflicts with ScrapeCreators Reddit (main). Priority: ScrapeCreators -> OpenAI -> public fallback
|
||||
- [x] Merged to main and pushed
|
||||
- [ ] Test Reddit public fallback locally: unset OPENAI_API_KEY, run `python3 scripts/last30days.py "test topic" --search reddit --emit=compact`
|
||||
- [ ] Verify Xiaohongshu gracefully skips when API is unavailable (should show skip message, not crash)
|
||||
- [ ] Update `get_available_sources()` docstring to reflect Reddit always-available change
|
||||
|
||||
**After merge (follow-up):**
|
||||
@@ -217,6 +219,8 @@ This PR is too large and has too many issues for a clean merge. Request the cont
|
||||
- PR A: `apify_client.py` + env.py routing (foundation)
|
||||
- PR B: Individual source modules + tests (features)
|
||||
|
||||
**Status:** [x] Review posted requesting changes (2026-03-07)
|
||||
|
||||
**Comment template for PR:**
|
||||
> Thanks for this contribution - the single-token approach is a great idea for simplifying setup. A few things need fixing before we can merge:
|
||||
>
|
||||
@@ -243,9 +247,9 @@ This is a feature request to support Gemini CLI as a runtime alongside Claude Co
|
||||
|
||||
### Recommendation: ACKNOWLEDGE AND BACKLOG
|
||||
|
||||
- [ ] Respond with: "Thanks for the suggestion! Adding to the backlog. If you're familiar with Gemini CLI's skill/extension format and want to take a crack at it, PRs are welcome. The core Python scripts in `scripts/` are runtime-agnostic - the main work would be creating a Gemini-compatible manifest and deployment path."
|
||||
- [ ] Add a `help wanted` label
|
||||
- [ ] Keep open as a backlog item
|
||||
- [x] Respond with comment acknowledging and inviting contribution
|
||||
- [x] Add a `help wanted` label
|
||||
- [x] Keep open as a backlog item
|
||||
|
||||
---
|
||||
|
||||
@@ -253,9 +257,9 @@ This is a feature request to support Gemini CLI as a runtime alongside Claude Co
|
||||
|
||||
| Priority | Item | Action | Risk |
|
||||
|----------|------|--------|------|
|
||||
| 1 | PR #52 (metadata fix) | Merge now | None |
|
||||
| 2 | Issue #46 (upload error) | Auto-closes with PR #52 | None |
|
||||
| 3 | PR #50 (entity tests) | Run tests, merge | None |
|
||||
| 4 | PR #48 (Xiaohongshu + Reddit fallback) | Test locally, merge with minor conditions | Low |
|
||||
| 5 | Issue #45 (Gemini CLI) | Acknowledge, backlog, label | None |
|
||||
| 6 | PR #47 (Apify unified) | Request changes (blockers found) | Medium-High |
|
||||
| 1 | PR #52 (metadata fix) | ~~Merge now~~ DONE | None |
|
||||
| 2 | Issue #46 (upload error) | ~~Auto-closes with PR #52~~ DONE | None |
|
||||
| 3 | PR #50 (entity tests) | ~~Run tests, merge~~ DONE | None |
|
||||
| 4 | PR #48 (Xiaohongshu + Reddit fallback) | ~~Test locally, merge with conditions~~ DONE | Low |
|
||||
| 5 | Issue #45 (Gemini CLI) | ~~Acknowledge, backlog, label~~ DONE | None |
|
||||
| 6 | PR #47 (Apify unified) | ~~Request changes~~ DONE (awaiting contributor) | Medium-High |
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
title: "fix: Remove re-introduced Save Research to Documents section from SKILL.md"
|
||||
type: fix
|
||||
status: active
|
||||
date: 2026-03-08
|
||||
---
|
||||
|
||||
# fix: Remove re-introduced Save Research to Documents section from SKILL.md
|
||||
|
||||
## Overview
|
||||
|
||||
PR merges on March 7 regressed SKILL.md by re-introducing the "Save Research to Documents" section that v2.9.4 (`6d5acb9`) intentionally removed. The save logic was moved into the Python script via `--save-dir` flag, but the merged branches (PR #48 Xiaohongshu, upstream merge) were forked before v2.9.4 and brought the old SKILL.md content back via merge resolution.
|
||||
|
||||
**Result:** The skill now saves research AFTER the "I'm now an expert" invitation via a separate Bash tool call, which causes extra cogitation time, "(No output)" noise, and sometimes hallucinated follow-up messages - the exact UX problems v2.9.4 fixed.
|
||||
|
||||
## Root Cause
|
||||
|
||||
1. Commit `6d5acb9` (v2.9.4, March 6) removed the ~45-line "Save Research to Documents" section and added `--save-dir=~/Documents/Last30Days` to the bash command
|
||||
2. PR #48 (Xiaohongshu) branch contained commit `9950d01` with the OLD save-via-Bash version
|
||||
3. Merging PR #48 on March 7 re-introduced the save section
|
||||
4. Upstream merge (`28dff6e`) compounded it
|
||||
|
||||
## Three changes needed
|
||||
|
||||
All in `SKILL.md`:
|
||||
|
||||
### 1. Fix agent mode line (line 142)
|
||||
|
||||
**Current (broken):**
|
||||
```
|
||||
Agent mode still saves the research briefing to `~/Documents/Last30Days/` using the same logic as interactive mode (see "Save Research to Documents" section).
|
||||
```
|
||||
|
||||
**Should be:**
|
||||
```
|
||||
Agent mode saves raw research data to `~/Documents/Last30Days/` automatically via `--save-dir` (handled by the script, no extra tool calls).
|
||||
```
|
||||
|
||||
### 2. Add `--save-dir` back to bash command (line 186)
|
||||
|
||||
**Current (broken):**
|
||||
```bash
|
||||
python3 "${SKILL_ROOT}/scripts/last30days.py" "$ARGUMENTS" --emit=compact --no-native-web
|
||||
```
|
||||
|
||||
**Should be:**
|
||||
```bash
|
||||
python3 "${SKILL_ROOT}/scripts/last30days.py" "$ARGUMENTS" --emit=compact --no-native-web --save-dir=~/Documents/Last30Days
|
||||
```
|
||||
|
||||
### 3. Delete the entire "Save Research to Documents" section (lines 517-563)
|
||||
|
||||
Remove from `## Save Research to Documents` through the `---` separator before `## WAIT FOR USER'S RESPONSE`. This is ~47 lines.
|
||||
|
||||
### 4. Update "STOP and wait" line (line 567)
|
||||
|
||||
**Current:**
|
||||
```
|
||||
**STOP and wait** for the user to respond.
|
||||
```
|
||||
|
||||
**Should be (matching v2.9.4):**
|
||||
```
|
||||
**STOP and wait** for the user to respond. Do NOT call any tools after displaying the invitation. The research script already saved raw data to `~/Documents/Last30Days/` via `--save-dir`.
|
||||
```
|
||||
|
||||
## Post-edit steps
|
||||
|
||||
1. Run `bash /Users/mvanhorn/last30days-skill-private/scripts/sync.sh` to deploy to `~/.claude/skills/`
|
||||
2. Push to `origin/main` and `upstream/main`
|
||||
3. Verify with `diff` that installed skill matches repo
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] "Save Research to Documents" section is gone from SKILL.md
|
||||
- [ ] `--save-dir=~/Documents/Last30Days` is in the bash command
|
||||
- [ ] Agent mode line references `--save-dir`, not the deleted section
|
||||
- [ ] "STOP and wait" line includes the "do NOT call any tools" reinforcement
|
||||
- [ ] `sync.sh` deployed successfully
|
||||
- [ ] `diff` between repo and `~/.claude/skills/last30days/SKILL.md` shows no differences
|
||||
- [ ] Pushed to origin and upstream
|
||||
Reference in New Issue
Block a user