flowmind 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +855 -0
  3. package/README_CN.md +854 -0
  4. package/bin/flowmind.js +464 -0
  5. package/core/adapters/api-doc-adapter.js +71 -0
  6. package/core/adapters/base-adapter.js +80 -0
  7. package/core/adapters/database-manager-adapter.js +60 -0
  8. package/core/adapters/database-query-adapter.js +51 -0
  9. package/core/adapters/knowledge-base-adapter.js +75 -0
  10. package/core/adapters/log-service-adapter.js +41 -0
  11. package/core/adapters/mcp-adapter.js +65 -0
  12. package/core/adapters/report-adapter.js +60 -0
  13. package/core/adapters/workflow-adapter.js +62 -0
  14. package/core/component-registry.js +281 -0
  15. package/core/component-types.js +63 -0
  16. package/core/config-manager.js +360 -0
  17. package/core/index.js +223 -0
  18. package/core/learning-engine.js +588 -0
  19. package/core/mcp-compatibility.js +150 -0
  20. package/core/providers/aliyun/dms-adapter.js +98 -0
  21. package/core/providers/aliyun/redis-adapter.js +88 -0
  22. package/core/providers/aliyun/sls-adapter.js +86 -0
  23. package/core/providers/friday/flow-adapter.js +85 -0
  24. package/core/providers/friday/report-adapter.js +83 -0
  25. package/core/providers/yapi/yapi-adapter.js +79 -0
  26. package/core/providers/yuque/yuque-adapter.js +90 -0
  27. package/core/scene-matcher.js +326 -0
  28. package/core/skill-loader.js +291 -0
  29. package/package.json +67 -0
  30. package/scripts/migrate-config.js +153 -0
  31. package/skills/api-sync/SKILL.md +203 -0
  32. package/skills/archive-change/SKILL.md +172 -0
  33. package/skills/auto-flow/SKILL.md +277 -0
  34. package/skills/code-review/SKILL.md +206 -0
  35. package/skills/code-review-audit/SKILL.md +150 -0
  36. package/skills/data-logic-validation/SKILL.md +162 -0
  37. package/skills/data-validation/SKILL.md +210 -0
  38. package/skills/git-review/SKILL.md +190 -0
  39. package/skills/learning-engine/SKILL.md +352 -0
  40. package/skills/learning-feedback/SKILL.md +174 -0
  41. package/skills/log-audit/SKILL.md +226 -0
  42. package/skills/project-review/SKILL.md +196 -0
  43. package/skills/requirement-analyst/SKILL.md +275 -0
  44. package/skills/resource-bind/SKILL.md +222 -0
  45. package/skills/sls-log-audit/SKILL.md +223 -0
  46. package/skills/yapi-sync-interface/SKILL.md +145 -0
  47. package/skills/yuque-sync-design/SKILL.md +157 -0
@@ -0,0 +1,222 @@
1
+ ---
2
+ name: resource-bind
3
+ description: Resource binding and connection management skill for FlowMind. Manage database, Redis, API, and other external resource connections.
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: flowmind
7
+ category: infrastructure
8
+ ---
9
+
10
+ # Resource Bind Skill
11
+
12
+ Manage database, Redis, API, and other external resource connections.
13
+
14
+ ## Features
15
+
16
+ ### ๐Ÿ—„๏ธ Database Management
17
+ - MySQL/PostgreSQL connections
18
+ - Connection pooling
19
+ - Query execution
20
+ - Schema inspection
21
+
22
+ ### ๐Ÿ“ฆ Redis Management
23
+ - Redis connections
24
+ - Key operations
25
+ - Cache management
26
+
27
+ ### ๐Ÿ”Œ API Integration
28
+ - REST API connections
29
+ - Authentication management
30
+ - Request/response handling
31
+
32
+ ## Trigger Patterns
33
+
34
+ ```
35
+ "ๆ•ฐๆฎๅบ“", "database", "DB", "SQL"
36
+ "redis", "็ผ“ๅญ˜", "cache"
37
+ "API", "ๆŽฅๅฃ", "่ฟžๆŽฅ"
38
+ "่ต„ๆบ", "resource"
39
+ "่ฟžๆŽฅ้…็ฝฎ", "connection"
40
+ ```
41
+
42
+ ## Resource Types
43
+
44
+ ### Database
45
+
46
+ ```json
47
+ {
48
+ "type": "mysql",
49
+ "host": "localhost",
50
+ "port": 3306,
51
+ "database": "mydb",
52
+ "username": "user",
53
+ "password": "pass"
54
+ }
55
+ ```
56
+
57
+ ### Redis
58
+
59
+ ```json
60
+ {
61
+ "type": "redis",
62
+ "host": "localhost",
63
+ "port": 6379,
64
+ "password": "",
65
+ "db": 0
66
+ }
67
+ ```
68
+
69
+ ### API
70
+
71
+ ```json
72
+ {
73
+ "type": "rest",
74
+ "baseUrl": "https://api.example.com",
75
+ "auth": {
76
+ "type": "bearer",
77
+ "token": "xxx"
78
+ }
79
+ }
80
+ ```
81
+
82
+ ## Output Format
83
+
84
+ ```
85
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
86
+ โ”‚ Resource Connection โ”‚
87
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
88
+ โ”‚ Type: {resource_type} โ”‚
89
+ โ”‚ Status: Connected โœ“ โ”‚
90
+ โ”‚ Host: {host}:{port} โ”‚
91
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
92
+ โ”‚ Available: โ”‚
93
+ โ”‚ โ€ข {database1} โ”‚
94
+ โ”‚ โ€ข {database2} โ”‚
95
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
96
+ ```
97
+
98
+ ## Learning Integration
99
+
100
+ This skill supports FlowMind learning:
101
+
102
+ - **Connection Method**: Learns preferred connection method
103
+ - **Default Database**: Learns frequently used databases
104
+ - **Query Style**: Learns query formatting preferences
105
+
106
+ ```
107
+ User: "็”จ source_id ่ฟžๆŽฅ"
108
+ FlowMind: โœ“ Learned: Use source_id for connections
109
+
110
+ User: [Next connection]
111
+ FlowMind: [Uses source_id automatically]
112
+ ```
113
+
114
+ ## Examples
115
+
116
+ ### Example 1: Database Connection
117
+
118
+ ```
119
+ User: ่ฟžๆŽฅๆ•ฐๆฎๅบ“ๆŸฅ่ฏข็”จๆˆท่กจ
120
+
121
+ FlowMind:
122
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
123
+ โ”‚ Database Connection โ”‚
124
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
125
+ โ”‚ Type: MySQL โ”‚
126
+ โ”‚ Host: localhost:3306 โ”‚
127
+ โ”‚ Database: mydb โ”‚
128
+ โ”‚ Status: Connected โœ“ โ”‚
129
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
130
+ โ”‚ Tables: โ”‚
131
+ โ”‚ โ€ข users (1000 rows) โ”‚
132
+ โ”‚ โ€ข orders (5000 rows) โ”‚
133
+ โ”‚ โ€ข products (200 rows) โ”‚
134
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
135
+ ```
136
+
137
+ ### Example 2: Redis Operations
138
+
139
+ ```
140
+ User: ๆŸฅ็œ‹ Redis ็ผ“ๅญ˜็Šถๆ€
141
+
142
+ FlowMind:
143
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
144
+ โ”‚ Redis Status โ”‚
145
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
146
+ โ”‚ Host: localhost:6379 โ”‚
147
+ โ”‚ Status: Connected โœ“ โ”‚
148
+ โ”‚ Keys: 1,234 โ”‚
149
+ โ”‚ Memory: 45.2 MB โ”‚
150
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
151
+ โ”‚ Recent Keys: โ”‚
152
+ โ”‚ โ€ข user:123 (TTL: 3600s) โ”‚
153
+ โ”‚ โ€ข session:abc (TTL: 1800s) โ”‚
154
+ โ”‚ โ€ข cache:products (TTL: 300s) โ”‚
155
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
156
+ ```
157
+
158
+ ## Configuration
159
+
160
+ ```json
161
+ {
162
+ "resources": {
163
+ "database": {
164
+ "enabled": true,
165
+ "type": "mysql",
166
+ "connection": {
167
+ "host": "localhost",
168
+ "port": 3306,
169
+ "database": "mydb"
170
+ }
171
+ },
172
+ "redis": {
173
+ "enabled": true,
174
+ "connection": {
175
+ "host": "localhost",
176
+ "port": 6379
177
+ }
178
+ },
179
+ "api": {
180
+ "enabled": true,
181
+ "baseUrl": "https://api.example.com"
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ ## Connection Methods
188
+
189
+ ### Direct Connection
190
+
191
+ ```json
192
+ {
193
+ "method": "direct",
194
+ "host": "localhost",
195
+ "port": 3306
196
+ }
197
+ ```
198
+
199
+ ### Source ID Connection
200
+
201
+ ```json
202
+ {
203
+ "method": "source_id",
204
+ "sourceId": "your-source-id"
205
+ }
206
+ ```
207
+
208
+ ### Connection String
209
+
210
+ ```json
211
+ {
212
+ "method": "connection_string",
213
+ "url": "mysql://user:pass@host:3306/db"
214
+ }
215
+ ```
216
+
217
+ ## Security
218
+
219
+ - Passwords are encrypted at rest
220
+ - Connections use TLS when available
221
+ - Credentials are never logged
222
+ - Connection pooling prevents exhaustion
@@ -0,0 +1,223 @@
1
+ ---
2
+ name: sls-log-audit
3
+ description: SLS log audit skill for FlowMind. Query cloud log service (SLS, ELK, etc.), trace ID chain analysis, Feign call chain extraction, response time analysis, and error log investigation.
4
+ metadata:
5
+ version: "1.1.0"
6
+ author: flowmind
7
+ category: monitoring
8
+ componentDependencies:
9
+ - logService
10
+ ---
11
+
12
+ # SLS Log Audit Skill
13
+
14
+ Query and analyze Alibaba Cloud SLS (Simple Log Service) logs for troubleshooting, performance analysis, and chain tracing.
15
+
16
+ ## Features
17
+
18
+ ### Log Query
19
+ - Time-range based log search
20
+ - Service-level filtering
21
+ - Log level filtering (ERROR, WARN, INFO, DEBUG)
22
+ - Keyword and pattern search
23
+
24
+ ### TraceID Chain Analysis
25
+ - Full call chain extraction by TraceID
26
+ - Request/Response data capture
27
+ - Timing analysis per span
28
+ - Error location pinpointing
29
+
30
+ ### Feign Call Chain
31
+ - Remote call chain extraction
32
+ - Upstream/downstream service mapping
33
+ - Call latency analysis
34
+ - Failure point identification
35
+
36
+ ### Performance Analysis
37
+ - Response time analysis
38
+ - Slow endpoint detection
39
+ - Timeout investigation
40
+ - Bottleneck identification
41
+
42
+ ## Trigger Patterns
43
+
44
+ ```
45
+ "SLSๆ—ฅๅฟ—", "sls", "ๆ—ฅๅฟ—ๅฎกๆŸฅ", "ๆ—ฅๅฟ—ๆŽ’ๆŸฅ"
46
+ "็บฟไธŠๆ—ฅๅฟ—", "้”™่ฏฏๆ—ฅๅฟ—", "ๅผ‚ๅธธๆ—ฅๅฟ—", "ๅ‘Š่ญฆๆ—ฅๅฟ—"
47
+ "traceId", "้“พ่ทฏ่ฟฝ่ธช", "่ฐƒ็”จ้“พ", "้“พ่ทฏๅˆ†ๆž"
48
+ "Feign้“พ่ทฏ", "feign่ฐƒ็”จ", "่ฟœ็จ‹่ฐƒ็”จ", "RPC้“พ่ทฏ"
49
+ "ๅ“ๅบ”่€—ๆ—ถ", "ๆŽฅๅฃ่€—ๆ—ถ", "่€—ๆ—ถๅˆ†ๆž", "ๆ…ขๆŽฅๅฃ"
50
+ "ๆ€ง่ƒฝๅˆ†ๆž", "่ถ…ๆ—ถๆŽ’ๆŸฅ", "RTๅˆ†ๆž", "ๅ“ๅบ”ๆ—ถ้—ด"
51
+ "็บฟไธŠ้—ฎ้ข˜", "ๆŽ’ๆŸฅ้—ฎ้ข˜", "ๅฎšไฝ้—ฎ้ข˜", "้—ฎ้ข˜ๅˆ†ๆž"
52
+ ```
53
+
54
+ ## Output Format
55
+
56
+ ### TraceID Chain Output
57
+
58
+ ```
59
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
60
+ โ”‚ TraceID Chain Analysis โ”‚
61
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
62
+ โ”‚ TraceID: {traceId} โ”‚
63
+ โ”‚ Total Duration: {ms}ms โ”‚
64
+ โ”‚ Spans: {count} โ”‚
65
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
66
+ โ”‚ 1. {service} - {method} โ”‚
67
+ โ”‚ URL: {url} โ”‚
68
+ โ”‚ Duration: {ms}ms โ”‚
69
+ โ”‚ Status: {status} โ”‚
70
+ โ”‚ Request: {params} โ”‚
71
+ โ”‚ Response: {result} โ”‚
72
+ โ”‚ โ”‚
73
+ โ”‚ 2. {sub-service} - {method} โ”‚
74
+ โ”‚ Duration: {ms}ms โ”‚
75
+ โ”‚ Status: {status} โ”‚
76
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
77
+ โ”‚ Errors: {error_count} โ”‚
78
+ โ”‚ โ€ข {error_message} at {service}:{line} โ”‚
79
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
80
+ ```
81
+
82
+ ### Log Query Output
83
+
84
+ ```
85
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
86
+ โ”‚ SLS Log Query Results โ”‚
87
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
88
+ โ”‚ Query: {query} โ”‚
89
+ โ”‚ Time Range: {start} ~ {end} โ”‚
90
+ โ”‚ Results: {count} logs โ”‚
91
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
92
+ โ”‚ [{timestamp}] [{level}] {service} - {message} โ”‚
93
+ โ”‚ [{timestamp}] [{level}] {service} - {message} โ”‚
94
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
95
+ ```
96
+
97
+ ## Component Integration
98
+
99
+ This skill uses the **logService** component. The actual log service provider is determined by configuration.
100
+
101
+ | Provider | MCP Server | Description |
102
+ |----------|------------|-------------|
103
+ | aliyun-sls | friday-sls-logs | Alibaba Cloud SLS |
104
+ | baidu-sls | baidu-sls-logs | Baidu Cloud Log Service |
105
+ | elk | (direct) | Elasticsearch |
106
+
107
+ Configuration is managed in `flowmind.config.json` under `components.logService`.
108
+
109
+ **Default endpoints** (aliyun-sls provider):
110
+
111
+ | Environment | Endpoint | Region |
112
+ |-------------|----------|--------|
113
+ | test/uat | cn-shenzhen.log.aliyuncs.com | ๆทฑๅœณ |
114
+ | gray/prod | cn-hongkong.log.aliyuncs.com | ้ฆ™ๆธฏ |
115
+
116
+ ## Learning Integration
117
+
118
+ This skill supports FlowMind learning:
119
+
120
+ - **Query Patterns**: Learns common query patterns
121
+ - **Output Format**: Learns preferred display format (sequential list, tree, etc.)
122
+ - **Service Mapping**: Learns service-to-project mappings
123
+
124
+ ## Examples
125
+
126
+ ### Example 1: TraceID Analysis
127
+
128
+ ```
129
+ User: ๆŸฅ่ฏข traceId abc123 ็š„ๆ—ฅๅฟ—
130
+
131
+ FlowMind:
132
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
133
+ โ”‚ TraceID Chain Analysis โ”‚
134
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
135
+ โ”‚ TraceID: abc123 โ”‚
136
+ โ”‚ Total Duration: 256ms โ”‚
137
+ โ”‚ Spans: 5 โ”‚
138
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
139
+ โ”‚ 1. order-service - createOrder โ”‚
140
+ โ”‚ URL: /api/orders โ”‚
141
+ โ”‚ Duration: 256ms โ”‚
142
+ โ”‚ Status: 200 โ”‚
143
+ โ”‚ โ”‚
144
+ โ”‚ 2. user-service - getUserInfo โ”‚
145
+ โ”‚ Duration: 45ms โ”‚
146
+ โ”‚ Status: 200 โ”‚
147
+ โ”‚ โ”‚
148
+ โ”‚ 3. inventory-service - checkStock โ”‚
149
+ โ”‚ Duration: 120ms โ”‚
150
+ โ”‚ Status: 200 โ”‚
151
+ โ”‚ โ”‚
152
+ โ”‚ 4. payment-service - createPayment โ”‚
153
+ โ”‚ Duration: 89ms โ”‚
154
+ โ”‚ Status: 200 โ”‚
155
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
156
+ ```
157
+
158
+ ### Example 2: Error Investigation
159
+
160
+ ```
161
+ User: ๆŽ’ๆŸฅ็บฟไธŠ้”™่ฏฏๆ—ฅๅฟ—
162
+
163
+ FlowMind:
164
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
165
+ โ”‚ Error Log Investigation โ”‚
166
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
167
+ โ”‚ Service: order-service โ”‚
168
+ โ”‚ Time: Last 1 hour โ”‚
169
+ โ”‚ Errors Found: 3 โ”‚
170
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
171
+ โ”‚ ๐Ÿ”ด NullPointerException at OrderService.java:128 โ”‚
172
+ โ”‚ TraceID: xyz789 โ”‚
173
+ โ”‚ Context: user_id=12345, order_id=67890 โ”‚
174
+ โ”‚ โ”‚
175
+ โ”‚ ๐ŸŸก TimeoutException at FeignClient.java:45 โ”‚
176
+ โ”‚ TraceID: def456 โ”‚
177
+ โ”‚ Service: inventory-service โ”‚
178
+ โ”‚ Duration: 5001ms (timeout: 5000ms) โ”‚
179
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
180
+ ```
181
+
182
+ ## Configuration
183
+
184
+ Skill-specific configuration:
185
+
186
+ ```json
187
+ {
188
+ "sls-log-audit": {
189
+ "defaultProject": "your-project",
190
+ "defaultLogstore": "your-logstore",
191
+ "queryLimit": 100,
192
+ "timeRange": {
193
+ "default": "1h",
194
+ "max": "24h"
195
+ }
196
+ }
197
+ }
198
+ ```
199
+
200
+ Component provider configuration (in `flowmind.config.json`):
201
+
202
+ ```json
203
+ {
204
+ "components": {
205
+ "logService": {
206
+ "default": "aliyun-sls",
207
+ "providers": {
208
+ "aliyun-sls": {
209
+ "adapter": "aliyun-sls-adapter",
210
+ "enabled": true,
211
+ "mcpServer": "friday-sls-logs",
212
+ "config": {
213
+ "endpoints": {
214
+ "test": "cn-shenzhen.log.aliyuncs.com",
215
+ "prod": "cn-hongkong.log.aliyuncs.com"
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ }
223
+ ```
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: yapi-sync-interface
3
+ description: YApi interface sync skill for FlowMind. Sync Controller interfaces to YApi, import/export Swagger, manage API documentation lifecycle.
4
+ metadata:
5
+ version: "1.1.0"
6
+ author: flowmind
7
+ category: documentation
8
+ componentDependencies:
9
+ - apiDoc
10
+ ---
11
+
12
+ # YApi Interface Sync Skill
13
+
14
+ Synchronize API interfaces between code and YApi platform for consistent API documentation management.
15
+
16
+ ## Features
17
+
18
+ ### Interface Sync
19
+ - Extract Controller interfaces from code
20
+ - Sync to YApi project
21
+ - Update existing interfaces
22
+ - Create new interface categories
23
+
24
+ ### Swagger Import/Export
25
+ - Generate Swagger/OpenAPI from code
26
+ - Import Swagger to YApi
27
+ - Export YApi interfaces to Swagger
28
+
29
+ ### Interface Management
30
+ - Search interfaces by keyword
31
+ - Manage interface categories
32
+ - Interface version tracking
33
+ - Test collection management
34
+
35
+ ## Trigger Patterns
36
+
37
+ ```
38
+ "ๅŒๆญฅๆŽฅๅฃ", "sync interfaces"
39
+ "YApiๅŒๆญฅ", "yapi sync"
40
+ "ๆŽฅๅฃๆ–‡ๆกฃ", "API documentation"
41
+ "Swaggerๅฏผๅ…ฅ", "swagger import"
42
+ "ๆŽฅๅฃ็ฎก็†", "interface management"
43
+ "ๆ›ดๆ–ฐYApi", "update yapi"
44
+ ```
45
+
46
+ ## Output Format
47
+
48
+ ```
49
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
50
+ โ”‚ YApi Interface Sync Report โ”‚
51
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
52
+ โ”‚ Project: {project_name} (ID: {id}) โ”‚
53
+ โ”‚ Category: {category} โ”‚
54
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
55
+ โ”‚ Interfaces Found: {count} โ”‚
56
+ โ”‚ โ€ข New: {new_count} โ”‚
57
+ โ”‚ โ€ข Updated: {update_count} โ”‚
58
+ โ”‚ โ€ข Unchanged: {unchanged_count} โ”‚
59
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
60
+ โ”‚ Sync Status: โœ… Success / โŒ Failed โ”‚
61
+ โ”‚ YApi URL: {url} โ”‚
62
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
63
+ ```
64
+
65
+ ## Component Integration
66
+
67
+ This skill uses the **apiDoc** component. The actual API documentation provider is determined by configuration.
68
+
69
+ | Provider | MCP Server | Description |
70
+ |----------|------------|-------------|
71
+ | yapi | aomi-yapi-mcp | YApi API documentation platform |
72
+
73
+ Configuration is managed in `flowmind.config.json` under `components.apiDoc`.
74
+
75
+ **Available MCP tools** (yapi provider):
76
+
77
+ | Tool | Description |
78
+ |------|-------------|
79
+ | `yapi_search_apis` | Search interfaces by keyword |
80
+ | `yapi_get_categories` | Get project categories |
81
+ | `yapi_save_api` | Create/update interface |
82
+ | `yapi_import_swagger` | Import Swagger data |
83
+ | `yapi_export_project` | Export project data |
84
+
85
+ ## Learning Integration
86
+
87
+ This skill supports FlowMind learning:
88
+
89
+ - **Project Mapping**: Learns which code maps to which YApi project
90
+ - **Category Mapping**: Learns package-to-category mappings
91
+ - **Sync Preferences**: Learns sync preferences (overwrite, merge, etc.)
92
+
93
+ ## Examples
94
+
95
+ ### Example 1: Sync Controller to YApi
96
+
97
+ ```
98
+ User: ๅŒๆญฅ OrderController ็š„ๆŽฅๅฃๅˆฐ YApi
99
+
100
+ FlowMind:
101
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
102
+ โ”‚ YApi Interface Sync Report โ”‚
103
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
104
+ โ”‚ Project: order-service (ID: 28) โ”‚
105
+ โ”‚ Category: ่ฎขๅ•็ฎก็† โ”‚
106
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
107
+ โ”‚ Interfaces Found: 5 โ”‚
108
+ โ”‚ โ€ข New: 2 (createOrder, cancelOrder) โ”‚
109
+ โ”‚ โ€ข Updated: 3 (getOrder, listOrders, updateOrder) โ”‚
110
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
111
+ โ”‚ Sync Status: โœ… Success โ”‚
112
+ โ”‚ YApi URL: https://yapi.example.com/project/28 โ”‚
113
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
114
+ ```
115
+
116
+ ### Example 2: Search Interfaces
117
+
118
+ ```
119
+ User: ๆœ็ดข YApi ไธŠ็š„่ฎขๅ•็›ธๅ…ณๆŽฅๅฃ
120
+
121
+ FlowMind:
122
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
123
+ โ”‚ YApi Interface Search โ”‚
124
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
125
+ โ”‚ Keyword: ่ฎขๅ• โ”‚
126
+ โ”‚ Results: 8 interfaces โ”‚
127
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
128
+ โ”‚ 1. ๅˆ›ๅปบ่ฎขๅ• - POST /api/orders (project: order-svc) โ”‚
129
+ โ”‚ 2. ๆŸฅ่ฏข่ฎขๅ• - GET /api/orders/{id} (project: order) โ”‚
130
+ โ”‚ 3. ๅ–ๆถˆ่ฎขๅ• - PUT /api/orders/{id}/cancel โ”‚
131
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
132
+ ```
133
+
134
+ ## Configuration
135
+
136
+ ```json
137
+ {
138
+ "yapi-sync-interface": {
139
+ "defaultProjectId": "28",
140
+ "syncMode": "merge",
141
+ "autoCreateCategory": true,
142
+ "excludePatterns": ["**/internal/**"]
143
+ }
144
+ }
145
+ ```