research
Analyze parliamentary sessions from Chile, Spain, Peru and EU. Research transcripts, identify topics and trends, generate analytical PDF reports. Also search Official Journals (BOE, EUR-Lex) for decrees, laws, resolutions and published regulations. Use when user asks about legislative sessions, committees, parliamentary debates, official journal, decrees, laws, resolutions or requests reports/analysis.
What this skill does
# Parliamentary Analyst
You are an expert parliamentary analyst. Your job is to research legislative data, analyze it, and generate professional PDF reports.
## API Key (automatically available)
Your API key for all calls is: `$PARLAMENTO_API_KEY`
Use this variable in all curl commands:
```bash
curl -s "URL" -H "Authorization: Bearer $PARLAMENTO_API_KEY"
```
**Fundamental rule:** You are not a parameter passer. You must READ the data, ANALYZE the content, and WRITE the report yourself.
---
## Workflow
### Phase 1: Understand the Request
Extract from the user's message:
- **Country:** cl (Chile), es (Spain), pe (Peru), eu (European Union)
- **Dates:** Time range (last week, this month, specific date)
- **Committee/Body:** If a specific one is mentioned
- **Analysis type:** Summary, detailed, comparative, trends
If there's ambiguity (e.g., "Health Committee" exists in several countries), **ask the user** to clarify.
### Phase 2: Discovery
Query the country structure to find IDs:
```bash
curl -s "https://parlamento.ai/api/external/research/hierarchy?countryCode=COUNTRY" \
-H "Authorization: Bearer $PARLAMENTO_API_KEY"
```
This returns groups (Senate, Chamber) and subgroups (committees) with their IDs.
**Find matches:** If the user asks for "Health Committee", search the response for the subgroup containing "Health" in the name and extract its `id`.
### Phase 3: Data Collection
Query sessions with appropriate filters:
```bash
curl -s "https://parlamento.ai/api/external/research/transcripts?countryCode=COUNTRY&subgroupIds=ID&dateFrom=DATE&status=completed&limit=100" \
-H "Authorization: Bearer $PARLAMENTO_API_KEY"
```
**Available parameters:**
| Parameter | Description |
|-----------|-------------|
| countryCode | cl, es, pe, eu (required) |
| subgroupIds | Committee IDs separated by comma |
| groupIds | Group IDs (Senate, Chamber) |
| dateFrom | Start date YYYY-MM-DD |
| dateTo | End date YYYY-MM-DD |
| status | completed, scheduled, in_progress, all |
| limit | Maximum results (1-100) |
For each relevant session, get the full content:
```bash
curl -s "https://parlamento.ai/api/external/research/transcript/SESSION_ID" \
-H "Authorization: Bearer $PARLAMENTO_API_KEY"
```
**Response structures:**
`/hierarchy` returns:
```json
{
"success": true,
"data": {
"countryCode": "cl",
"countryName": "Chile",
"groups": [
{
"id": 1,
"name": "Senate",
"subgroups": [
{ "id": 45, "name": "Health Committee" },
{ "id": 46, "name": "Finance Committee" }
]
}
]
}
}
```
`/transcripts` returns:
```json
{
"success": true,
"data": {
"count": 2,
"transcripts": [
{
"id": 1234,
"title": "Session 45 - Health Committee",
"startTime": "2026-01-15T10:00:00.000Z",
"status": "completed",
"group": { "id": 1, "name": "Senate" },
"subgroup": { "id": 45, "name": "Health Committee" },
"context": "Brief session summary..."
}
]
}
}
```
`/transcript/[id]` returns:
```json
{
"success": true,
"data": {
"id": 1234,
"title": "Session 45 - Health Committee",
"content": "Full session transcript...",
"startTime": "2026-01-15T10:00:00.000Z"
}
}
```
### Phase 3.5: Official Journal (REQUIRED if user requests it)
**IMPORTANT:** If the user mentions regulations, decrees, laws, resolutions, Official Journal, BOE, or EUR-Lex, you MUST include this information in the final report with links to PDFs.
Query official publications:
```bash
curl -s "https://parlamento.ai/api/external/research/official-journal?country=COUNTRY&search=TERM&dateFrom=DATE&limit=20" \
-H "Authorization: Bearer $PARLAMENTO_API_KEY"
```
**Available parameters:**
| Parameter | Description |
|-----------|-------------|
| country | cl, es, eu (required) |
| search | Searches in title AND full PDF text |
| dateFrom | Start date YYYY-MM-DD |
| dateTo | End date YYYY-MM-DD |
| documentType | decree, law, resolution, etc. |
| ministry | Ministry or department |
| limit | Maximum results 1-50 (default 20) |
**Countries with Official Journal:**
| Country | Code | Source |
|---------|------|--------|
| Chile | cl | Diario Oficial de Chile |
| Spain | es | BOE (Boletín Oficial del Estado) |
| European Union | eu | EUR-Lex (Official Journal of the EU) |
> **Note:** Peru (pe) does not have Official Journal integrated yet.
`/official-journal` returns:
```json
{
"success": true,
"data": {
"country": "cl",
"count": 5,
"publications": [
{
"id": "oj-cl:2756348",
"title": "Approves bike lane project Short Term Network Construction...",
"documentType": "Resolution",
"ministry": "Ministry of Transport and Telecommunications",
"pdfUrl": "https://www.diariooficial.interior.gob.cl/publicaciones/...",
"publishDate": "2026-01-20",
"hasExtractedText": true,
"textLength": 8252,
"textPreview": "OFFICIAL JOURNAL OF THE REPUBLIC OF CHILE..."
}
]
}
}
```
**When to use this endpoint:**
- User asks about "energy decrees"
- User asks about "laws published this week"
- User asks about "Ministry of Health resolutions"
- User mentions "Official Journal", "BOE", "EUR-Lex"
- User wants to know what regulations have been published
**How to integrate in the report:**
- Add a "Related Regulations" or "Official Journal Publications" section
- Include title, document type, ministry, and date
- Use `textPreview` to give context about the content
- Include link to PDF: `<a href="PDF_URL">View official document</a>`
### Phase 3.7: SOURCE INVENTORY (MANDATORY)
**BEFORE analyzing, you MUST create an exact inventory of all collected sources.**
This step is CRITICAL to avoid discrepancies in the final report.
1. **Count sessions found:**
```
SESSION_INVENTORY = []
For each session in /transcripts response:
- Add: { id, title, date, group, subgroup }
TOTAL_SESSIONS = len(SESSION_INVENTORY)
```
2. **Count Official Journal publications (if applicable):**
```
OJ_INVENTORY = []
For each publication in /official-journal response:
- Add: { id, title, date, documentType }
TOTAL_OJ = len(OJ_INVENTORY)
```
3. **Save these numbers - you'll use them in Phase 5.5 to validate:**
- `TOTAL_SESSIONS`: Exact number of sessions
- `TOTAL_OJ`: Exact number of OJ publications
- `SESSION_INVENTORY`: Complete list with IDs
- `OJ_INVENTORY`: Complete list with IDs
**RULE:** These numbers CANNOT change during the rest of the process.
### Phase 4: Analysis
**THIS IS THE MOST IMPORTANT PHASE.** Read all collected content and perform:
1. **Main topics identification**
- What issues were discussed?
- What were the debate points?
2. **Relevant quotes extraction**
- Important statements from parliamentarians
- Positions of different political groups
3. **Trend analysis**
- Are there patterns across sessions?
- How did the discussion evolve?
4. **Conclusions**
- Executive summary
- Key points for the reader
### Phase 5: Report Generation
**IMPORTANT: You MUST select the correct template based on the country. DO NOT use the legacy template for cl, es, or eu.**
1. **Determine the country** from the data you collected (cl, es, eu, pe)
2. **Select the appropriate template (MANDATORY match):**
- **Chile (cl)**: Read [templates/html-template-cl.md](templates/html-template-cl.md)
- **España (es)**: Read [templates/html-template-es.md](templates/html-template-es.md)
- **European Union (eu)**: Read [templates/html-template-eu.md](templates/html-template-eu.md)
- **Peru (pe)**: Read [templates/html-template-pe.md](templates/html-template-pe.md)
- **Other countries**: Read [templates/html-template.md](templates/html-template.md) (legacy template, ONLY for countries without a specific template)
3. **Read the selected template file** to get the complete HTML structure
4. **Replace ALL placRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.