用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/terrylica/cc-skills --skill research-archival命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | research-archival |
| description | Scrape AI research URLs, archive with frontmatter, create GitHub Issues with identity verification. |
| allowed-tools | Read, Bash, Grep, Glob, Edit, Write |
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.
MANDATORY: Select and load the appropriate template before any archival work.
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
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
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
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.
GH_ACCOUNT env var (set by mise per-directory)~/.claude/.secrets/gh-token-* for single base matchcurl -sH "Authorization: token $GH_TOKEN" https://api.github.com/user/usr/bin/env bash << 'IDENTITY_EOF'
# Resolve authenticated user
if [ -n "$GH_ACCOUNT" ]; then
AUTH_USER="$GH_ACCOUNT"
AUTH_SOURCE="GH_ACCOUNT"
else
AUTH_USER=$(curl -sf --max-time 5 -H "Authorization: token $GH_TOKEN" \
https://api.github.com/user 2>/dev/null | grep -o '"login":"[^"]*"' | cut -d'"' -f4)
AUTH_SOURCE="API /user"
fi
# Resolve target repo owner
REPO_OWNER=$(git remote get-url origin 2>/dev/null | sed -n 's|.*github\.com[:/]\([^/]*\)/.*|\1|p')
echo "Authenticated as: $AUTH_USER (via $AUTH_SOURCE)"
echo "Target repo owner: $REPO_OWNER"
if [ "$AUTH_USER" != "$REPO_OWNER" ]; then
echo ""
echo "MISMATCH — do NOT proceed with gh write commands"
echo "Fix: export GH_TOKEN=\$(~/.claude/tools/bin/gh-token-for-repo)"
exit 1
fi
echo "Identity verified — safe to proceed"
IDENTITY_EOF
BLOCK if mismatch — display diagnostic and do NOT continue to any gh write operation.
Route scrape requests based on URL pattern. See url-routing.md for full details.
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.
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" ]; then
echo "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
fi
printf '%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.
YYYY-MM-DD-{slug}-{source_type}.md
slug — kebab-case summary (max 50 chars)source_type — from enum: chatgpt, gemini, claude, webDefault location: docs/research/ in the current project.
See frontmatter-schema.md for the full field contract.
---
source_url: https://chatgpt.com/share/...
source_type: chatgpt-share
scraped_at: "2026-02-09T18:30:00Z"
model_name: gpt-4o
custom_gpt_name: Cosmo
claude_code_uuid: SESSION_UUID
github_issue_url: ""
github_issue_number: ""
---
Leave github_issue_url and github_issue_number empty — update after Issue creation.
Survey existing labels first — reuse preferred, create only when concept is genuinely novel.
gh label list --repo owner/repo --limit 100
Policy: Max 3-6 labels per issue. Common labels: research, ai-output, chatgpt, gemini, archival.
Use --body with heredoc for inline composition, or --body-file for very large content.
/usr/bin/env bash << 'ISSUE_EOF'
# Write body to temp file
cat > "/tmp/issue-body-${SLUG}.md" << 'BODY_EOF'
## Summary
Brief description of the archived research content.
## Source
- **URL**: SOURCE_URL
- **Type**: source_type
- **Model**: model_name
- **Scraped**: scraped_at
## Key Findings
- Finding 1
- Finding 2
## Archived File
`docs/research/FILENAME.md`
BODY_EOF
# Create issue
gh issue create \
--repo owner/repo \
--title "Research: descriptive title here" \
--body-file "/tmp/issue-body-${SLUG}.md" \
--label "research,ai-output"
# Clean up
rm -f "/tmp/issue-body-${SLUG}.md"
ISSUE_EOF
After issue creation, update the archived file's frontmatter with the issue URL and number.
Post a comment on the Issue linking back to the archived file:
**Archived**: `docs/research/YYYY-MM-DD-slug-source_type.md`
Scraped: 2026-02-09T18:30:00Z
Source: [chatgpt-share](https://chatgpt.com/share/...)
Session: SESSION_UUID
After modifying THIS skill:
./references/ links resolveuv run plugins/plugin-dev/scripts/skill-creator/quick_validate.py plugins/gh-tools/skills/research-archivalbun run plugins/plugin-dev/scripts/validate-links.ts plugins/gh-tools/skills/research-archival| Issue | Cause | Fix |
|---|---|---|
| Wrong account posting | GH_TOKEN mismatch | Check mise env | grep GH_TOKEN, verify GH_ACCOUNT |
| Body exceeds 65536 chars | GitHub API limit | Split across issue body + first comment |
| Firecrawl returns no markdown | Transient API failure | Retry once, then fall back to Jina with -H "x-timeout: 30" |
| Scrape returns the page shell | SPA had not rendered yet | Raise waitFor (8000 → 15000) and timeout in the request body |
| Jina returns ~321 bytes | Missing timeout header | Add -H "x-timeout: 30" — without it Jina returns login chrome |
| Jina output truncated | Jina under-covers JS-heavy pages | Expected — use Firecrawl; Jina got 17%/12% coverage in the 2026-08-13 test |
| mise parse error | Stale .mise.toml syntax | Run mise doctor, check [hooks.enter] syntax |
| Identity guard blocks | Non-owner account | export GH_TOKEN=$(~/.claude/tools/bin/gh-token-for-repo) |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
user wants to create a macOS Calendar event with sound alarms and paired Reminders, schedule a meeting, RSVP to an invitation, or set reminders.
Park a draft message/text in macOS Notes for the operator to review and edit, then read it back before acting (e.g. before sending to a real person). Notes is the source of truth (AppleScript CRUD, iCloud-synced, provenance-stamped with the Claude Code session UUID); Stickies is a best-effort view-only desktop mirror. Use whenever you draft something a human should confirm/edit before it is sent or committed — messages, replies, announcements, anything outbound. TRIGGERS - park this draft, park the message, hold this draft, let me edit first, draft for my approval, save to notes for review, read back the draft.
Programmatic Firecrawl usage via the public API, academic paper routing, recursive deep research, and raw corpus persistence.
基于 SOC 职业分类