Skip to main content

12train

Query 12train.com for SNCF train tickets (TGV, TER, Intercités, Eurostar, Lyria). Resolve stations, find one-way and round-trip journeys, apply discount cards, and identify complex connection routings.

Informações da origem

Repositório
unixfox/12trains-skill-moltis
Última atividade na origem
5 de abril de 2026 às 21:16
Idioma detectado do SKILL.md
inglês
Estrelas
1
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
12train
description
Query 12train.com for SNCF train tickets (TGV, TER, Intercités, Eurostar, Lyria). Resolve stations, find one-way and round-trip journeys, apply discount cards, and identify complex connection routings.
allowed_tools
["exec"]
# 12train — SNCF Train Ticket Search Query [12train.com](https://www.12train.com/), an official SNCF ticket reseller. Find routes, schedules, check detailed pricing conditions (TGV, TER, Eurostar), handle multi-passenger groups with discount cards, and evaluate round-trip discounts. **Base command**: `uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py` ## Core Commands ### Autocomplete / Resolve Stations Always use this first to resolve city names into exact SNCF API accepted station names before running searches. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py stations "Paris" uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py stations "Lyon" ``` ### Search One-Way Trains Basic one-way lookup. Defaults to 1 Adult. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py search \ --origin "Paris (toutes gares)" \ --destination "Lyon (toutes gares)" \ --date "10/04/2026" \ --hour 8 ``` ## Advanced Search Features ### 1. Custom Passengers & Discount Cards Use repeating `--passenger` flags. Format as `AGE_GROUP` or `AGE_GROUP:DISCOUNT_CARD`. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py search \ --origin "Paris" --destination "Bordeaux" --date "12/04/2026" --hour 9 \ --passenger adult \ --passenger youth:avantage_jeune \ --passenger senior:avantage_senior ``` - **Age Groups**: `baby` (0-3), `child` (4-11), `youth` (12-25), `adult` (26-59), `senior` (60+) - **Discount Cards**: `avantage_jeune`, `avantage_adulte`, `avantage_senior`, `avantage_week_end`, `liberte`, `famille_30`, `famille_40`, `famille_50`, `famille_75`, `militaire_1`, `militaire_2` ### 2. Intermediate Waypoints (Via) Force the journey to make a connection at a specific station. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py search \ --origin "Paris" --destination "Nice" --date "10/04/2026" --hour 8 \ --via "Marseille Saint-Charles" ``` ## Round Trips & Contextual Bookings ### Basic Round-Trip Search Fetches both Outward and potential Return journeys contextually. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py search \ --origin "Paris" --destination "Lyon" \ --date "10/04/2026" --hour 8 \ --return-date "15/04/2026" --return-hour 18 ``` ### Optimize: Skip Return Fetch but keep Round-Trip Discounts Applying a return date can dynamically discount Outward tickets (e.g. "aller-retour" pricing). If you only want to retrieve Outward prices without burning time/bandwidth evaluating Return tickets yet, use `--skip-return`. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py search \ --origin "Paris" --destination "Lyon" \ --date "10/04/2026" --hour 8 \ --return-date "15/04/2026" --return-hour 18 \ --skip-return ``` ### Match Return Options to an Outward Choice If a user selects a specific Outward train (from the resulting JSON, find its `bo_key`), use `--outward-bo-key` to generate Inward Return options perfectly calibrated to that exact reservation leg without retrieving Outward options again. ```bash uv run /root/.moltis/skills/12trains-skill-moltis/scripts/12train.py search \ --origin "Paris" --destination "Lyon" \ --date "10/04/2026" --hour 8 \ --return-date "15/04/2026" --return-hour 18 \ --outward-bo-key "89a8d876-81c7-4793-c90f-c32d6f73d7c1" ``` ## How to Use This Skill When the user asks about train travel in France: 1. **Resolve Stations**: Always start with `stations` command. Example: User asks for "Chambéry", you run `stations "Chambery"` and receive `"Chambéry - Challes-les-Eaux"`. 2. **Setup Defaults**: Assume departure hour `6` (06:00) if not specified to show a full day's results. Default to 1 `adult` if no demographic is provided. 3. **Conversational Multi-Step Booking Flow**: - **A.** User says "I want a round-trip from Paris to Lyon." - **B.** Formulate outward context with `--skip-return` to show Outward choices with accurate round-trip discounts natively applied. - **C.** Determine User's choice and extract its `bo_key`. - **D.** Call the identical command appending `--outward-bo-key <bo_key>` to securely produce Return choices based on their previous selected path. 4. **Clarify Pricing**: Prices are delivered dynamically per-train. Present the specific `fare_name` and `fare_condition` (like "Standard Première - Echangeable sous conditions") so the user distinguishes between standard, refundable, or flex pricing variants in the same class. ## Output Format ```json { "outward": [ { "departure_time": "15/04/2026 21:04", "arrival_time": "15/04/2026 23:08", "origin": "Lyon Part Dieu", "destination": "Paris Gare De Lyon", "bo_key": "a398bedf-1e45-d68c-9c67-d67639d76ab8", "duration": "2h04", "trains": "TGV Inoui", "changes": 0, "prices": [ { "price": "39.00", "fare_name": "Tarif Standard Seconde", "fare_condition": "Billet échangeable et remboursable sans frais jusqu’à J-7..." } ] } ], "return": [] } ``` ## Security & Privacy - **Read-Only Capability**: This skill performs webform automation internally but **cannot execute final payments or bookings**. It is purely instructional to guide users over timetables and pricing. - Follows anti-bot simulation seamlessly mapping human browsing behavior utilizing the core `httpx[http2]` capabilities.
Ver no GitHub