{"skill":{"slug":"bear-research-enricher","displayName":"bear-research-enricher","summary":"Enrich Bear research notes tagged 「待整理」 with thematic GIFs. Use when the user wants to auto-illustrate or spruce up draft research notes in Bear, or mentions...","description":"---\nname: research-assistant\ndescription: Enrich Bear research notes tagged 「待整理」 with thematic GIFs. Use when the user wants to auto-illustrate or spruce up draft research notes in Bear, or mentions \"待整理\", \"research notes\", \"add GIFs to notes\", or \"enrich notes\".\nversion: 0.1.0\n---\n\n# Research Assistant\n\nRead Bear notes tagged 「待整理」, extract key topics, search for matching GIFs via gifgrep, and insert them inline. When done, remove the 「待整理」 tag and add 「已整理」.\n\n## Prerequisites\n\n- Bear app running on macOS with a valid API token at `~/.config/grizzly/token`\n- `grizzly` CLI installed (`go install github.com/tylerwince/grizzly/cmd/grizzly@latest`)\n- `gifgrep` skill installed (provides GIF search)\n- `curl` available\n\n## Workflow\n\n1. **Fetch notes**: Run `grizzly open-tag --name \"待整理\" --enable-callback --json --token-file ~/.config/grizzly/token` to list all notes with the tag.\n2. **For each note**:\n   a. Read note content via `grizzly open-note --id <NOTE_ID> --enable-callback --json --token-file ~/.config/grizzly/token`\n   b. Extract 2–3 key topics or keywords from the note title and first paragraph.\n   c. For each keyword, search GIFs using the gifgrep skill (or `curl \"https://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&q=<keyword>&limit=3\"` as fallback).\n   d. Pick the most relevant GIF URL per keyword.\n   e. Append GIFs to the note using `grizzly add-text`:\n      ```\n      echo -e \"\\n---\\n![<keyword>](<gif_url>)\" | grizzly add-text --id <NOTE_ID> --mode append --token-file ~/.config/grizzly/token\n      ```\n3. **Retag**: Remove 「待整理」 and add 「已整理」 by updating note tags via Bear's x-callback-url:\n   ```\n   open \"bear://x-callback-url/add-tag?id=<NOTE_ID>&name=已整理\"\n   open \"bear://x-callback-url/remove-tag?id=<NOTE_ID>&name=待整理\"\n   ```\n4. **Report**: Summarize which notes were enriched and how many GIFs were added.\n\n## Script\n\nFor batch processing, use `scripts/enrich_notes.sh`:\n\n```bash\nbash scripts/enrich_notes.sh\n```\n\nThe script handles the full loop: fetch tagged notes → per-note topic extraction → GIF search → insert → retag.\n\n## Notes\n\n- If no notes carry the 「待整理」 tag, report that and exit.\n- If GIF search returns no results for a keyword, skip that keyword rather than inserting a placeholder.\n- Bear must be running; grizzly commands will fail silently otherwise.\n- Rate-limit GIF API calls (1 request/second) to avoid throttling.\n","tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":338,"installsAllTime":13,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1777862247993,"updatedAt":1778492842520},"latestVersion":{"version":"0.1.0","createdAt":1777862247993,"changelog":"Initial release: auto-enrich Bear research notes tagged 待整理 with thematic GIFs","license":"MIT-0"},"metadata":null,"owner":{"handle":"terrycarter1985","userId":"s17brwfrqyjhbjgadkvar20h8x8492g8","displayName":"terrycarter1985","image":"https://avatars.githubusercontent.com/u/1542987?v=4"},"moderation":null}