tzangms avatar

taipei-parking-query

Query real-time parking availability in Taipei City. Shows available parking spaces, capacity, statu

提供方 tzangms|开源

Taipei Parking Availability Skill

Real-time parking availability查詢 skill for Claude Code. Powered by Taipei City official parking API.

Features

  • 🚗 Real-time parking availability data
  • 📍 Support coordinates and landmark names
  • 🅿️ Both underground garages and street parking
  • 🔄 Auto-managed CSRF token handling
  • 🇹🇼 Covers all Taipei City public parking facilities

Installation

Method 1: Clone with Project (Recommended)

If you're already using this project:

git clone https://github.com/yourusername/parkinlots.git
cd parkinlots
claude

The skill is automatically available at .claude/skills/taipei-parking/

Method 2: Install as Standalone Skill

Copy the skill directory to your local Claude skills folder:

# Clone this repository
git clone https://github.com/yourusername/parkinlots.git

# Copy skill to your global Claude skills directory
cp -r parkinlots/.claude/skills/taipei-parking ~/.claude/skills/

# Or copy to a specific project
cp -r parkinlots/.claude/skills/taipei-parking /path/to/your/project/.claude/skills/

Method 3: Symbolic Link (For Development)

ln -s /Users/tzangms/projects/parkinlots/.claude/skills/taipei-parking \
      ~/.claude/skills/taipei-parking

Prerequisites

Python Dependencies

pip install requests beautifulsoup4 playwright

Required Files

The skill requires taipei_parking_api.py from the parent project. Ensure the path in scripts/find_parking.py points to your installation.

Usage

Once installed, Claude Code will automatically use this skill when you ask parking-related questions:

Example Queries

"台北市政府附近有停車位嗎?"
"Show me parking near Taipei 101"
"Find underground parking with 20+ spaces near coordinates 121.56, 25.04"
"西門町哪裡可以停車?"

Direct Script Usage

You can also run the helper script directly:

# Basic query
python3 .claude/skills/taipei-parking/scripts/find_parking.py \
  --lon 121.56375 \
  --lat 25.03754

# With options
python3 .claude/skills/taipei-parking/scripts/find_parking.py \
  --lon 121.5645 \
  --lat 25.0340 \
  --distance 1000 \
  --type underground \
  --vehicle car \
  --limit 10

Available Locations

See reference.md for 50+ pre-mapped landmarks including:

  • Transportation: Taipei Main Station, Taipei 101, Songshan Airport
  • Shopping: Ximending, Shilin Night Market, Breeze Center
  • Government: City Hall, Presidential Office
  • Universities: NTU, NTNU, NCCU
  • Hospitals: NTU Hospital, Taipei Veterans General Hospital

File Structure

.claude/skills/taipei-parking/
├── SKILL.md              # Skill definition
├── README.md             # This file
├── reference.md          # Landmark coordinates & API docs
└── scripts/
    └── find_parking.py   # Helper script

Configuration

Custom Locations

Add your frequently visited locations to reference.md:

| Your Office | 我的公司 | 121.5xxx | 25.0xxx |

Adjust Default Search Radius

Edit scripts/find_parking.py:

parser.add_argument('--distance', type=int, default=1000,  # Change to 500 or 2000

Troubleshooting

Import Error: "Could not import TaipeiParkingAPI"

The skill requires taipei_parking_api.py from the parent project. Either:

  1. Use within the original project (recommended)
  2. Copy taipei_parking_api.py to the same directory
  3. Adjust PROJECT_ROOT in scripts/find_parking.py:
PROJECT_ROOT = Path('/absolute/path/to/project')

No Results Returned

  • Increase search distance: --distance 2000
  • Verify coordinates are within Taipei City (lon: 121.4-121.7, lat: 24.9-25.2)
  • Try different parking type: --type both

CSRF Token Errors

The API client auto-handles CSRF tokens. If errors persist:

  • Check network connection to itaipeiparking.pma.gov.taipei
  • The API might be temporarily down (rare)

API Coverage

  • ✅ Taipei City (台北市)
  • ❌ New Taipei City (新北市) - not covered
  • ❌ Other Taiwan cities - not covered

License

MIT License

Credits

Contributing

Contributions welcome! Please:

  1. Add new landmarks to reference.md
  2. Improve error handling in find_parking.py
  3. Enhance output formatting
  4. Add support for additional vehicle types

Changelog

v1.0.0 (2025-12-11)

  • Initial release
  • Support for 50+ Taipei landmarks
  • Real-time parking availability
  • Underground and street parking support
  • Multi-language support (English/Chinese)