yapi
SKILL.md
YApi interface docs
URL Detection
When user provides a URL, check if it matches the configured YApi instance:
- Read config to get base_url:
cat ~/.yapi/config.toml | grep base_url
-
If the URL's origin matches
base_url, use yapi CLI to operate:- Extract
project_idfrom URL path (e.g.,/project/123/...→ project_id=123) - Extract
api_idfrom URL path (e.g.,.../api/456→ api_id=456) - Use
yapi --path /api/interface/get --query id=<api_id>to fetch details
- Extract
-
Example URL patterns:
https://yapi.example.com/project/123/interface/api/456→ project=123, api=456https://yapi.example.com/project/123/interface/api/cat_789→ project=123, category=789