An AI-powered immigration case wiki. Drop your documents, get a structured case analysis, and draft petitions — every claim backed by evidence.
Built with Claude Code skills. Covers O-1A, EB-1A, and EB-2 NIW.
Instead of re-analyzing your documents from scratch every session, Claude builds and maintains a persistent wiki for your case — interlinked pages for every document, entity, evidence criterion, and case analysis. The wiki compounds over time. Every document you add and every question you ask makes it richer.
You drop documents → Claude builds a wiki → You ask questions, draft petitions → Wiki keeps getting smarter
The wiki is the key difference. Traditional AI document tools retrieve chunks and forget. This system synthesizes, cross-references, and remembers. By the time you draft a petition, Claude has already identified your strongest evidence, flagged contradictions between documents, and mapped every achievement to the legal criteria.
Browse the wiki in Obsidian to see your case structure at a glance — the graph view shows how your evidence connects.
- Claude Code (CLI or desktop app)
- Obsidian (optional but recommended — for browsing the wiki)
- macOS or Linux
# Clone the repo
git clone https://github.com/shivchander/green-clawed.git
cd green-clawed
# Install document processing dependencies (poppler for PDFs)
./scripts/setup.sh
# Open in Claude Code
claude/init-matter
Follow the prompts — pick your petition type (NIW, EB-1A, or O-1A), enter your name, and describe your field. Claude creates your case directory with a wiki scaffold.
Drop your source documents into workspace/<your-matter>/raw/:
- PDFs (recommendation letters, award certificates, publications)
- Word documents (offer letters, contracts)
- Images/screenshots (email confirmations, profile pages, media coverage)
Then tell Claude to process them:
/wiki-ingest
Claude reads each document, creates wiki pages, maps evidence to legal criteria, and flags any contradictions.
/case-status
Get an honest, plain-English summary: what's strong, what's weak, what evidence you still need.
/niw-petition-narrative # EB-2 NIW (National Interest Waiver)
/eb1a-petition-narrative # EB-1A (Extraordinary Ability green card)
/o1-petition-narrative # O-1A (Extraordinary Ability visa)
/petition-audit
Verifies every factual claim against your source documents. Flags unsupported claims, legal errors, and inconsistencies.
Obsidian is optional but recommended — it's the best way to browse your case wiki, see how evidence connects in graph view, and review what Claude produced.
Open Obsidian → "Open folder as vault" → select the green-claude directory. That's it — Obsidian will index all the markdown files.
Go to Settings → Community plugins → Browse, and install:
| Plugin | Why |
|---|---|
| Terminal | Run Claude Code directly inside Obsidian — one window for everything |
| Dataview | Query your wiki pages by frontmatter (e.g., "show all sources with importance: key") |
| Obsidian Git | Auto-commit your wiki changes for version history |
- Settings → Files and links → Default location for new attachments → set to
workspace/<your-matter>/raw/assets/so clipped images go to the right place - Settings → Files and links → New link format → "Shortest path when possible" (for clean wikilinks)
- Settings → Core plugins → Graph view → enable (already on by default)
- Settings → Core plugins → Backlinks → enable (already on by default)
- Graph view — open it to see your case structure. The petitioner entity is at the center, evidence pages radiate out, sources at the edges. Clusters show which evidence is well-supported.
- Backlinks — open any page and check the backlinks panel to see what links to it. Useful for finding which sources support a criterion.
- Search — use Obsidian's search to find anything across the wiki. Search for entity names, dates, or keywords.
- Obsidian Web Clipper (browser extension) — clip articles about your work, awards, or publications directly into
raw/. Then run/wiki-ingestto process them.
If you install Dataview, you can add dynamic tables to any wiki page. Examples:
TABLE doc_type, importance, date
FROM "workspace/my-niw/wiki/sources"
WHERE importance = "key"
SORT date DESC
TABLE strength, source_count
FROM "workspace/my-niw/wiki/evidence"
SORT source_count DESC
| Skill | What It Does |
|---|---|
/init-matter |
Guided setup for a new case |
/wiki-ingest |
Process documents into wiki pages |
/wiki-query |
Ask questions about your case with citations |
/wiki-lint |
Health-check the wiki for issues |
/case-status |
Quick case summary |
/case-strength-assessor |
Detailed evidence strength assessment |
/o1-petition-narrative |
Draft O-1A petition |
/eb1a-petition-narrative |
Draft EB-1A petition |
/niw-national-importance-research |
Research government sources for NIW |
/niw-petition-narrative |
Draft EB-2 NIW petition |
/expert-letter-drafter |
Draft expert/recommendation letters |
/petition-audit |
Audit a petition draft |
/rfe-response-drafter |
Respond to a USCIS RFE |
| Type | What It Is | Key Framework |
|---|---|---|
| O-1A | Temporary visa for extraordinary ability | 8 criteria, meet 3+ (Kazarian two-step) |
| EB-1A | Green card for extraordinary ability | 10 criteria, meet 3+ (stricter than O-1A) |
| EB-2 NIW | Green card, National Interest Waiver | 3 Dhanasar prongs (forward-looking) |
Each case gets its own wiki under workspace/<matter>/wiki/:
workspace/<matter>/
├── schema.md # Case configuration (petition type, conventions)
├── raw/ # Your source documents (immutable)
└── wiki/
├── index.md # Master index of all pages
├── log.md # What happened and when
├── sources/ # One page per source document
├── entities/ # People, orgs, publications, awards
├── evidence/ # Grouped by criterion or prong
├── synthesis/ # Case strength, gaps, narrative threads
└── drafts/ # Generated petitions and letters
Sources get cross-linked to entities and evidence pages. Evidence pages track strength ratings that update as you add documents. Synthesis pages give you the big picture.
The knowledge/ directory contains best practices distilled from real cases and USCIS adjudication patterns. Skills read these before drafting.
- Criteria guides — what makes a strong argument for each O-1A/EB-1A criterion
- Prong guides — how to structure each NIW Dhanasar prong
- Evidence hierarchy — how USCIS weighs evidence (Tier 1 independent third-party > Tier 4 self-generated)
- Argument patterns — reusable structures like the layered evidence stack and cross-reference web
- Policy alerts — key citations (Kazarian, Dhanasar, PA-2022-03)
- Self-petitioning candidates (EB-1A, NIW) who want to understand their case, organize evidence, and prepare a draft before engaging an attorney
- Immigration attorneys who want structured, evidence-backed first drafts
- Legal teams looking to reduce time on document organization and initial drafting
- Not legal advice. Every output is a draft for attorney review.
- Not a replacement for an attorney. Use this to prepare, then take the output to a licensed immigration attorney.
- Not guaranteed to result in approval. Outcomes depend on facts, evidence, and USCIS adjudication.
The knowledge base improves with every case. After a case outcome:
- Add anonymized best practices to the relevant
criteria/orprongs/file - Never commit client names, company names, or identifying details
- Keep entries concise and actionable
This project was inspired by claude_immigration_attorney by juntoku9. The original project provided the foundation of immigration-specific Claude Code skills and the knowledge base. This project extends it with the LLM Wiki architecture — persistent per-case wikis, incremental document ingestion, cross-referenced evidence tracking, and Obsidian integration.
MIT