Loading...
Loading...
ABC Medical Cloud API Document Query Tool. Reads and queries the OpenAPI specification documents of ABC API (4209 interfaces), supports searching by module, path, and method, and automatically resolves $ref references. Usage scenarios: (1) Query API interface definitions (2) Search for interfaces with specific functions (3) Export interface document summaries (4) View interface statistics
npx skill4agent add abcfed/claude-marketplace apifoxapifox.py# Set Apifox Access Token (required)
export APIFOX_ACCESS_TOKEN="Your Apifox Access Token"
# Set Project ID (optional, default is 4105462)
export APIFOX_PROJECT_ID="4105462"# Install Python dependencies
pip3 install requestscache/# Add to ~/.bashrc or ~/.zshrc
export APIFOX_ACCESS_TOKEN="apt_xxxxxxxxxxxxxxx"
export APIFOX_PROJECT_ID="4105462"
# Reload configuration
source ~/.bashrc # or source ~/.zshrc./scripts/apifox <command> [parameters]Note:is a shell wrapper that automatically detects and uses the available Python interpreter (python3 or python) in the system../scripts/apifox
| Module | Number of Interfaces | Description |
|---|---|---|
| api | 2506 | HTTP API interfaces |
| rpc | 1338 | RPC service interfaces |
| api-weapp | 294 | Mini Program API interfaces |
| api-device | 29 | Device interfaces |
| api-mp | 17 | Official Account interfaces |
| api-external | 14 | External interfaces |
| Command | Description |
|---|---|
| Read the complete OpenAPI specification (about 5MB JSON) |
| Refresh/update the latest documents (shows cache status) |
| View cache status and version |
| Clear local cache (requires |
| Command | Description |
|---|---|
| List interface paths (supports module and method filtering) |
| Search interfaces (keyword matching) |
| Get details of a single interface (automatically resolves $ref) |
| List all modules and interface statistics |
| Command | Description |
|---|---|
| Display statistical information (total interfaces, module distribution) |
| Export interface summaries (JSON/Markdown) |
# Get the complete definition of the specified interface
./scripts/apifox get_path \
--path "/api/global-auth/login/sms" \
--method POST
# Get the interface without resolving $ref (faster)
./scripts/apifox get_path \
--path "/api/global-auth/login/sms" \
--method POST \
--include_refs false# Search for login-related interfaces
./scripts/apifox search_paths --keyword "login"
# Search for user-related interfaces in the api module
./scripts/apifox search_paths --keyword "user" --module api
# List all POST interfaces
./scripts/apifox list_paths --method post --limit 20# List all modules and statistics
./scripts/apifox list_modules
# List Mini Program interfaces (first 20)
./scripts/apifox list_paths --module api-weapp --limit 20# View basic statistics
./scripts/apifox stats
# View detailed statistics (includes module details)
./scripts/apifox stats --detail# View cache status
./scripts/apifox cache_status
# Refresh documents (force re-fetch latest data from API)
./scripts/apifox refresh_oas
# Clear cache
./scripts/apifox clear_cache --force# Export interface summaries of all API modules to Markdown
./scripts/apifox export_summary --module api --output api_summary.md --format markdown
# Export as JSON
./scripts/apifox export_summary --output full_summary.json --format json{
"success": true,
"data": "Returned data"
}{
"success": false,
"error": "Error message"
}User: "View the definition of the SMS login interface"
Claude:
1. ./scripts/apifox search_paths --keyword "login sms"
2. Find the relevant interface path from the results
3. ./scripts/apifox get_path --path "/api/global-auth/login/sms" --method POST
4. Analyze the returned request/response structure# Run for the first time after configuring environment variables
./scripts/apifox stats
# Example output:
# Fetching OpenAPI documents for project 4105462 from Apifox...
# API endpoint: https://api.apifox.com/v1/projects/4105462/export/openapi
# ✓ Successfully obtained OpenAPI documents
# Number of interfaces: 4274# Load from local cache, with second-level response
./scripts/apifox stats
# Loading OpenAPI data from local cache...# Force re-fetch the latest documents from the API
./scripts/apifox refresh_oas
# Example output:
# Refreshing OpenAPI documents...
# Fetching OpenAPI documents for project 4105462 from Apifox...
# ✓ Successfully obtained OpenAPI documents
# Number of interfaces: 4274./scripts/apifox cache_statusscripts/
├── apifox.py # Unified entry script
├── apifox_client.py # API document client
├── cache_manager.py # Cache manager
└── requirements.txt # Python dependencies
references/
├── openapi-structure.md # OpenAPI structure description
├── common-queries.md # Common query examples
└── api-modules.md # API module classification