ArtificialGuyBR

Home / Blog / Fixing things

Portal da Transparência PR: a research skill for Paraná public data

A Python CLI skill for the Paraná transparency portal: it turns a question into area, object, period and metric, finds the public JSON web service, and recor…

2 sources cited Fixing things

Portal da Transparência PR: a research skill for Paraná public data

TL;DR

  • The skill guides reproducible queries across the ten macro-areas of the Paraná transparency portal, from planning and budget to works and general information.
  • It turns a question into area, object, period and metric, finds the matching menu topic by plain language, and calls the public web services in JSON — no API key on the tested services.
  • Where the portal is JSF/PrimeFaces, FlexPortal, SIAFIC or an external system, the skill navigates instead of pretending to query.
  • Every answer records source, URL, period, update date and system of origin, and keeps error responses and empty results rather than filling gaps with guesses.

What it is and who it is for

Portal da Transparência PR is a Portuguese-language skill for researching public data from the Paraná state transparency portal with Claude Code and compatible agents. This article describes it in English; the skill itself writes to a Brazilian reader.

It is for the person who asks a reasonable question — how much was paid to a supplier in a month, what a department spent on travel, what salary a role carries — and gets a page of menus. The README states what it is not: it does not replace the official portal, it organizes the path of the query, identifies the system of origin, and helps interpret what was published.

What it does

  • Turns a question into area, object, period and metric.
  • Finds the official menu topic by plain language, instead of making you guess the section.
  • Queries public JSON web services, with no API key on the tested services.
  • Guides navigation through JSF and PrimeFaces pages, FlexPortal, SIAFIC and external systems when there is no service.
  • Distinguishes forecast, commitment, settlement, payment, allocation and balance — which is the single most useful thing a transparency skill can do, because these are six different numbers people routinely confuse.
  • Records source, URL, period, update date and system of origin with the answer.
  • Converts the first JSON list into CSV for small analyses.
  • Keeps error responses and empty results as they are, without filling gaps with assumptions.

Install and quick usage

Copy or expose the directory as a skill for your agent: SKILL.md, references/catalogo.md, references/flexportal.md, references/webservices.md and scripts/pr.py. The script uses only the Python 3 standard library.

python3 scripts/pr.py self-check
python3 scripts/pr.py buscar salario --area pessoal
python3 scripts/pr.py buscar fornecedor --area despesas
python3 scripts/pr.py consultar receitas/listarorgao --param exercicio=2016
python3 scripts/pr.py consultar receitas/listarreceita \
  --param exercicio=2016 --param mes=1 --csv
python3 scripts/pr.py consultar despesas/listardespesa \
  --param exercicio=2016 --param mes=1 --param orgao=1 --csv
python3 scripts/pr.py menu

The README's guidance on parameters is specific: for particular queries, pass the year and the month when the service requires them, and for current totals, charts, hierarchies, documents and details that are not in the JSON, follow the portal flow in the browser.

Coverage

AreaExample topics
Planning and budgetmulti-year plan, budget guidelines, annual budget, budget changes, financial scheduling
Revenuecollected revenue, active debt, waivers and tax benefits
Expensesspending, payments, creditors, agreements, SIAFIC expenses
Personnelpayroll, public servants, hiring exams, travel
Purchasesbids, contracts, suppliers, registered prices

The README lists ten macro-areas in total, including fiscal responsibility, tax justice, thematic transparency, works and actions, and general information.

When to use it, when not to

Use it when a question about Paraná spending has to end in a reproducible query, when you need to know which system produced a figure, or when you want the same answer twice with the source recorded.

Do not use it as the official portal, and do not expect every page to be a JSON service: the README explicitly separates services from JSF, FlexPortal and SIAFIC navigation. And do not expect a filled gap — an empty result stays an empty result, by design.

Sources

  1. Portal da Transparência PR — repository — what it does, install, quick usage, the coverage table and the disclaimer quoted above.
  2. README.md — usage commands, coverage, references, license.

Project page: Portal da Transparência PR

For the São Paulo portal, see the Portal da Transparência SP skill, and for the federal portal, the Portal da Transparência skill.

FAQ

Does it need an API key? No on the tested services: the README states the public web services return JSON without an API key there.

Which areas does it cover? Ten macro-areas, from planning and budget to revenue, expenses, personnel, purchases, fiscal responsibility, tax justice, thematic transparency, works and actions, and general information.

What is the difference it insists on? Forecast, commitment, settlement, payment, allocation and balance — six distinct numbers that are routinely confused.

What if there is no web service? The skill guides the browser flow instead: JSF and PrimeFaces pages, FlexPortal, SIAFIC and external systems.