pje-download

Download PJE TRF5 case documents as PDFs using authenticated cookie sessions.

12|7|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/georgemarmelstein/sistema-marmelstein --skill pje-download
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pje-download
Source: https://github.com/georgemarmelstein/sistema-marmelstein/tree/main/.claude/skills/pje-download
Command: npx skills add https://github.com/georgemarmelstein/sistema-marmelstein --skill pje-download

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, beautifulsoup4, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Automates downloading full court case documents (PDFs) from the PJE TRF5 by using an authenticated session captured as cookies, avoiding repetitive manual navigation and download steps.

Core Features & Use Cases

  • PJE session handling: Uses HAR-derived cookies/headers or a pre-captured session file to authenticate REST/JSF requests safely.
  • Process listing by queue: Retrieves case/process lists for either “sentença” or “decisão” queues.
  • Selective and bulk PDF download: Downloads complete PDFs for a batch of processes or performs targeted downloads by document type for large, document-heavy cases.
  • Process lookup by CNJ: Finds the internal process ID from the CNJ number to bootstrap the rest of the workflow.
  • Use Case: You need to download PDFs for multiple TRF5 PJE “sentença” items and, for oversized processes, you only want nuclear/important document types to reduce time and storage.

Quick Start

First extract or obtain a valid pje_session.json, then run the following single instruction: create a list of “sentenca” processes by executing the process listing script and saving the result to processos.json.

Frequently Asked Questions about pje-download

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate downloading PJE PDFs in bulk from TRF5?

You can automate PJE PDF downloads by using an authenticated cookie-based session and JSF form POST flows to retrieve complete documents in batch from the TRF5 platform.

How do I extract and use cookies to authenticate a PJE session for document retrieval?

To authenticate a PJE session, you must first extract or obtain a valid pje_session.json file containing HAR-derived cookies and headers to safely authenticate REST and JSF requests.

Can I download only specific document types from large PJE cases?

Yes, you can perform selective PDF downloads by filtering documents by PJE type, allowing you to retrieve only important document types for large, document-heavy cases to reduce time and storage.

How do I find an internal process ID using a CNJ number in PJE?

You can locate a process by its CNJ number to bootstrap the rest of the workflow, which retrieves the internal process ID required to execute listing and download scripts.

How do I list court cases from specific workflow queues like sentenca or decisao in PJE?

You can retrieve case lists for specific workflow queues by executing the process listing script, which filters processes by either the sentenca or decisao queues and saves the result to a JSON file.

Do I need to send a JWT Authorization header when downloading PJE documents?

No, you do not send a JWT Authorization header; the workflow relies strictly on executing scripts with the saved session JSON and produced intermediate JSON files for authentication via cookies.