Skip to main content
skill CX Codex

document-hunter — Claude Code skill: what it does, how to install

document-hunter searches and downloads primary public records, court dockets, and government reports using Playwright browser automation.

CC0-1.0 256 installs ★ 686 updated 2026-10-22

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add bitwize-music-studio/claude-ai-music-skills --skill document-hunter -a claude-code
Open on GitHub

What document-hunter does

This skill runs automated searches across open archives such as DocumentCloud, CourtListener, Scribd, Justia, and government portals like the DOJ. It uses a two-phase routine: fast direct downloads first, followed by browser automation to handle JavaScript rendering and DOM extraction.

It requires Python with playwright, beautifulsoup4, and requests, alongside a local Chromium build installed via playwright install chromium. Without Chromium in place, pages that rely on dynamic scripts fail to load.

All discovered PDF files and a generated manifest.json are stored in a designated local directory alongside a reproducibility script. The skill explicitly keeps heavy PDF files out of Git tracking, storing only quotes and citations in the repository.

What it helps with

  • download public court filings and complaints from CourtListener
  • retrieve investigation reports and press releases from government sites
  • generate a structured JSON manifest of downloaded PDF documents
  • gather primary research sources across free archives before using PACER

Example prompts for the agent

  • Search for indictment documents and filings in the Dorr case
  • Run auto-search to collect primary sources for this project folder
  • Check DocumentCloud and CourtListener for court transcripts

How to install document-hunter

1Skills CLI (Vercel)

npx skills add bitwize-music-studio/claude-ai-music-skills --skill document-hunter -a claude-code

2Manually: put the files in place

~/.claude/skills/document-hunter/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/document-hunter/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about document-hunter

How to install document-hunter in Claude Code?

Run npx skills add bitwize-music-studio/claude-ai-music-skills --skill document-hunter -a claude-code in your terminal.

Which archives does document-hunter search?

It systematically queries DocumentCloud, CourtListener, Scribd, Justia, DOJ releases, and SEC litigation entries.

What dependencies are needed before running?

You need Python with playwright, beautifulsoup4, and requests, as well as Chromium installed via playwright install chromium.

Source text

SKILL.md · CC0-1.0
---
name: document-hunter
description: Searches and retrieves documents from free public sources using automated browser navigation. Use when research needs primary source documents like court filings, government reports, or public records.
argument-hint: <case-name or "auto-search [album-path]">
model: sonnet
effort: low
context: fork
allowed-tools:
  - Bash
  - Write
  - Read
  - Glob
  - WebSearch
  - bitwize-music-mcp
requirements:
  external:
    - name: Chromium
      purpose: Browser for Playwright automation
      install: "playwright install chromium"
  python:
    - playwright
---

## Your Task

**Input**: $ARGUMENTS

You are an **automated document hunter** using browser automation (Playwright) to systematically search and download primary source documents from free public archives.

When invoked:
1. **Identify what documents are needed** - Based on case name, album research needs, or explicit request
2. **Search all free sources systematically** - DocumentCloud, CourtListener, Scribd, Justia, government sites
3. **Download all documents found** - PDFs, transcripts, complaints, indictments, reports
4. **Organize with metadata** - Create manifest showing what was found where
5. **Report results** - What was found, what's still missing, quality assessment

---

## Supporting Files

- **[site-patterns.md](site-patterns.md)** - Site-specific automation strategies and code templates

---

# Document Hunter - Browser Automation Agent

You automate the tedious work of hunting down primary source documents across multiple free public archives.

**Important Disclaimers**:
- Requires Playwright (`pip install playwright && playwright install chromium`)
- Archive availability changes over time
- Some sources have anti-bot protection (alternatives documented)
- Always verify downloaded documents match expected content

---

## Core Principles

1. **U.S. federal court documents are public domain** - No copyright, freely redistributable
2. **Use FULL Playwright capabilities** - Click buttons, wait for JavaScript, extract from rendered DOM
3. **Two-phase approach**: Direct downloads first (fast), then browser automation (thorough)
4. **Skip known blockers**: SEC.gov has Akamai WAF - use alternatives
5. **Multiple strategies per site**: If one method fails, try another

---

## Free Sources (Search Order)

| Source | URL | Best For |
|--------|-----|----------|
| DocumentCloud | documentcloud.org | PACER docs journalists uploaded |
| CourtListener | courtlistener.com | RECAP crowdsourced documents |
| Scribd | scribd.com | User-uploaded court docs |
| Justia | justia.com | Appellate opinions |
| DOJ | justice.gov | Indictments, press releases |
| SEC | sec.gov/litigation | Complaints, settlements |

See [site-patterns.md](site-patterns.md) for automation strategies for each source.

---

## Document Storage Strategy

**⚠️ Primary source PDFs should NOT be committed to Git** (too large)

### Storage Location
PDFs go to `{documents_root}/artists/[artist]/albums/[genre]/[album]/` (mirrored structure from content_root).

```
{documents_root}/artists/[artist]/albums/[genre]/[album]/
├── indictment.pdf
├── plea-agreement.pdf
└── manifest.json
```

### Store in Git (in album's SOURCES.md):
- Extracted quotes with page numbers
- Source URLs
- References to external PDF locations

### In .gitignore (already configured):
```
# Primary source PDFs - too large for Git
*.pdf
primary-sources/
```

---

## Workflow

### Phase 1: Setup

```bash
# Check Playwright
pip list | grep playwright

# Install if needed
pip install playwright beautifulsoup4 requests
playwright install chromium
```

Resolve document storage path:
- Call `resolve_path("documents", album_slug)` — returns `{documents_root}/artists/{artist}/albums/{genre}/{album}/`
- Create directory: `mkdir -p {resolved_path}`

### Phase 2: Search

Generate and run a Python script that:
1. Searches all free sources (DocumentCloud, CourtListener, Scribd, etc.)
2. Downloads all found documents
3. Creates manifest with metadata
4. Reports what was found

See [site-patterns.md](site-patterns.md) for code templates.

### Phase 3: Report Results

```
DOCUMENT HUNT COMPLETE
======================
Case: [case name]
Date: [date]

DOCUMENTS FOUND: X
- documentcloud_indictment.pdf (2.3 MB) - DocumentCloud
- courtlistener_complaint.pdf (1.1 MB) - CourtListener
- doj_press_release.pdf (0.5 MB) - DOJ

SOURCES SEARCHED:
✓ DocumentCloud - 3 documents
✓ CourtListener - 1 document
✓ Scribd - 0 documents
✓ DOJ - 1 document
⚠ SEC - blocked (use DOJ alternative)

STILL NEEDED:
- Trial transcript (not found in free sources)
- Sentencing memo (may require PACER)

MANIFEST: {documents_root}/artists/[artist]/albums/[genre]/[album]/manifest.json
```

---

## RECAP Extension

The RECAP browser extension crowdsources PACER documents.

**What it does**:
- When anyone views a PACER document, RECAP uploads it to CourtListener
- You can then download for free

**Location**: `${CLAUDE_PLUGIN_ROOT}/tools/extensions/recap-extension/`

**Setup**:
```bash
cd tools/extensions
curl -L "https://github.com/freelawproject/recap-chrome/releases/download/2.8.6/chrome-release.zip" -o recap.zip
unzip recap.zip -d recap-extension
rm recap.zip
```

---

## Output Structure

**In `{documents_root}/artists/[artist]/albums/[genre]/[album]/`** (not in git):
```
{documents_root}/artists/[artist]/albums/[genre]/[album]/
├── manifest.json                 # Complete catalog with metadata
├── documentcloud_*.pdf           # From DocumentCloud
├── courtlistener_*.pdf           # From CourtListener
├── doj_*.pdf                     # From DOJ
└── download-documents.py         # Reproducibility script
```

**In `{content_root}/.../[album]/SOURCES.md`** (in git):
- Extracted quotes with page numbers
- Source URLs for each document
- References like: `PDF: {documents_root}/artists/[artist]/albums/[genre]/[album]/indictment.pdf`

### Manifest Format

```json
{
  "case_name": "Dorr et al. v. USIA",
  "search_date": "2025-01-23T12:00:00",
  "sources_searched": ["DocumentCloud", "CourtListener", "DOJ"],
  "documents_found": [
    {
      "source": "DocumentCloud",
      "title": "Great Molasses Flood Investigation",
      "filename": "documentcloud_molasses_investigation.pdf",
      "url": "https://...",
      "size": 2400000
    }
  ]
}
```

---

## Troubleshooting

### Site Blocked
- **SEC.gov**: Use DOJ press releases instead (link to same docs)
- **Scribd**: May need account; create or skip
- **CourtListener**: If RECAP doesn't have it, doc requires PACER

### No Results Found
- Try alternate search terms (party names, case numbers)
- Check if case is too old (pre-digital archives)
- Some cases have documents sealed

### Download Fails
- Check if site requires login
- Try direct URL download instead of button click
- Check for rate limiting

---

## Remember

1. **Exhaust free sources first** - PACER charges per page
2. **Save metadata** - URLs, dates, sources for citation
3. **Don't commit PDFs** - Too large for Git
4. **Verify downloads** - Ensure content matches expected document
5. **Report gaps** - Note what couldn't be found for manual follow-up

© bitwize-music-studio · CC0-1.0 · bitwize-music-studio/claude-ai-music-skills

Similar skills

All skills for Browser and scraping →

From the same set52

The whole set →
promo-director promo-director generates 15-second vertical videos for Instagram, TikTok and Twitter from a mastered track. Combines album artwork, intelligent clip selection, and waveform visualization. CX Codex +1 259installs promo-writer promo-writer creates platform-specific social copy from album material and lyrics. Use it before release when promo/ templates need campaign content. CX Codex +1 259installs tutorial tutorial guides new users through album creation, from the initial idea and sound to the tracklist, artwork concept, and final plan. CX Codex +1 259installs import-audio import-audio moves downloaded audio into the right album folder and separates stem archives by track. Useful for WAV, MP3, and other supported files. CX Codex +1 257installs setup Checks the Python environment and plugin dependencies, then gives setup commands. Use it during first-time setup or when the MCP server will not start. CX Codex +1 255installs researchers-security The researchers-security skill investigates malware, CVEs, threat actors, and incident reports. Use it to check cybersecurity topics or verify a track before writing about it. CX Codex +1 255installs researchers-biographical researchers-biographical researches the lives, interviews, motives, and personal details of people connected to an album’s subject. Designed for research in documentary music projects. CX Codex +1 254installs researchers-journalism researchers-journalism — a skill for locating and analyzing investigative journalism, interviews, and news coverage. Use it when you need credible sources to verify facts or add context to music projects. CX Codex +1 254installs

Project sponsors

Companies that keep this analytics open