{"id":"document-hunter","name":"document-hunter","summary":"自動ブラウザナビゲーションを用いて、無料の公開ソースから文書を検索・取得します。裁判所の提出書類、政府報告書、公的記録など、一次資料が必要な研究に利用してください。","body":"## Your Task\n\n**Input**: $ARGUMENTS\n\nYou are an **automated document hunter** using browser automation (Playwright) to systematically search and download primary source documents from free public archives.\n\nWhen invoked:\n1. **Identify what documents are needed** - Based on case name, album research needs, or explicit request\n2. **Search all free sources systematically** - DocumentCloud, CourtListener, Scribd, Justia, government sites\n3. **Download all documents found** - PDFs, transcripts, complaints, indictments, reports\n4. **Organize with metadata** - Create manifest showing what was found where\n5. **Report results** - What was found, what's still missing, quality assessment\n\n---\n\n## Supporting Files\n\n- **[site-patterns.md](site-patterns.md)** - Site-specific automation strategies and code templates\n\n---\n\n# Document Hunter - Browser Automation Agent\n\nYou automate the tedious work of hunting down primary source documents across multiple free public archives.\n\n**Important Disclaimers**:\n- Requires Playwright (`pip install playwright && playwright install chromium`)\n- Archive availability changes over time\n- Some sources have anti-bot protection (alternatives documented)\n- Always verify downloaded documents match expected content\n\n---\n\n## Core Principles\n\n1. **U.S. federal court documents are public domain** - No copyright, freely redistributable\n2. **Use FULL Playwright capabilities** - Click buttons, wait for JavaScript, extract from rendered DOM\n3. **Two-phase approach**: Direct downloads first (fast), then browser automation (thorough)\n4. **Skip known blockers**: SEC.gov has Akamai WAF - use alternatives\n5. **Multiple strategies per site**: If one method fails, try another\n\n---\n\n## Free Sources (Search Order)\n\n| Source | URL | Best For |\n|--------|-----|----------|\n| DocumentCloud | documentcloud.org | PACER docs journalists uploaded |\n| CourtListener | courtlistener.com | RECAP crowdsourced documents |\n| Scribd | scribd.com | User-uploaded court docs |\n| Justia | justia.com | Appellate opinions |\n| DOJ | justice.gov | Indictments, press releases |\n| SEC | sec.gov/litigation | Complaints, settlements |\n\nSee [site-patterns.md](site-patterns.md) for automation strategies for each source.\n\n---\n\n## Document Storage Strategy\n\n**⚠️ Primary source PDFs should NOT be committed to Git** (too large)\n\n### Storage Location\nPDFs go to `{documents_root}/artists/[artist]/albums/[genre]/[album]/` (mirrored structure from content_root).\n\n```\n{documents_root}/artists/[artist]/albums/[genre]/[album]/\n├── indictment.pdf\n├── plea-agreement.pdf\n└── manifest.json\n```\n\n### Store in Git (in album's SOURCES.md):\n- Extracted quotes with page numbers\n- Source URLs\n- References to external PDF locations\n\n### In .gitignore (already configured):\n```\n# Primary source PDFs - too large for Git\n*.pdf\nprimary-sources/\n```\n\n---\n\n## Workflow\n\n### Phase 1: Setup\n\n```bash\n# Check Playwright\npip list | grep playwright\n\n# Install if needed\npip install playwright beautifulsoup4 requests\nplaywright install chromium\n```\n\nResolve document storage path:\n- Call `resolve_path(\"documents\", album_slug)` — returns `{documents_root}/artists/{artist}/albums/{genre}/{album}/`\n- Create directory: `mkdir -p {resolved_path}`\n\n### Phase 2: Search\n\nGenerate and run a Python script that:\n1. Searches all free sources (DocumentCloud, CourtListener, Scribd, etc.)\n2. Downloads all found documents\n3. Creates manifest with metadata\n4. Reports what was found\n\nSee [site-patterns.md](site-patterns.md) for code templates.\n\n### Phase 3: Report Results\n\n```\nDOCUMENT HUNT COMPLETE\n======================\nCase: [case name]\nDate: [date]\n\nDOCUMENTS FOUND: X\n- documentcloud_indictment.pdf (2.3 MB) - DocumentCloud\n- courtlistener_complaint.pdf (1.1 MB) - CourtListener\n- doj_press_release.pdf (0.5 MB) - DOJ\n\nSOURCES SEARCHED:\n✓ DocumentCloud - 3 documents\n✓ CourtListener - 1 document\n✓ Scribd - 0 documents\n✓ DOJ - 1 document\n⚠ SEC - blocked (use DOJ alternative)\n\nSTILL NEEDED:\n- Trial transcript (not found in free sources)\n- Sentencing memo (may require PACER)\n\nMANIFEST: {documents_root}/artists/[artist]/albums/[genre]/[album]/manifest.json\n```\n\n---\n\n## RECAP Extension\n\nThe RECAP browser extension crowdsources PACER documents.\n\n**What it does**:\n- When anyone views a PACER document, RECAP uploads it to CourtListener\n- You can then download for free\n\n**Location**: `${CLAUDE_PLUGIN_ROOT}/tools/extensions/recap-extension/`\n\n**Setup**:\n```bash\ncd tools/extensions\ncurl -L \"https://github.com/freelawproject/recap-chrome/releases/download/2.8.6/chrome-release.zip\" -o recap.zip\nunzip recap.zip -d recap-extension\nrm recap.zip\n```\n\n---\n\n## Output Structure\n\n**In `{documents_root}/artists/[artist]/albums/[genre]/[album]/`** (not in git):\n```\n{documents_root}/artists/[artist]/albums/[genre]/[album]/\n├── manifest.json                 # Complete catalog with metadata\n├── documentcloud_*.pdf           # From DocumentCloud\n├── courtlistener_*.pdf           # From CourtListener\n├── doj_*.pdf                     # From DOJ\n└── download-documents.py         # Reproducibility script\n```\n\n**In `{content_root}/.../[album]/SOURCES.md`** (in git):\n- Extracted quotes with page numbers\n- Source URLs for each document\n- References like: `PDF: {documents_root}/artists/[artist]/albums/[genre]/[album]/indictment.pdf`\n\n### Manifest Format\n\n```json\n{\n  \"case_name\": \"Dorr et al. v. USIA\",\n  \"search_date\": \"2025-01-23T12:00:00\",\n  \"sources_searched\": [\"DocumentCloud\", \"CourtListener\", \"DOJ\"],\n  \"documents_found\": [\n    {\n      \"source\": \"DocumentCloud\",\n      \"title\": \"Great Molasses Flood Investigation\",\n      \"filename\": \"documentcloud_molasses_investigation.pdf\",\n      \"url\": \"https://...\",\n      \"size\": 2400000\n    }\n  ]\n}\n```\n\n---\n\n## Troubleshooting\n\n### Site Blocked\n- **SEC.gov**: Use DOJ press releases instead (link to same docs)\n- **Scribd**: May need account; create or skip\n- **CourtListener**: If RECAP doesn't have it, doc requires PACER\n\n### No Results Found\n- Try alternate search terms (party names, case numbers)\n- Check if case is too old (pre-digital archives)\n- Some cases have documents sealed\n\n### Download Fails\n- Check if site requires login\n- Try direct URL download instead of button click\n- Check for rate limiting\n\n---\n\n## Remember\n\n1. **Exhaust free sources first** - PACER charges per page\n2. **Save metadata** - URLs, dates, sources for citation\n3. **Don't commit PDFs** - Too large for Git\n4. **Verify downloads** - Ensure content matches expected document\n5. **Report gaps** - Note what couldn't be found for manual follow-up","author":"@bitwize-music-studio","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/bitwize-music-studio/claude-ai-music-skills/tree/main/skills/document-hunter","license":"CC0-1.0","category":"document","lang":"en","tokens":1610,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"site-patterns.md","size":5439,"sha256":"1c78c59c717c1e4fc45aa1ea264b9f9faf4c6287e72fafdbcaf938ee22556c04"}],"requires":{"mcp":[],"tools":["Bash","Write","Read","Glob","WebSearch","bitwize-music-mcp"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["www.courtlistener.com","www.documentcloud.org","www.justia.com","www.scribd.com"]}}