vibes-plug 1.0.0 → 2.5.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 (123) hide show
  1. package/.github/workflows/publish.yml +20 -0
  2. package/AGENTS.md +66 -0
  3. package/BLUEPRINT.md +152 -60
  4. package/CHANGELOG.md +50 -0
  5. package/README.md +346 -194
  6. package/package.json +25 -25
  7. package/plugin.json +1 -1
  8. package/skills/ai-cost-token-optimizer/SKILL.md +52 -0
  9. package/skills/ai-llm-integration-expert/SKILL.md +180 -162
  10. package/skills/api-design-expert/SKILL.md +314 -310
  11. package/skills/app-analyzer-optimizer/SKILL.md +193 -189
  12. package/skills/apple-ecosystem-expert/SKILL.md +142 -0
  13. package/skills/async-queue-temporal-expert/SKILL.md +54 -0
  14. package/skills/authentication-identity-expert/SKILL.md +251 -20
  15. package/skills/auto-doc-updater/SKILL.md +214 -204
  16. package/skills/autonomous-chaos-monkey/SKILL.md +63 -0
  17. package/skills/autonomous-red-teamer/SKILL.md +59 -0
  18. package/skills/autonomous-swarm-director/SKILL.md +69 -0
  19. package/skills/autonomous-tdd-debugger/SKILL.md +65 -0
  20. package/skills/bootstrap-to-modern/SKILL.md +90 -86
  21. package/skills/brainstorming/SKILL.md +373 -353
  22. package/skills/browser-automation-expert/SKILL.md +46 -0
  23. package/skills/ci-cd-devops-architect/SKILL.md +72 -45
  24. package/skills/cloud-hosting-expert/SKILL.md +244 -244
  25. package/skills/coderabbit/SKILL.md +192 -192
  26. package/skills/cron-scheduler-expert/SKILL.md +298 -0
  27. package/skills/data-telemetry-expert/SKILL.md +213 -213
  28. package/skills/database-orm-expert/SKILL.md +294 -294
  29. package/skills/dependency-upgrade-migrator/SKILL.md +295 -0
  30. package/skills/design-system-architect/SKILL.md +27 -10
  31. package/skills/doku-mcp-server/SKILL.md +251 -0
  32. package/skills/doku-payment-gateway/SKILL.md +227 -0
  33. package/skills/e2e-testing-expert/SKILL.md +315 -315
  34. package/skills/edge-serverless-db-expert/SKILL.md +43 -0
  35. package/skills/email-notification-expert/SKILL.md +362 -0
  36. package/skills/error-resilience-expert/SKILL.md +480 -0
  37. package/skills/event-driven-architect/SKILL.md +81 -81
  38. package/skills/feature-flag-analytics-expert/SKILL.md +46 -0
  39. package/skills/file-upload-media-expert/SKILL.md +431 -0
  40. package/skills/form-validation-expert/SKILL.md +401 -0
  41. package/skills/fullstack-expert/SKILL.md +202 -202
  42. package/skills/fullstack-expert/references/api_design_guide.md +466 -466
  43. package/skills/fullstack-expert/references/multi_language_backend.md +528 -528
  44. package/skills/fullstack-expert/scripts/api_contract_validator.py +253 -253
  45. package/skills/fullstack-expert/scripts/architecture_analyzer.py +326 -326
  46. package/skills/gemini-agent-booster/SKILL.md +135 -135
  47. package/skills/global-a11y-i18n-expert/SKILL.md +81 -81
  48. package/skills/glsl-shader-expert/SKILL.md +101 -0
  49. package/skills/go-programming-expert/SKILL.md +295 -295
  50. package/skills/graphql-apollo-expert/SKILL.md +108 -0
  51. package/skills/hig/SKILL.md +188 -188
  52. package/skills/hyper-context-synthesizer/SKILL.md +55 -0
  53. package/skills/js-backend-expert/SKILL.md +34 -9
  54. package/skills/legacy-code-translator/SKILL.md +65 -0
  55. package/skills/llm-cost-arbitrage-router/SKILL.md +59 -0
  56. package/skills/logging-error-tracking-expert/SKILL.md +338 -0
  57. package/skills/mcp-client-orchestrator/SKILL.md +70 -0
  58. package/skills/mcp-server-architect/SKILL.md +194 -194
  59. package/skills/micro-frontend-architect/SKILL.md +106 -0
  60. package/skills/mobile-expo-expert/SKILL.md +186 -186
  61. package/skills/mobile-push-notification-expert/SKILL.md +51 -0
  62. package/skills/monday-design-aesthetic/SKILL.md +67 -67
  63. package/skills/monorepo-architect/SKILL.md +227 -227
  64. package/skills/mpa-orchestrator/SKILL.md +101 -101
  65. package/skills/multi-agent-orchestration/SKILL.md +234 -234
  66. package/skills/multiple-entry-points/SKILL.md +55 -55
  67. package/skills/mvc-expert/SKILL.md +231 -231
  68. package/skills/payment-gateway-expert/SKILL.md +45 -45
  69. package/skills/performance-web-vitals/SKILL.md +332 -332
  70. package/skills/post-quantum-crypto-migrator/SKILL.md +57 -0
  71. package/skills/prd-architect/SKILL.md +201 -191
  72. package/skills/proactive-background-watcher/SKILL.md +62 -0
  73. package/skills/production-ready-hardener/PRODUCTION_READINESS_REPORT.md +67 -0
  74. package/skills/production-ready-hardener/SKILL.md +173 -186
  75. package/skills/production-ready-hardener/references/production_checklist.md +161 -161
  76. package/skills/production-ready-hardener/scripts/production_readiness_scanner.py +881 -875
  77. package/skills/project-context-mapper/SKILL.md +79 -0
  78. package/skills/python-programming-expert/SKILL.md +263 -132
  79. package/skills/rate-limit-abuse-prevention/SKILL.md +371 -0
  80. package/skills/realtime-collaboration-expert/SKILL.md +45 -45
  81. package/skills/rust-programming-expert/SKILL.md +235 -235
  82. package/skills/saas-billing/SKILL.md +377 -377
  83. package/skills/saas-multi-tenant/SKILL.md +251 -237
  84. package/skills/saas-mvp-launcher/SKILL.md +10 -0
  85. package/skills/saas-transformer/SKILL.md +187 -144
  86. package/skills/saas-transformer/references/billing_integration_guide.md +401 -401
  87. package/skills/saas-transformer/references/feature_gating_patterns.md +137 -137
  88. package/skills/saas-transformer/references/saas_transformation_checklist.md +121 -121
  89. package/skills/saas-transformer/scripts/saas_transformation_scanner.py +39 -29
  90. package/skills/scalability-clean-code/SKILL.md +229 -229
  91. package/skills/self-evolving-memory-graph/SKILL.md +75 -0
  92. package/skills/self-healing-cloud-orchestrator/SKILL.md +57 -0
  93. package/skills/senior-frontend/SKILL.md +161 -161
  94. package/skills/senior-fullstack/SKILL.md +167 -167
  95. package/skills/seo/SKILL.md +235 -225
  96. package/skills/seo-geo/SKILL.md +188 -188
  97. package/skills/session-context-loader/SKILL.md +77 -0
  98. package/skills/session-handoff-resume/SKILL.md +158 -158
  99. package/skills/skill_baru/SKILL.md +172 -147
  100. package/skills/spa-orchestrator/SKILL.md +288 -288
  101. package/skills/state-management-expert/SKILL.md +272 -272
  102. package/skills/supabase-security-expert/SKILL.md +243 -243
  103. package/skills/tailwind-expert/SKILL.md +188 -188
  104. package/skills/tanstack-query-expert/SKILL.md +199 -199
  105. package/skills/token-saver/SKILL.md +119 -111
  106. package/skills/typescript-expert/SKILL.md +324 -279
  107. package/skills/ui-components-expert/SKILL.md +263 -46
  108. package/skills/ui-ux-pro-max/SKILL.md +202 -201
  109. package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-310.pyc +0 -0
  110. package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-310.pyc +0 -0
  111. package/skills/ui_ux_expert/SKILL.md +17 -6
  112. package/skills/vector-db-rag-expert/SKILL.md +52 -0
  113. package/skills/vibe-code-gardener/SKILL.md +181 -173
  114. package/skills/visual-qa-vision-agent/SKILL.md +65 -0
  115. package/skills/vue-frontend-expert/SKILL.md +126 -0
  116. package/skills/web-3d-graphics-expert/SKILL.md +131 -0
  117. package/skills/web-game-engine-expert/SKILL.md +96 -0
  118. package/skills/web-scraper/SKILL.md +207 -205
  119. package/skills/website-design-cloner/SKILL.md +174 -0
  120. package/skills/webxr-ar-vr-expert/SKILL.md +117 -0
  121. package/skills/zero-to-prod-orchestrator/SKILL.md +206 -180
  122. package/skills/zero-trust-secret-vault/SKILL.md +40 -0
  123. package/vibes-swarm-demo.gif +0 -0
@@ -1,194 +1,194 @@
1
- ---
2
- name: mcp-server-architect
3
- description: "Expert guide for designing, building, and security-hardening Model Context Protocol (MCP) servers and tool integrations in TypeScript, Python, and Go / Panduan ahli merancang, membangun, dan mengamankan server Model Context Protocol (MCP) dan integrasi tool dalam TypeScript, Python, dan Go."
4
- author: "Roedy Rustam"
5
- ---
6
-
7
- # MCP Server Architect (v1.9+ Edition)
8
-
9
- [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
10
-
11
- ---
12
-
13
- <a name="english"></a>
14
- ## English
15
-
16
- ### Description
17
- Expert guide for designing, building, and security-hardening **Model Context Protocol (MCP)** servers and client integrations. Covers MCP v1.9+ specification (including the new Streamable HTTP transport), tool/resource/prompt design, Zod validation, OAuth 2.1 authorization, and multi-server orchestration patterns for production AI applications.
18
-
19
- ### Trigger Conditions
20
- - Building an MCP server to expose tools, resources, or prompt templates to AI agents.
21
- - Integrating third-party APIs or databases as MCP tools for LLM consumption.
22
- - Implementing MCP client logic in an AI agent or chatbot.
23
- - Securing MCP servers with OAuth 2.1 and permission scoping.
24
- - Deploying MCP servers to edge/serverless environments.
25
-
26
- ### MCP v1.9+ Specification Overview
27
-
28
- MCP standardizes how AI models interact with external tools and data. The 2026 specification (v1.9) introduces:
29
-
30
- | Feature | Description |
31
- |---|---|
32
- | **Streamable HTTP** | New bidirectional transport via HTTP streaming — replaces SSE for cloud deployments |
33
- | **stdio** | Original transport for local/CLI tools — still recommended for local MCP |
34
- | **OAuth 2.1** | Standard authorization flow for MCP servers requiring user consent |
35
- | **Tool Annotations** | `readOnlyHint`, `destructiveHint`, `idempotentHint` for safer agent decisions |
36
- | **Audio Content** | Support for audio data in tool responses |
37
- | **Resource Links** | Resources can now link to external URIs |
38
-
39
- ### Core MCP Concepts
40
-
41
- | Primitive | What It Is | Example |
42
- |---|---|---|
43
- | **Tool** | Executable function the LLM can call | `search_database`, `send_email` |
44
- | **Resource** | Read-only data the LLM can read | File contents, DB records |
45
- | **Prompt** | Reusable prompt templates | `code_review_prompt` |
46
- | **Sampling** | Server requests LLM completion | Agent asks LLM to classify |
47
-
48
- ### Building an MCP Server (TypeScript)
49
-
50
- #### 1. Setup with `@modelcontextprotocol/sdk`
51
- ```typescript
52
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
53
- import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
54
- import { z } from 'zod';
55
-
56
- const server = new McpServer({
57
- name: 'my-api-server',
58
- version: '1.0.0',
59
- });
60
- ```
61
-
62
- #### 2. Define Tools with Zod Validation
63
- ```typescript
64
- server.tool(
65
- 'search_products',
66
- 'Search the product catalog by query and category',
67
- {
68
- query: z.string().min(1).describe('Search query string'),
69
- category: z.enum(['electronics', 'clothing', 'books']).optional(),
70
- limit: z.number().int().min(1).max(50).default(10),
71
- },
72
- {
73
- readOnlyHint: true, // v1.9 annotation: this tool does not modify state
74
- idempotentHint: true, // safe to call multiple times
75
- },
76
- async ({ query, category, limit }) => {
77
- const results = await productDB.search({ query, category, limit });
78
- return {
79
- content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
80
- };
81
- }
82
- );
83
- ```
84
-
85
- #### 3. Expose Resources
86
- ```typescript
87
- server.resource(
88
- 'company-docs',
89
- 'docs://{path}',
90
- { mimeType: 'text/markdown' },
91
- async (uri) => {
92
- const path = uri.pathname;
93
- const content = await fs.readFile(`./docs${path}`, 'utf-8');
94
- return { contents: [{ uri: uri.href, mimeType: 'text/markdown', text: content }] };
95
- }
96
- );
97
- ```
98
-
99
- #### 4. Streamable HTTP Transport (v1.9 — Production Deployment)
100
- ```typescript
101
- import express from 'express';
102
-
103
- const app = express();
104
- app.use(express.json());
105
-
106
- app.all('/mcp', async (req, res) => {
107
- const transport = new StreamableHTTPServerTransport({
108
- sessionIdGenerator: () => crypto.randomUUID(),
109
- });
110
- await server.connect(transport);
111
- await transport.handleRequest(req, res, req.body);
112
- });
113
-
114
- app.listen(3000, () => console.log('MCP Server running on :3000'));
115
- ```
116
-
117
- #### 5. OAuth 2.1 Authorization (Secure MCP)
118
- For MCP servers requiring user consent (e.g., accessing user's GitHub repos):
119
- ```typescript
120
- import { ProxyOAuthServerProvider } from '@modelcontextprotocol/sdk/server/auth/providers/proxyOAuth.js';
121
-
122
- const authProvider = new ProxyOAuthServerProvider({
123
- endpoints: {
124
- authorizationUrl: 'https://github.com/login/oauth/authorize',
125
- tokenUrl: 'https://github.com/login/oauth/access_token',
126
- },
127
- clientId: process.env.GITHUB_CLIENT_ID!,
128
- clientSecret: process.env.GITHUB_CLIENT_SECRET!,
129
- scopes: ['repo', 'read:user'],
130
- });
131
-
132
- server.setAuthProvider(authProvider);
133
- ```
134
-
135
- ### Security Hardening
136
-
137
- - **Validate ALL inputs**: Every tool parameter must be validated with Zod before execution. Never trust LLM-generated inputs directly.
138
- - **Principle of Least Privilege**: Each tool should only request the minimum permissions needed.
139
- - **Rate Limiting**: Implement per-session rate limits to prevent prompt injection loops.
140
- - **Sanitize Outputs**: Never return raw database records with sensitive fields (passwords, API keys). Always filter/select only what's needed.
141
- - **Audit Logging**: Log every tool call with session ID, tool name, parameters, and result status.
142
- - **Tool Annotations**: Use `destructiveHint: true` for tools that modify or delete data — agents should ask for human confirmation before calling these.
143
-
144
- ### Multi-Server Orchestration
145
- When building AI apps with multiple MCP servers:
146
- ```typescript
147
- // Client connecting to multiple MCP servers
148
- const client = new McpClient({ name: 'my-agent', version: '1.0.0' });
149
-
150
- // Connect to multiple specialized servers
151
- await client.connect(new StdioTransport({ command: 'node', args: ['file-server.js'] }));
152
- await client.connect(new StreamableHTTPTransport({ url: 'https://api.mydb.com/mcp' }));
153
-
154
- // List all available tools across servers
155
- const { tools } = await client.listTools();
156
- ```
157
-
158
- ---
159
-
160
- <a name="bahasa-indonesia"></a>
161
- ## Bahasa Indonesia
162
-
163
- ### Deskripsi
164
- Panduan ahli untuk merancang, membangun, dan mengamankan server **Model Context Protocol (MCP)** dan integrasi klien. Mencakup spesifikasi MCP v1.9+ (termasuk transport Streamable HTTP baru), desain tool/resource/prompt, validasi Zod, otorisasi OAuth 2.1, dan pola orkestrasi multi-server untuk aplikasi AI produksi.
165
-
166
- ### Kondisi Pemicu
167
- - Membangun MCP server untuk mengekspos tool, resource, atau prompt template ke agen AI.
168
- - Mengintegrasikan API pihak ketiga atau database sebagai MCP tool untuk konsumsi LLM.
169
- - Mengimplementasikan logika klien MCP dalam agen AI atau chatbot.
170
- - Mengamankan MCP server dengan OAuth 2.1 dan pembatasan izin.
171
- - Men-deploy MCP server ke lingkungan edge/serverless.
172
-
173
- ### Ringkasan Spesifikasi MCP v1.9+
174
-
175
- MCP menstandarisasi cara model AI berinteraksi dengan tool dan data eksternal. Spesifikasi 2026 (v1.9) memperkenalkan:
176
- - **Streamable HTTP**: Transport dua arah baru via HTTP streaming — menggantikan SSE untuk deployment cloud.
177
- - **Tool Annotations**: `readOnlyHint`, `destructiveHint`, `idempotentHint` untuk keputusan agen yang lebih aman.
178
- - **OAuth 2.1**: Alur otorisasi standar untuk MCP server yang memerlukan izin pengguna.
179
-
180
- ### Membangun MCP Server (TypeScript)
181
-
182
- Gunakan `@modelcontextprotocol/sdk` untuk TypeScript. Definisikan tool dengan validasi Zod yang ketat, tambahkan anotasi v1.9 (`readOnlyHint`, `destructiveHint`), dan gunakan Streamable HTTP transport untuk deployment cloud produksi.
183
-
184
- ### Keamanan MCP
185
-
186
- - **Validasi SEMUA input**: Setiap parameter tool harus divalidasi dengan Zod sebelum eksekusi.
187
- - **Prinsip Least Privilege**: Setiap tool hanya boleh meminta izin minimum yang diperlukan.
188
- - **Rate Limiting**: Batasi panggilan per sesi untuk mencegah loop prompt injection.
189
- - **Sanitasi Output**: Jangan pernah mengembalikan field sensitif (password, API key).
190
- - **Audit Logging**: Catat setiap panggilan tool dengan session ID, nama tool, parameter, dan status hasil.
191
- - **Anotasi Tool**: Gunakan `destructiveHint: true` untuk tool yang memodifikasi/menghapus data — agen harus meminta konfirmasi manusia sebelum memanggilnya.
192
-
193
- ### Orkestrasi Multi-Server
194
- Klien MCP dapat terhubung ke beberapa server sekaligus, menyatukan semua tool dari server yang berbeda menjadi satu daftar yang tersedia untuk agen.
1
+ ---
2
+ name: mcp-server-architect
3
+ description: "Expert guide for designing, building, and security-hardening Model Context Protocol (MCP) servers and tool integrations in TypeScript, Python, and Go / Panduan ahli merancang, membangun, dan mengamankan server Model Context Protocol (MCP) dan integrasi tool dalam TypeScript, Python, dan Go."
4
+ author: "Roedy Rustam"
5
+ ---
6
+
7
+ # MCP Server Architect (v1.9+ Edition)
8
+
9
+ [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
10
+
11
+ ---
12
+
13
+ <a name="english"></a>
14
+ ## English
15
+
16
+ ### Description
17
+ Expert guide for designing, building, and security-hardening **Model Context Protocol (MCP)** servers and client integrations. Covers MCP v1.9+ specification (including the new Streamable HTTP transport), tool/resource/prompt design, Zod validation, OAuth 2.1 authorization, and multi-server orchestration patterns for production AI applications.
18
+
19
+ ### Trigger Conditions
20
+ - Building an MCP server to expose tools, resources, or prompt templates to AI agents.
21
+ - Integrating third-party APIs or databases as MCP tools for LLM consumption.
22
+ - Implementing MCP client logic in an AI agent or chatbot.
23
+ - Securing MCP servers with OAuth 2.1 and permission scoping.
24
+ - Deploying MCP servers to edge/serverless environments.
25
+
26
+ ### MCP v1.9+ Specification Overview
27
+
28
+ MCP standardizes how AI models interact with external tools and data. The 2026 specification (v1.9) introduces:
29
+
30
+ | Feature | Description |
31
+ |---|---|
32
+ | **Streamable HTTP** | New bidirectional transport via HTTP streaming — replaces SSE for cloud deployments |
33
+ | **stdio** | Original transport for local/CLI tools — still recommended for local MCP |
34
+ | **OAuth 2.1** | Standard authorization flow for MCP servers requiring user consent |
35
+ | **Tool Annotations** | `readOnlyHint`, `destructiveHint`, `idempotentHint` for safer agent decisions |
36
+ | **Audio Content** | Support for audio data in tool responses |
37
+ | **Resource Links** | Resources can now link to external URIs |
38
+
39
+ ### Core MCP Concepts
40
+
41
+ | Primitive | What It Is | Example |
42
+ |---|---|---|
43
+ | **Tool** | Executable function the LLM can call | `search_database`, `send_email` |
44
+ | **Resource** | Read-only data the LLM can read | File contents, DB records |
45
+ | **Prompt** | Reusable prompt templates | `code_review_prompt` |
46
+ | **Sampling** | Server requests LLM completion | Agent asks LLM to classify |
47
+
48
+ ### Building an MCP Server (TypeScript)
49
+
50
+ #### 1. Setup with `@modelcontextprotocol/sdk`
51
+ ```typescript
52
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
53
+ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
54
+ import { z } from 'zod';
55
+
56
+ const server = new McpServer({
57
+ name: 'my-api-server',
58
+ version: '1.0.0',
59
+ });
60
+ ```
61
+
62
+ #### 2. Define Tools with Zod Validation
63
+ ```typescript
64
+ server.tool(
65
+ 'search_products',
66
+ 'Search the product catalog by query and category',
67
+ {
68
+ query: z.string().min(1).describe('Search query string'),
69
+ category: z.enum(['electronics', 'clothing', 'books']).optional(),
70
+ limit: z.number().int().min(1).max(50).default(10),
71
+ },
72
+ {
73
+ readOnlyHint: true, // v1.9 annotation: this tool does not modify state
74
+ idempotentHint: true, // safe to call multiple times
75
+ },
76
+ async ({ query, category, limit }) => {
77
+ const results = await productDB.search({ query, category, limit });
78
+ return {
79
+ content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
80
+ };
81
+ }
82
+ );
83
+ ```
84
+
85
+ #### 3. Expose Resources
86
+ ```typescript
87
+ server.resource(
88
+ 'company-docs',
89
+ 'docs://{path}',
90
+ { mimeType: 'text/markdown' },
91
+ async (uri) => {
92
+ const path = uri.pathname;
93
+ const content = await fs.readFile(`./docs${path}`, 'utf-8');
94
+ return { contents: [{ uri: uri.href, mimeType: 'text/markdown', text: content }] };
95
+ }
96
+ );
97
+ ```
98
+
99
+ #### 4. Streamable HTTP Transport (v1.9 — Production Deployment)
100
+ ```typescript
101
+ import express from 'express';
102
+
103
+ const app = express();
104
+ app.use(express.json());
105
+
106
+ app.all('/mcp', async (req, res) => {
107
+ const transport = new StreamableHTTPServerTransport({
108
+ sessionIdGenerator: () => crypto.randomUUID(),
109
+ });
110
+ await server.connect(transport);
111
+ await transport.handleRequest(req, res, req.body);
112
+ });
113
+
114
+ app.listen(3000, () => console.log('MCP Server running on :3000'));
115
+ ```
116
+
117
+ #### 5. OAuth 2.1 Authorization (Secure MCP)
118
+ For MCP servers requiring user consent (e.g., accessing user's GitHub repos):
119
+ ```typescript
120
+ import { ProxyOAuthServerProvider } from '@modelcontextprotocol/sdk/server/auth/providers/proxyOAuth.js';
121
+
122
+ const authProvider = new ProxyOAuthServerProvider({
123
+ endpoints: {
124
+ authorizationUrl: 'https://github.com/login/oauth/authorize',
125
+ tokenUrl: 'https://github.com/login/oauth/access_token',
126
+ },
127
+ clientId: process.env.GITHUB_CLIENT_ID!,
128
+ clientSecret: process.env.GITHUB_CLIENT_SECRET!,
129
+ scopes: ['repo', 'read:user'],
130
+ });
131
+
132
+ server.setAuthProvider(authProvider);
133
+ ```
134
+
135
+ ### Security Hardening
136
+
137
+ - **Validate ALL inputs**: Every tool parameter must be validated with Zod before execution. Never trust LLM-generated inputs directly.
138
+ - **Principle of Least Privilege**: Each tool should only request the minimum permissions needed.
139
+ - **Rate Limiting**: Implement per-session rate limits to prevent prompt injection loops.
140
+ - **Sanitize Outputs**: Never return raw database records with sensitive fields (passwords, API keys). Always filter/select only what's needed.
141
+ - **Audit Logging**: Log every tool call with session ID, tool name, parameters, and result status.
142
+ - **Tool Annotations**: Use `destructiveHint: true` for tools that modify or delete data — agents should ask for human confirmation before calling these.
143
+
144
+ ### Multi-Server Orchestration
145
+ When building AI apps with multiple MCP servers:
146
+ ```typescript
147
+ // Client connecting to multiple MCP servers
148
+ const client = new McpClient({ name: 'my-agent', version: '1.0.0' });
149
+
150
+ // Connect to multiple specialized servers
151
+ await client.connect(new StdioTransport({ command: 'node', args: ['file-server.js'] }));
152
+ await client.connect(new StreamableHTTPTransport({ url: 'https://api.mydb.com/mcp' }));
153
+
154
+ // List all available tools across servers
155
+ const { tools } = await client.listTools();
156
+ ```
157
+
158
+ ---
159
+
160
+ <a name="bahasa-indonesia"></a>
161
+ ## Bahasa Indonesia
162
+
163
+ ### Deskripsi
164
+ Panduan ahli untuk merancang, membangun, dan mengamankan server **Model Context Protocol (MCP)** dan integrasi klien. Mencakup spesifikasi MCP v1.9+ (termasuk transport Streamable HTTP baru), desain tool/resource/prompt, validasi Zod, otorisasi OAuth 2.1, dan pola orkestrasi multi-server untuk aplikasi AI produksi.
165
+
166
+ ### Kondisi Pemicu
167
+ - Membangun MCP server untuk mengekspos tool, resource, atau prompt template ke agen AI.
168
+ - Mengintegrasikan API pihak ketiga atau database sebagai MCP tool untuk konsumsi LLM.
169
+ - Mengimplementasikan logika klien MCP dalam agen AI atau chatbot.
170
+ - Mengamankan MCP server dengan OAuth 2.1 dan pembatasan izin.
171
+ - Men-deploy MCP server ke lingkungan edge/serverless.
172
+
173
+ ### Ringkasan Spesifikasi MCP v1.9+
174
+
175
+ MCP menstandarisasi cara model AI berinteraksi dengan tool dan data eksternal. Spesifikasi 2026 (v1.9) memperkenalkan:
176
+ - **Streamable HTTP**: Transport dua arah baru via HTTP streaming — menggantikan SSE untuk deployment cloud.
177
+ - **Tool Annotations**: `readOnlyHint`, `destructiveHint`, `idempotentHint` untuk keputusan agen yang lebih aman.
178
+ - **OAuth 2.1**: Alur otorisasi standar untuk MCP server yang memerlukan izin pengguna.
179
+
180
+ ### Membangun MCP Server (TypeScript)
181
+
182
+ Gunakan `@modelcontextprotocol/sdk` untuk TypeScript. Definisikan tool dengan validasi Zod yang ketat, tambahkan anotasi v1.9 (`readOnlyHint`, `destructiveHint`), dan gunakan Streamable HTTP transport untuk deployment cloud produksi.
183
+
184
+ ### Keamanan MCP
185
+
186
+ - **Validasi SEMUA input**: Setiap parameter tool harus divalidasi dengan Zod sebelum eksekusi.
187
+ - **Prinsip Least Privilege**: Setiap tool hanya boleh meminta izin minimum yang diperlukan.
188
+ - **Rate Limiting**: Batasi panggilan per sesi untuk mencegah loop prompt injection.
189
+ - **Sanitasi Output**: Jangan pernah mengembalikan field sensitif (password, API key).
190
+ - **Audit Logging**: Catat setiap panggilan tool dengan session ID, nama tool, parameter, dan status hasil.
191
+ - **Anotasi Tool**: Gunakan `destructiveHint: true` untuk tool yang memodifikasi/menghapus data — agen harus meminta konfirmasi manusia sebelum memanggilnya.
192
+
193
+ ### Orkestrasi Multi-Server
194
+ Klien MCP dapat terhubung ke beberapa server sekaligus, menyatukan semua tool dari server yang berbeda menjadi satu daftar yang tersedia untuk agen.
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: micro-frontend-architect
3
+ description: "Expert guide for designing Micro-Frontend architectures using Webpack Module Federation, Vite Federation, and Single-SPA for large scale Vue and React applications."
4
+ author: "Roedy Rustam"
5
+ ---
6
+
7
+ # Micro-Frontend Architect
8
+
9
+ [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
10
+
11
+ ---
12
+
13
+ <a name="english"></a>
14
+ ## English
15
+
16
+ ### Description
17
+ Production-grade guidance for breaking down monolithic frontend applications into scalable, independently deployable **Micro-Frontends (MFE)**. Covers integration via **Webpack Module Federation**, **Vite Federation**, and run-time container orchestration using patterns suitable for massive Enterprise applications in Vue or React.
18
+
19
+ ### Trigger Conditions
20
+ Activate this skill when the user is:
21
+ - Splitting a large frontend codebase into multiple smaller apps (Host and Remotes).
22
+ - Configuring Webpack Module Federation (`ModuleFederationPlugin`).
23
+ - Setting up Vite with `@originjs/vite-plugin-federation`.
24
+ - Asking about sharing dependencies (e.g., sharing a single instance of Vue, React, or Pinia across apps).
25
+ - Designing a cross-team frontend deployment strategy.
26
+
27
+ ### Core Concepts
28
+
29
+ #### 1. Module Federation Concept
30
+ Module federation allows a JavaScript application to dynamically load code from another application at runtime.
31
+ - **Host (Shell):** The main container application that loads remote modules.
32
+ - **Remote:** The micro-frontend application exposing components or logic.
33
+
34
+ #### 2. Vite Federation Example
35
+ ```javascript
36
+ // vite.config.js (Remote App)
37
+ import federation from '@originjs/vite-plugin-federation'
38
+
39
+ export default {
40
+ plugins: [
41
+ federation({
42
+ name: 'remote_app',
43
+ filename: 'remoteEntry.js',
44
+ exposes: {
45
+ './Button': './src/components/Button.vue',
46
+ },
47
+ shared: ['vue', 'pinia'] // Critical: Share core dependencies!
48
+ })
49
+ ]
50
+ }
51
+
52
+ // vite.config.js (Host App)
53
+ import federation from '@originjs/vite-plugin-federation'
54
+
55
+ export default {
56
+ plugins: [
57
+ federation({
58
+ name: 'host_app',
59
+ remotes: {
60
+ remote_app: 'http://localhost:5001/assets/remoteEntry.js',
61
+ },
62
+ shared: ['vue', 'pinia']
63
+ })
64
+ ]
65
+ }
66
+ ```
67
+
68
+ #### 3. State Management Across MFEs
69
+ - **Avoid Global State if Possible:** Micro-frontends should ideally not share business state. Communicate via custom DOM events, URL parameters, or a thin Event Bus.
70
+ - **Shared Store (Pinia/Zustand):** If state sharing is absolutely required, the Host app should instantiate the store and share the dependency instance via Federation.
71
+
72
+ ### Best Practices
73
+ - **Strict Dependency Sharing:** Always mark core libraries (`react`, `react-dom`, `vue`, `vue-router`) as `singleton: true` and `shared` to prevent the browser from downloading and running multiple instances of the framework.
74
+ - **CSS Isolation:** Ensure CSS from one Micro-Frontend does not bleed into another. Use CSS Modules, scoped CSS, or Shadow DOM.
75
+ - **Independent Deployments:** The core value of MFE is that Team A can deploy the Remote App without requiring Team B to rebuild the Host App.
76
+
77
+ ---
78
+
79
+ ### Integration with Other Skills (MANDATORY)
80
+ This skill works best when combined with:
81
+ - `vue-frontend-expert` / `senior-frontend` — For building the individual micro-apps.
82
+ - `design-system-architect` — For ensuring all MFEs consume a shared, versioned UI component library.
83
+ - `monorepo-architect` — For managing the codebases of multiple MFEs in a single Turborepo/pnpm workspace.
84
+
85
+ ### Referenced By Orchestrators (MANDATORY)
86
+ - `brainstorming` — Add to "Architecture & Scale".
87
+ - `zero-to-prod-orchestrator` — Phase 2 (Architecture Strategy).
88
+
89
+ ---
90
+
91
+ <a name="bahasa-indonesia"></a>
92
+ ## Bahasa Indonesia
93
+
94
+ ### Deskripsi
95
+ Panduan arsitektur untuk memecah aplikasi frontend raksasa menjadi **Micro-Frontends (MFE)** yang terukur dan dapat di-deploy secara independen. Mencakup **Webpack Module Federation** dan **Vite Federation**.
96
+
97
+ ### Kondisi Pemicu
98
+ - Memecah aplikasi (monolith) Vue atau React menjadi beberapa sub-aplikasi.
99
+ - Mengkonfigurasi plugin *Module Federation*.
100
+ - Mencari cara untuk membagi *dependency* (seperti Vue atau React) agar tidak di-download dua kali oleh browser.
101
+
102
+ ### Panduan Singkat
103
+ - **Host vs Remote:** *Host* adalah cangkang (shell) utama aplikasi Anda, *Remote* adalah aplikasi kecil (fitur) yang dimuat oleh Host secara dinamis di runtime.
104
+ - **Berbagi Dependensi (Shared):** Sangat krusial! Pastikan framework utama (`vue`, `react`, `pinia`, `vue-router`) ditandai sebagai `shared` (dan seringkali `singleton`). Jika tidak, aplikasi akan error karena ada 2 instance Vue/React yang berjalan bersamaan.
105
+ - **Isolasi CSS:** Pastikan gaya CSS dari MFE A tidak merusak MFE B. Gunakan *CSS Modules* atau kapsulasi *Scoped CSS*.
106
+ - **Komunikasi Data:** Hindari penggunaan Global State (Redux/Pinia) lintas MFE jika memungkinkan. Gunakan *Custom Event Listener* di `window` atau passing props/URL untuk menjaga tiap MFE tetap independen.