criar-pje-download

Derive tribunal-specific PJE download configuration from HAR captures.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the problem of creating a working PJE “download” workflow for a specific tribunal when the REST/JSF endpoints, headers, and session cookies differ subtly across deployments.

Core Features & Use Cases

  • Guides HAR capture for listing and downloading: instructs how to generate two HAR files (process listing and document download) using DevTools while logged in with a certificate.
  • Derives tribunal-specific configuration from HAR: identifies BASE_URL, essential cookies, and X-pje-* headers, then maps REST and JSF endpoints needed for the automation.
  • Produces parametrized scripts/config: consolidates findings into a config_tribunal.json and adapts templates into scripts that can list processes, obtain access keys, and download PDFs.

Use case example: You have a HAR from one tribunal and need to adapt the download automation to another tribunal (different domain/cookies/headers) so you can list pending cases and download digital records as PDFs.

Quick Start

Provide the HAR files captured while logged into your tribunal (listing and one download) and ask the assistant to generate a tribunal-specific config_tribunal.json plus the adapted listing and PDF download scripts.

Frequently Asked Questions about criar-pje-download

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

FAQPage Schema
How do I automate PJE document downloads for a tribunal with different REST and JSF endpoints?

Reverse-engineer HAR captures from your tribunal to extract the BASE_URL, session cookies, and headers into a config_tribunal.json, then adapt the listing and PDF download scripts to match those specific REST and JSF endpoints.

What is HAR analysis used for when building PJE automation workflows?

HAR analysis extracts base URLs, session cookies, and X-pje-* headers from browser traffic to map the REST and JSF endpoints needed for tribunal-specific PJE automation, bridging standard templates with varying deployment architectures.

How do I handle session-expired failures like 401 or 403 errors during a PJE download?

Handle session-expired failures by catching 401, 403, or redirect responses during JSF/PDF retrieval to detect invalid session cookies, triggering re-authentication with your certificate and capturing a fresh HAR to resume the download workflow.

Do I need an Authorization or Bearer token to download PDFs from PJE systems?

You do not need an Authorization or Bearer token to download PDFs from PJE systems; authentication relies on session cookies and X-pje-* headers extracted from HAR captures, and unauthorized Bearer usage on download endpoints is avoided.

Can I use a PJE download automation script built for TRF5 on other tribunals?

You cannot directly use a TRF5 script on other tribunals because REST endpoints, headers, and cookies differ across PJE 2.x deployments; you must capture new HAR files and generate a tribunal-specific config to adapt the automation scripts.

What's the best way to generate a tribunal-specific config for listing and downloading PJE autos digitais?

Generate a tribunal-specific config by capturing two HAR files while logged in with a certificate for process listing and document download, then consolidating the extracted BASE_URL, cookies, and headers into a config_tribunal.json to adapt the listing and retrieval scripts.