yapi

SKILL.md

YApi interface docs

URL Detection

When user provides a URL, check if it matches the configured YApi instance:

  1. Read config to get base_url:
cat ~/.yapi/config.toml | grep base_url
  1. If the URL's origin matches base_url, use yapi CLI to operate:

    • Extract project_id from URL path (e.g., /project/123/... → project_id=123)
    • Extract api_id from URL path (e.g., .../api/456 → api_id=456)
    • Use yapi --path /api/interface/get --query id=<api_id> to fetch details
  2. Example URL patterns:

    • https://yapi.example.com/project/123/interface/api/456 → project=123, api=456
    • https://yapi.example.com/project/123/interface/api/cat_789 → project=123, category=789
Installs
1
First Seen
6 days ago