Scrape AI research URLs, archive with frontmatter, create GitHub Issues with identity verification.
allowed-tools
Read, Bash, Grep, Glob, Edit, Write
Research Archival
Scrape AI research conversations (ChatGPT, Gemini, Claude) and web pages, archive them as markdown files with YAML frontmatter, and create cross-referenced GitHub Issues — with mandatory identity verification at every step.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
FIRST - TodoWrite Task Templates
MANDATORY: Select and load the appropriate template before any archival work.
Template A - Full Archival (scrape + save + issue)
1. Identity preflight — verify GH_ACCOUNT or resolve via curl /user
2. Scrape URL — route to Firecrawl or Jina per url-routing.md
3. Save to file — YYYY-MM-DD-{slug}-{source_type}.md with frontmatter
4. Survey labels — gh label list, reuse existing, max 3-6
5. Create GitHub Issue — use --body with heredoc or --body-file
6. Update frontmatter — add github_issue_url and github_issue_number
7. Post canonical backlink comment on Issue
Template B - Save Only (no issue)
1. Identity preflight (still required for consistency)
2. Scrape URL — route to Firecrawl or Jina per url-routing.md
3. Save to file — YYYY-MM-DD-{slug}-{source_type}.md with frontmatter
Template C - Issue Only (file already exists)
1. Identity preflight
2. Read existing file frontmatter
3. Survey labels — gh label list, reuse existing, max 3-6
4. Create GitHub Issue — use --body with heredoc or --body-file
5. Update file frontmatter with issue cross-reference
6. Post canonical backlink comment on Issue
Identity Preflight (MANDATORY — Step 0)
MUST execute before any gh write command. Non-negotiable.
The gh-repo-identity-guard.mjs PreToolUse hook provides a safety net, but this skill performs its own check as defense-in-depth.
Resolution Order
Fast-path — GH_ACCOUNT env var (set by mise per-directory)
Token filename — scan ~/.claude/.secrets/gh-token-* for single base match
API call — curl -sH "Authorization: token $GH_TOKEN" https://api.github.com/user
BLOCK if mismatch — display diagnostic and do NOT continue to any gh write operation.
Scraping Workflow
Route scrape requests based on URL pattern. See url-routing.md for full details.
Decision Tree
Any JS-rendered share link (chatgpt.com/share/, gemini.google.com/share/, claude.ai/artifacts/)
→ Firecrawl public API (POST https://api.firecrawl.dev/v2/scrape)
→ Use curl (not WebFetch — it summarizes instead of returning raw)
Simple static page
→ Either works. Jina Reader (https://r.jina.ai/{URL}) is one GET and fine here.
Default to Firecrawl. Measured 2026-08-13 on two chatgpt.com/share/* links, Jina returned
17% and 12% of Firecrawl's content and truncated mid-sentence; Firecrawl reached the true page
footer both times. Jina also needs -H "x-timeout: 30" or it returns ~321 bytes of login chrome.
Firecrawl Scrape
No health check, no preflight, no revival. The public API needs no key and has no host to be down —
handle a failed request per request rather than gating the run on a liveness probe.
/usr/bin/env bash << 'SCRAPE_EOF'set -euo pipefail
# waitFor gives the SPA time to render; without it a share link returns the shell.
RESPONSE=$(curl -sS --max-time 180 -X POST https://api.firecrawl.dev/v2/scrape \
-H "Content-Type: application/json" \
-d "$(jq -n --arg u "$URL" \
'{url: $u, formats: ["markdown"], waitFor: 8000, timeout: 60000}')")
CONTENT=$(printf'%s'"$RESPONSE" | jq -r '.data.markdown // empty')
if [ -z "$CONTENT" ]; thenecho"ERROR: Firecrawl returned no markdown:" >&2
printf'%s\n'"$RESPONSE" | head -c 400 >&2
echo"Retry once, then fall back to: curl -H 'x-timeout: 30' https://r.jina.ai/${URL}" >&2
exit 1
fiprintf'%s\n'"$CONTENT"
SCRAPE_EOF
Do not reintroduce a self-hosted Firecrawl. The littleblack deployment (ports 3002/3003, five
containers) was retired 2026-08-13 and reclaimed ~18 GB. It required health checks, container
restarts, and WORKER-STALLED triage that the public API makes unnecessary at this volume.
File Saving
Naming Convention
YYYY-MM-DD-{slug}-{source_type}.md
slug — kebab-case summary (max 50 chars)
source_type — from enum: chatgpt, gemini, claude, web
Default location: docs/research/ in the current project.
Did the command succeed? — If not, fix the instruction or error table that caused the failure.
Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.
Only update if the issue is real and reproducible — not speculative.