sejm — Claude Code skill for Polish parliament data
This Claude Code skill queries the Polish Sejm’s official API. The agent uses it to look up MPs, voting records, bills and parliamentary interpellations.
MIT ★ 60 updated 2026-11-15
/plugin marketplace add b44x/ai-polish-skills
/plugin install sejm@polskie-skilleWhat sejm does
The skill runs scripts/sejm.py to retrieve JSON from the Polish Sejm’s open API. It can find MPs by name, electoral district or club, return their committee memberships and contact details, and show voting results or an individual MP’s vote. It also searches Sejm documents, tracks bill stages, and retrieves interpellations and ministry replies.
Python 3.8 or later and network access to api.sejm.gov.pl are required. The script uses Python’s standard library, so it needs no external packages or API key. Run it from the skill directory or repository root: use python3 scripts/sejm.py <command> on Linux or macOS, and py scripts/sejm.py <command> on Windows. Responses should identify the data source, term, and relevant sitting or document.
What it helps with
- find an MP by surname, district or parliamentary club
- check an MP’s vote on a specific motion
- track the stages of a bill
- search Sejm documents and interpellations
Example prompts for the agent
- Find Kowalski and list the committees he belongs to.
- Show the results for voting 1 2 and Hołownia’s vote.
- Search Sejm prints for podatku and show the stages for bill 1.
How to install sejm
1Plugin marketplace
/plugin marketplace add b44x/ai-polish-skills/plugin install sejm@polskie-skilleThis installs the whole sejm plugin with all its skills
2Skills CLI (Vercel)
npx skills add b44x/ai-polish-skills --skill sejm -a claude-code3Manually: put the files in place
~/.claude/skills/sejm/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sejm/
1Skills CLI (Vercel)
npx skills add b44x/ai-polish-skills --skill sejm -a codex2Manually: put the files in place
.agents/skills/sejm/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add b44x/ai-polish-skills --skill sejm -a cursor2Manually: put the files in place
.cursor/skills/sejm/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install b44x/ai-polish-skills skills/sejm2Manually: put the files in place
.github/skills/sejm/SKILL.md1Skills CLI (Vercel)
npx skills add b44x/ai-polish-skills --skill sejm -a gemini-cli2Platform CLI
gemini skills install https://github.com/b44x/ai-polish-skills --path skills/sejmManually: put the files in place
.devin/skills/sejm/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about sejm
How do I install sejm in Claude Code?
Add the marketplace with /plugin marketplace add b44x/ai-polish-skills, then install the skill using /plugin install sejm@polskie-skille.
What does sejm do?
It retrieves official Polish Sejm data about MPs, committees, votes, parliamentary documents, bill progress, interpellations and ministry replies.
What does sejm need to run?
It requires Python 3.8 or later and network access to api.sejm.gov.pl. No API key or external libraries are needed.
Source text
SKILL.md · MIT
---
name: sejm
display_name: Sejm Rzeczypospolitej Polskiej
version: 1.0.0
description: >-
Official parliamentary data of the Sejm RP (Polish lower house) from the open API
(api.sejm.gov.pl). Database of MPs of the 10th term (X kadencja) (electoral districts,
parliamentary clubs, Sejm committees, contact details), detailed voting results (roll-call
votes, breakdown of votes by club: for/against/abstained/absent, checking how a given MP
voted), the database of druki sejmowe (Sejm prints) and the course of the legislative process
(stages of work on bills and resolutions), as well as interpelacje poselskie (MPs'
interpellations) and ministries' replies. No API keys, 100% official public data. Use
whenever the user asks about: "posłowie na Sejm", "kto jest posłem z okręgu X", "jak
głosowano w Sejmie nad ustawą Y", "jak głosował poseł Kowalski", "na jakim etapie jest
projekt ustawy", "druki sejmowe", "interpelacje poselskie".
category: legal
language: pl
country: PL
license: MIT
author: Michell Hoduń (https://github.com/b44x)
repository: https://github.com/b44x/ai-polish-skills
network: true
authentication: none
source: Kancelaria Sejmu Rzeczypospolitej Polskiej
source_type: official_api
official: true
homepage: https://sejm.gov.pl
documentation: https://api.sejm.gov.pl/
rate_limit: fair use
last_verified: 2026-09-28
tags:
- sejm
- poslowie
- glosowania
- druki
- proces-legislacyjny
- ustawy
- interpelacje
- prawo
- parlament
compatibility: Python 3.8+ (standard library only); network access to api.sejm.gov.pl.
---
# Sejm Rzeczypospolitej Polskiej
Official skill integrating the open Sejm RP API via `scripts/sejm.py`.
Gives AI agents neutral access to official data on MPs, votings,
druki sejmowe (Sejm prints), the legislative process and interpelacje (interpellations). Returns clean JSON on `stdout`.
## Running the script
Run from the skill directory (or from the repository root path):
| Operating system | Command |
|---|---|
| Linux / macOS | `python3 scripts/sejm.py <command> …` |
| Windows | `py scripts/sejm.py <command> …` (or `python`) |
Zero external libraries (Python 3.8+ standard library).
## Workflow
1. **MPs and committees database:**
- Searching for MPs from a given electoral district or by surname:
`python3 scripts/sejm.py mps --district "Gdańsk"`
`python3 scripts/sejm.py mps --search "Kowalski"`
`python3 scripts/sejm.py mps --club "PiS"`
- Checking an MP's details and the committees they sit on:
`python3 scripts/sejm.py mps --id 133`
2. **Votings and checking a specific MP's vote:**
- Checking voting results and the breakdown of votes by club (for, against, abstained):
`python3 scripts/sejm.py voting 1 2`
- Checking how a specific MP voted in a given voting:
`python3 scripts/sejm.py voting 1 2 --mp "Hołownia"`
- Overview of voting topics at the latest posiedzenie (sitting):
`python3 scripts/sejm.py votings`
`python3 scripts/sejm.py votings --sitting 1 --search "Wicemarszałków"`
3. **Druki sejmowe and the legislative process:**
- Looking up a druk sejmowy (Sejm print) by number:
`python3 scripts/sejm.py prints --number 1`
- Searching prints by topic:
`python3 scripts/sejm.py prints --search "podatku"`
- Checking the stages of work on a bill (whether it was submitted, 1st/2nd/3rd reading, whether it was passed):
`python3 scripts/sejm.py process 1`
4. **Interpelacje poselskie (MPs' interpellations):**
- Searching interpellations by topic or by number:
`python3 scripts/sejm.py interpellations --search "CPK"`
`python3 scripts/sejm.py interpellations --number 1`
## Commands
| Command | Description | Returned data |
|---|---|---|
| `mps [--search S] [--club C] [--district D]` | List and search MPs | `id`, `firstLastName`, `club`, `districtName`, `email`, `profession` |
| `mps --id <id>` | Full MP details and Sejm committees | `birthDate`, `profession`, `committees` (with the role held) |
| `voting <sitting> <number> [--mp MP]` | Voting details and an MP's vote | `results`, `clubSummary` (votes by club), `mpVote` |
| `votings [--sitting S] [--search Q]` | List of votings at a sitting | `votingNumber`, `date`, `title`, `topic`, `yes`, `no`, `abstain` |
| `prints [--number N] [--search Q]` | Search druki sejmowe | `number`, `title`, `documentDate`, `attachments` |
| `process <print_number>` | Stages of a bill's legislative process | `documentType`, `passed`, `closureDate`, chronological `stages` |
| `interpellations [--number N] [--search Q]` | Interpellations and replies | `number`, `title`, `sentDate`, `fromMpIds`, `replies` |
| `terms` | List of Sejm terms (kadencje I–X) | `terms` (dates, number, `current` flag) |
Detailed description of JSON schemas: [references/output.md](references/output.md).
## Neutrality rules
- This tool provides objective parliamentary data, not political opinions.
- Do not make evaluations, moral rankings or political interpretations of MPs' behavior.
- Every response should clearly state:
* Source: **Sejm Rzeczypospolitej Polskiej** (`api.sejm.gov.pl`),
* Term number (kadencja; default **X kadencja**),
* Sitting (posiedzenie) number and voting or print number,
* Date of the event.
## Exit codes
Clean JSON goes to `stdout`; errors go to `stderr` as `{"error": "...", "type": "..."}`.
| Code | Meaning | Action |
|---|---|---|
| `0` | Success | Process the JSON data |
| `2` | Not found | MP, voting, print or process does not exist |
| `64` | Invalid invocation / validation | Check the command parameters |
| `69` | Sejm RP server / network error | Temporary API problem; try again |
© Michell Hoduń (https://github.com/b44x) · MIT · b44x/ai-polish-skills