agentleFS
Eleven-MEleven-M/flowmind/skills/yapi-sync-interface/SKILL.md

yapi-sync-interface

Skill1 starsChanged 3 months agoMITView on GitHub

YApi interface sync skill for FlowMind. Sync Controller interfaces to YApi, import/export Swagger, manage API documentation lifecycle.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create new interface categories

    line 22
  2. Distinctive:

    Import Swagger to YApi

    line 26
  3. Distinctive:

    Search interfaces by keyword

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YApi Interface Sync Skill

Synchronize API interfaces between code and YApi platform for consistent API documentation management.

Features

Interface Sync

  • Extract Controller interfaces from code
  • Sync to YApi project
  • Update existing interfaces
  • Create new interface categories

Swagger Import/Export

  • Generate Swagger/OpenAPI from code
  • Import Swagger to YApi
  • Export YApi interfaces to Swagger

Interface Management

  • Search interfaces by keyword
  • Manage interface categories
  • Interface version tracking
  • Test collection management

Trigger Patterns

"同步接口", "sync interfaces"
"YApi同步", "yapi sync"
"接口文档", "API documentation"
"Swagger导入", "swagger import"
"接口管理", "interface management"
"更新YApi", "update yapi"

Output Format

┌─────────────────────────────────────────────────────┐
│ YApi Interface Sync Report                          │
├─────────────────────────────────────────────────────┤
│ Project: {project_name} (ID: {id})                  │
│ Category: {category}                                │
├─────────────────────────────────────────────────────┤
│ Interfaces Found: {count}                           │
│ • New: {new_count}                                  │
│ • Updated: {update_count}                           │
│ • Unchanged: {unchanged_count}                      │
├─────────────────────────────────────────────────────┤
│ Sync Status: ✅ Success / ❌ Failed                  │
│ YApi URL: {url}                                     │
└─────────────────────────────────────────────────────┘

Component Integration

This skill uses the apiDoc component. The actual API documentation provider is determined by configuration.

ProviderMCP ServerDescription
yapiyapi-mcpYApi API documentation platform

Configuration is managed in flowmind.config.json under components.apiDoc.

Available MCP tools (yapi provider):

ToolDescription
yapi_search_apisSearch interfaces by keyword
yapi_get_categoriesGet project categories
yapi_save_apiCreate/update interface
yapi_import_swaggerImport Swagger data
yapi_export_projectExport project data

Learning Integration

This skill supports FlowMind learning:

  • Project Mapping: Learns which code maps to which YApi project
  • Category Mapping: Learns package-to-category mappings
  • Sync Preferences: Learns sync preferences (overwrite, merge, etc.)

Examples

Example 1: Sync Controller to YApi

User: 同步 OrderController 的接口到 YApi

FlowMind:
┌─────────────────────────────────────────────────────┐
│ YApi Interface Sync Report                          │
├─────────────────────────────────────────────────────┤
│ Project: order-service (ID: 28)                     │
│ Category: 订单管理                                  │
├─────────────────────────────────────────────────────┤
│ Interfaces Found: 5                                 │
│ • New: 2 (createOrder, cancelOrder)                 │
│ • Updated: 3 (getOrder, listOrders, updateOrder)    │
├─────────────────────────────────────────────────────┤
│ Sync Status: ✅ Success                             │
│ YApi URL: https://yapi.example.com/project/28       │
└─────────────────────────────────────────────────────┘

Example 2: Search Interfaces

User: 搜索 YApi 上的订单相关接口

FlowMind:
┌─────────────────────────────────────────────────────┐
│ YApi Interface Search                               │
├─────────────────────────────────────────────────────┤
│ Keyword: 订单                                       │
│ Results: 8 interfaces                               │
├─────────────────────────────────────────────────────┤
│ 1. 创建订单 - POST /api/orders (project: order-svc) │
│ 2. 查询订单 - GET /api/orders/{id} (project: order) │
│ 3. 取消订单 - PUT /api/orders/{id}/cancel           │
└─────────────────────────────────────────────────────┘

Configuration

{
  "yapi-sync-interface": {
    "defaultProjectId": "28",
    "syncMode": "merge",
    "autoCreateCategory": true,
    "excludePatterns": ["**/internal/**"]
  }
}

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.