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.

소스 정보

저장소
unixfox/12trains-skill-moltis
최근 소스 활동
2026년 4월 5일 21:16
감지된 SKILL.md 언어
영어
스타
1
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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.
GitHub에서 보기