Claude-skill-registry api-reference
PDF-RAG API reference. REQUIRED after any failed curl/jq to localhost:8000 (404, null, jq error). Also use when uncertain about endpoint path or response shape.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/api-reference" ~/.claude/skills/majiayu000-claude-skill-registry-api-reference && rm -rf "$T"
manifest:
skills/data/api-reference/SKILL.mdsafety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
- makes HTTP requests (curl)
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content
PDF-RAG API Skill
Use this skill when: curl/jq fails, response shape is wrong, or you're unsure of the endpoint.
Cheat Sheet
Response Paths
| Endpoint | jq path |
|---|---|
| parties | |
| dates | |
| land | |
| doc_type | |
| conveyance | |
| documents list | |
| packages list | |
| package docs | |
| chain edges | |
| estate graph nodes | |
| estate graph summary | |
| estate graph gaps | |
Stage Names
extract_parties, extract_dates, extract_land_description, extract_conveyance, extract_document_classification markdown, segmentation, assembly, runsheet, runtime_linking
Shell Command Pattern
IMPORTANT: Never use shell variable interpolation in curl commands. Always inline values directly:
# WRONG - variable interpolation can fail DOC_ID="abc123" && curl -s "http://localhost:8000/api/documents/$DOC_ID/parties" # RIGHT - inline the value directly curl -s "http://localhost:8000/api/documents/abc123/parties"
Gotchas & Common Mistakes
Estate Graph (L3)
- GET vs POST:
retrieves stored graph,GET
rebuilds from L0-L2 dataPOST - estate_type is lowercase:
,"fee"
,"mineral"
(not uppercase)"leasehold" - Chain = nodes grouped by tract: A "mineral chain" = all mineral nodes sharing same
tract_id - Quick summary:
gives count.summary.mineral_estates - List nodes by type:
.dag.nodes[] | select(.estate_type == "mineral") - Group into chains:
[.dag.nodes[] | select(.estate_type == "mineral")] | group_by(.tract_id) - Count chains: Above query
| length
Rebuild Estate Graph (Exploratory Mode 1.1)
Endpoint:
POST /api/packages/{package_id}/estate-graph
Request body (JSON):
{"version": "1.1"}
Full curl command:
curl -s -X POST "http://localhost:8000/api/packages/{package_id}/estate-graph" \ -H "Content-Type: application/json" \ -d '{"version": "1.1"}'
Version options:
: Exploratory Layers - POC 5-layer fuzzy matcher (L0-L4 gates)"1.0"
: Exploratory Signals - EdgeScore-based matcher (includes comparison field)"1.1"
: Operative deterministic matcher (exact matches only)"2.0"
Response paths:
- Nodes:
.dag.nodes[] - Edges:
.dag.edges[] - Gaps:
.dag.gaps[] - Summary:
.summary - Exploratory outcomes (v1.1):
.exploratory_outcomes - Winner/runner-up comparison (v1.1):
.exploratory_outcomes[estate_id].comparison
Comparison data (v1.1):
.exploratory_outcomes[estate_id].comparison: .winner_id: string .runner_up_id: string | null .rank_delta: number .top_winner_reasons[]: {signal, winner_state, runner_up_state, differentiation} .top_runner_up_losses[]: {signal, issue} .suppression_analysis: {eligible, blocking_contradictions[]}
Chain Analysis (deprecated - use Estate Graph)
- Use the endpoint, not Package.meta: Chain analysis results are in
, not buried inGET /packages/{id}/chain-analysisPackage.meta.chain_analysis - L2 before L3: Run L2 clustering (
) BEFORE chain analysis for proper cross-document party matchingPOST /packages/{id}/l2/parties - Chain types are dict keys: Access via
,.chains["fee"]
,.chains["mineral"].chains["leasehold"]
Extraction Endpoints
- Always use
: The clean data is in.resolved
, raw LLM output is in.resolved
(debug mode only).extraction - Debug mode: Add
to get raw extraction + normalized + extraction_context?debug=true - Party IDs are document-scoped:
is unique within a document, use L2 clusters for cross-doc identityparty_id
List Endpoints
- Documents list:
(paginated response).items[] - Packages list:
(NOT.packages[]
).[] - Package documents:
(nested in package detail).documents[] - Chain edges:
.chains["fee"].dag.edges[]
Processing
- Stages array: POST /api/process takes
stages: ["extract_parties", "extract_dates", ...] - Poll for completion: GET /api/jobs/{job_id} until status is "completed" or "failed"
- enrich_only=true: Re-run L1 enrichment without re-running L0 extraction (saves LLM cost)
Need full schema details? Read
.claude/skills/api-reference/API_REFERENCE.md