@su-record/vibe 2.4.34 → 2.4.35

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 (102) hide show
  1. package/CLAUDE.md +345 -351
  2. package/LICENSE +21 -21
  3. package/README.md +210 -210
  4. package/agents/compounder.md +261 -261
  5. package/agents/diagrammer.md +178 -178
  6. package/agents/e2e-tester.md +266 -266
  7. package/agents/explorer.md +48 -48
  8. package/agents/implementer.md +53 -53
  9. package/agents/research/best-practices-agent.md +139 -139
  10. package/agents/research/codebase-patterns-agent.md +147 -147
  11. package/agents/research/framework-docs-agent.md +178 -178
  12. package/agents/research/security-advisory-agent.md +164 -164
  13. package/agents/review/architecture-reviewer.md +107 -107
  14. package/agents/review/complexity-reviewer.md +116 -116
  15. package/agents/review/data-integrity-reviewer.md +88 -88
  16. package/agents/review/git-history-reviewer.md +103 -103
  17. package/agents/review/performance-reviewer.md +86 -86
  18. package/agents/review/python-reviewer.md +150 -150
  19. package/agents/review/rails-reviewer.md +139 -139
  20. package/agents/review/react-reviewer.md +144 -144
  21. package/agents/review/security-reviewer.md +80 -80
  22. package/agents/review/simplicity-reviewer.md +140 -140
  23. package/agents/review/test-coverage-reviewer.md +116 -116
  24. package/agents/review/typescript-reviewer.md +127 -127
  25. package/agents/searcher.md +54 -54
  26. package/agents/simplifier.md +119 -119
  27. package/agents/tester.md +49 -49
  28. package/agents/ui-previewer.md +129 -129
  29. package/commands/vibe.analyze.md +260 -260
  30. package/commands/vibe.reason.md +223 -223
  31. package/commands/vibe.review.md +213 -213
  32. package/commands/vibe.run.md +931 -931
  33. package/commands/vibe.spec.md +442 -442
  34. package/commands/vibe.utils.md +101 -101
  35. package/commands/vibe.verify.md +282 -282
  36. package/dist/cli/collaborator.js +52 -52
  37. package/dist/cli/detect.js +32 -32
  38. package/dist/cli/index.js +137 -137
  39. package/dist/cli/index.js.map +1 -1
  40. package/dist/cli/llm.js +147 -147
  41. package/dist/cli/llm.js.map +1 -1
  42. package/dist/cli/setup.d.ts +1 -1
  43. package/dist/cli/setup.d.ts.map +1 -1
  44. package/dist/cli/setup.js +48 -54
  45. package/dist/cli/setup.js.map +1 -1
  46. package/dist/lib/MemoryManager.d.ts +4 -0
  47. package/dist/lib/MemoryManager.d.ts.map +1 -1
  48. package/dist/lib/MemoryManager.js +21 -2
  49. package/dist/lib/MemoryManager.js.map +1 -1
  50. package/dist/lib/PythonParser.js +108 -108
  51. package/dist/lib/gemini-api.d.ts +13 -3
  52. package/dist/lib/gemini-api.d.ts.map +1 -1
  53. package/dist/lib/gemini-api.js +198 -7
  54. package/dist/lib/gemini-api.js.map +1 -1
  55. package/dist/lib/gpt-api.d.ts +5 -4
  56. package/dist/lib/gpt-api.d.ts.map +1 -1
  57. package/dist/lib/gpt-api.js +168 -12
  58. package/dist/lib/gpt-api.js.map +1 -1
  59. package/dist/tools/memory/saveMemory.js +1 -1
  60. package/dist/tools/memory/saveMemory.js.map +1 -1
  61. package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
  62. package/hooks/hooks.json +195 -195
  63. package/languages/dart-flutter.md +509 -0
  64. package/languages/go.md +396 -0
  65. package/languages/java-spring.md +586 -0
  66. package/languages/kotlin-android.md +491 -0
  67. package/languages/python-django.md +371 -0
  68. package/languages/python-fastapi.md +386 -0
  69. package/languages/rust.md +425 -0
  70. package/languages/swift-ios.md +516 -0
  71. package/languages/typescript-nextjs.md +441 -0
  72. package/languages/typescript-node.md +375 -0
  73. package/languages/typescript-nuxt.md +521 -0
  74. package/languages/typescript-react-native.md +446 -0
  75. package/languages/typescript-react.md +525 -0
  76. package/languages/typescript-vue.md +353 -0
  77. package/package.json +88 -87
  78. package/skills/context7-usage.md +82 -82
  79. package/skills/git-worktree.md +181 -181
  80. package/skills/multi-llm-orchestration.md +92 -92
  81. package/skills/parallel-research.md +77 -77
  82. package/skills/priority-todos.md +239 -239
  83. package/skills/tool-fallback.md +126 -126
  84. package/skills/vibe-capabilities.md +129 -129
  85. package/{.claude/vibe → vibe}/config.json +3 -3
  86. package/{.claude/vibe → vibe}/constitution.md +184 -184
  87. package/{.claude/vibe → vibe}/rules/core/communication-guide.md +104 -104
  88. package/{.claude/vibe → vibe}/rules/core/development-philosophy.md +52 -52
  89. package/{.claude/vibe → vibe}/rules/core/quick-start.md +120 -120
  90. package/{.claude/vibe → vibe}/rules/quality/bdd-contract-testing.md +388 -388
  91. package/{.claude/vibe → vibe}/rules/quality/checklist.md +276 -276
  92. package/{.claude/vibe → vibe}/rules/quality/testing-strategy.md +437 -437
  93. package/{.claude/vibe → vibe}/rules/standards/anti-patterns.md +369 -369
  94. package/{.claude/vibe → vibe}/rules/standards/code-structure.md +291 -291
  95. package/{.claude/vibe → vibe}/rules/standards/complexity-metrics.md +312 -312
  96. package/{.claude/vibe → vibe}/rules/standards/naming-conventions.md +198 -198
  97. package/{.claude/vibe → vibe}/setup.sh +31 -31
  98. package/{.claude/vibe → vibe}/templates/constitution-template.md +184 -184
  99. package/{.claude/vibe → vibe}/templates/contract-backend-template.md +517 -517
  100. package/{.claude/vibe → vibe}/templates/contract-frontend-template.md +594 -594
  101. package/{.claude/vibe → vibe}/templates/feature-template.md +96 -96
  102. package/{.claude/vibe → vibe}/templates/spec-template.md +199 -199
@@ -0,0 +1,353 @@
1
+ # 🟢 TypeScript + Vue/Nuxt 품질 규칙
2
+
3
+ ## 핵심 원칙 (core에서 상속)
4
+
5
+ ```markdown
6
+ ✅ 단일 책임 (SRP)
7
+ ✅ 중복 제거 (DRY)
8
+ ✅ 재사용성
9
+ ✅ 낮은 복잡도
10
+ ✅ 함수 ≤ 30줄, Template ≤ 100줄
11
+ ✅ 중첩 ≤ 3단계
12
+ ✅ Cyclomatic complexity ≤ 10
13
+ ```
14
+
15
+ ## Vue 3 + TypeScript 특화 규칙
16
+
17
+ ### 1. Composition API 사용 (Options API 지양)
18
+
19
+ ```typescript
20
+ // ❌ Options API (레거시)
21
+ export default {
22
+ data() {
23
+ return { count: 0 };
24
+ },
25
+ methods: {
26
+ increment() {
27
+ this.count++;
28
+ }
29
+ }
30
+ };
31
+
32
+ // ✅ Composition API + script setup
33
+ <script setup lang="ts">
34
+ import { ref, computed, onMounted } from 'vue';
35
+
36
+ const count = ref(0);
37
+ const doubled = computed(() => count.value * 2);
38
+
39
+ function increment() {
40
+ count.value++;
41
+ }
42
+
43
+ onMounted(() => {
44
+ console.log('컴포넌트 마운트됨');
45
+ });
46
+ </script>
47
+ ```
48
+
49
+ ### 2. 타입 안전한 Props/Emits
50
+
51
+ ```typescript
52
+ // ✅ Props 타입 정의
53
+ interface Props {
54
+ userId: string;
55
+ title?: string;
56
+ items: Item[];
57
+ }
58
+
59
+ const props = withDefaults(defineProps<Props>(), {
60
+ title: '기본 제목',
61
+ });
62
+
63
+ // ✅ Emits 타입 정의
64
+ interface Emits {
65
+ (e: 'update', value: string): void;
66
+ (e: 'delete', id: number): void;
67
+ (e: 'select', item: Item): void;
68
+ }
69
+
70
+ const emit = defineEmits<Emits>();
71
+
72
+ // 사용
73
+ emit('update', '새 값');
74
+ emit('delete', 123);
75
+ ```
76
+
77
+ ### 3. Composables로 로직 분리
78
+
79
+ ```typescript
80
+ // ✅ composables/useUser.ts
81
+ import { ref, computed } from 'vue';
82
+ import type { User } from '@/types';
83
+
84
+ export function useUser(userId: string) {
85
+ const user = ref<User | null>(null);
86
+ const isLoading = ref(false);
87
+ const error = ref<string | null>(null);
88
+
89
+ const fullName = computed(() =>
90
+ user.value ? `${user.value.firstName} ${user.value.lastName}` : ''
91
+ );
92
+
93
+ async function fetchUser() {
94
+ isLoading.value = true;
95
+ error.value = null;
96
+ try {
97
+ const response = await api.getUser(userId);
98
+ user.value = response.data;
99
+ } catch (e) {
100
+ error.value = '사용자를 불러오지 못했습니다';
101
+ } finally {
102
+ isLoading.value = false;
103
+ }
104
+ }
105
+
106
+ return {
107
+ user,
108
+ isLoading,
109
+ error,
110
+ fullName,
111
+ fetchUser,
112
+ };
113
+ }
114
+
115
+ // 컴포넌트에서 사용
116
+ <script setup lang="ts">
117
+ const { user, isLoading, fetchUser } = useUser(props.userId);
118
+
119
+ onMounted(fetchUser);
120
+ </script>
121
+ ```
122
+
123
+ ### 4. Pinia 상태 관리
124
+
125
+ ```typescript
126
+ // ✅ stores/user.ts
127
+ import { defineStore } from 'pinia';
128
+ import type { User } from '@/types';
129
+
130
+ interface UserState {
131
+ currentUser: User | null;
132
+ users: User[];
133
+ isLoading: boolean;
134
+ }
135
+
136
+ export const useUserStore = defineStore('user', {
137
+ state: (): UserState => ({
138
+ currentUser: null,
139
+ users: [],
140
+ isLoading: false,
141
+ }),
142
+
143
+ getters: {
144
+ isLoggedIn: (state) => !!state.currentUser,
145
+ userCount: (state) => state.users.length,
146
+ },
147
+
148
+ actions: {
149
+ async login(email: string, password: string) {
150
+ this.isLoading = true;
151
+ try {
152
+ const user = await authApi.login(email, password);
153
+ this.currentUser = user;
154
+ } finally {
155
+ this.isLoading = false;
156
+ }
157
+ },
158
+
159
+ logout() {
160
+ this.currentUser = null;
161
+ },
162
+ },
163
+ });
164
+
165
+ // Setup Store 스타일 (권장)
166
+ export const useUserStore = defineStore('user', () => {
167
+ const currentUser = ref<User | null>(null);
168
+ const isLoggedIn = computed(() => !!currentUser.value);
169
+
170
+ async function login(email: string, password: string) {
171
+ currentUser.value = await authApi.login(email, password);
172
+ }
173
+
174
+ return { currentUser, isLoggedIn, login };
175
+ });
176
+ ```
177
+
178
+ ### 5. Nuxt 3 특화 규칙
179
+
180
+ ```typescript
181
+ // ✅ Server API Routes (server/api/)
182
+ // server/api/users/[id].get.ts
183
+ export default defineEventHandler(async (event) => {
184
+ const id = getRouterParam(event, 'id');
185
+
186
+ if (!id) {
187
+ throw createError({
188
+ statusCode: 400,
189
+ message: 'ID가 필요합니다',
190
+ });
191
+ }
192
+
193
+ const user = await prisma.user.findUnique({ where: { id } });
194
+
195
+ if (!user) {
196
+ throw createError({
197
+ statusCode: 404,
198
+ message: '사용자를 찾을 수 없습니다',
199
+ });
200
+ }
201
+
202
+ return user;
203
+ });
204
+
205
+ // ✅ useFetch / useAsyncData
206
+ <script setup lang="ts">
207
+ // SSR 지원 데이터 페칭
208
+ const { data: user, pending, error } = await useFetch<User>(
209
+ `/api/users/${props.userId}`
210
+ );
211
+
212
+ // 캐싱 키 지정
213
+ const { data: posts } = await useAsyncData(
214
+ `user-${props.userId}-posts`,
215
+ () => $fetch(`/api/users/${props.userId}/posts`)
216
+ );
217
+ </script>
218
+
219
+ // ✅ Middleware
220
+ // middleware/auth.ts
221
+ export default defineNuxtRouteMiddleware((to, from) => {
222
+ const { isLoggedIn } = useUserStore();
223
+
224
+ if (!isLoggedIn && to.path !== '/login') {
225
+ return navigateTo('/login');
226
+ }
227
+ });
228
+ ```
229
+
230
+ ### 6. 컴포넌트 구조
231
+
232
+ ```vue
233
+ <!-- ✅ 권장 컴포넌트 구조 -->
234
+ <script setup lang="ts">
235
+ // 1. 타입 import
236
+ import type { User, Item } from '@/types';
237
+
238
+ // 2. 컴포넌트 import
239
+ import UserAvatar from '@/components/UserAvatar.vue';
240
+
241
+ // 3. Props/Emits
242
+ interface Props {
243
+ user: User;
244
+ editable?: boolean;
245
+ }
246
+
247
+ const props = withDefaults(defineProps<Props>(), {
248
+ editable: false,
249
+ });
250
+
251
+ const emit = defineEmits<{
252
+ (e: 'update', user: User): void;
253
+ }>();
254
+
255
+ // 4. Composables
256
+ const { isLoading, save } = useUserForm();
257
+
258
+ // 5. Reactive state
259
+ const formData = ref({ ...props.user });
260
+ const isEditing = ref(false);
261
+
262
+ // 6. Computed
263
+ const canSave = computed(() =>
264
+ formData.value.name.length > 0 && !isLoading.value
265
+ );
266
+
267
+ // 7. Methods
268
+ async function handleSave() {
269
+ await save(formData.value);
270
+ emit('update', formData.value);
271
+ }
272
+
273
+ // 8. Lifecycle
274
+ onMounted(() => {
275
+ console.log('컴포넌트 준비됨');
276
+ });
277
+ </script>
278
+
279
+ <template>
280
+ <div class="user-card">
281
+ <UserAvatar :src="user.avatar" />
282
+ <h2>{{ user.name }}</h2>
283
+ <button
284
+ v-if="editable"
285
+ :disabled="!canSave"
286
+ @click="handleSave"
287
+ >
288
+ 저장
289
+ </button>
290
+ </div>
291
+ </template>
292
+
293
+ <style scoped>
294
+ .user-card {
295
+ padding: 1rem;
296
+ border-radius: 8px;
297
+ }
298
+ </style>
299
+ ```
300
+
301
+ ## 안티패턴
302
+
303
+ ```typescript
304
+ // ❌ v-if와 v-for 함께 사용
305
+ <li v-for="user in users" v-if="user.isActive">
306
+
307
+ // ✅ computed로 필터링
308
+ const activeUsers = computed(() => users.value.filter(u => u.isActive));
309
+ <li v-for="user in activeUsers">
310
+
311
+ // ❌ Props 직접 수정
312
+ props.user.name = '새 이름';
313
+
314
+ // ✅ emit으로 부모에게 알림
315
+ emit('update', { ...props.user, name: '새 이름' });
316
+
317
+ // ❌ $refs 남용
318
+ this.$refs.input.focus();
319
+
320
+ // ✅ template ref + expose
321
+ const inputRef = ref<HTMLInputElement>();
322
+ defineExpose({ focus: () => inputRef.value?.focus() });
323
+ ```
324
+
325
+ ## 파일 구조 (Nuxt 3)
326
+
327
+ ```
328
+ project/
329
+ ├── components/
330
+ │ ├── ui/ # 기본 UI 컴포넌트
331
+ │ ├── features/ # 기능별 컴포넌트
332
+ │ └── layouts/ # 레이아웃 컴포넌트
333
+ ├── composables/ # Composition 함수
334
+ ├── stores/ # Pinia 스토어
335
+ ├── server/
336
+ │ ├── api/ # API 라우트
337
+ │ ├── middleware/ # 서버 미들웨어
338
+ │ └── utils/ # 서버 유틸리티
339
+ ├── pages/ # 파일 기반 라우팅
340
+ ├── middleware/ # 클라이언트 미들웨어
341
+ ├── types/ # TypeScript 타입
342
+ └── utils/ # 유틸리티 함수
343
+ ```
344
+
345
+ ## 체크리스트
346
+
347
+ - [ ] Composition API + `<script setup>` 사용
348
+ - [ ] Props/Emits 타입 정의
349
+ - [ ] Composables로 로직 분리
350
+ - [ ] Pinia Setup Store 스타일 사용
351
+ - [ ] `any` 타입 사용 금지
352
+ - [ ] v-if/v-for 분리
353
+ - [ ] scoped 스타일 사용
package/package.json CHANGED
@@ -1,87 +1,88 @@
1
- {
2
- "name": "@su-record/vibe",
3
- "version": "2.4.34",
4
- "description": "Vibe - Claude Code exclusive SPEC-driven AI coding framework with 35+ integrated tools",
5
- "type": "module",
6
- "main": "dist/cli/index.js",
7
- "exports": {
8
- ".": "./dist/cli/index.js",
9
- "./tools": "./dist/tools/index.js",
10
- "./tools/memory": "./dist/tools/memory/index.js",
11
- "./tools/convention": "./dist/tools/convention/index.js",
12
- "./tools/semantic": "./dist/tools/semantic/index.js",
13
- "./tools/thinking": "./dist/tools/thinking/index.js",
14
- "./tools/planning": "./dist/tools/planning/index.js",
15
- "./tools/prompt": "./dist/tools/prompt/index.js",
16
- "./tools/ui": "./dist/tools/ui/index.js",
17
- "./tools/time": "./dist/tools/time/index.js",
18
- "./tools/reasoning": "./dist/tools/reasoning/index.js",
19
- "./tools/analytics": "./dist/tools/analytics/index.js",
20
- "./orchestrator": "./dist/orchestrator/index.js",
21
- "./lib/gpt": "./dist/lib/gpt-api.js",
22
- "./lib/gemini": "./dist/lib/gemini-api.js"
23
- },
24
- "bin": {
25
- "vibe": "./dist/cli/index.js"
26
- },
27
- "scripts": {
28
- "build": "tsc",
29
- "dev": "tsc --watch",
30
- "test": "vitest run",
31
- "test:watch": "vitest",
32
- "prepublishOnly": "npm run build"
33
- },
34
- "keywords": [
35
- "ai",
36
- "vibe",
37
- "coding",
38
- "spec-driven",
39
- "claude",
40
- "mcp",
41
- "framework",
42
- "requirements",
43
- "user-story",
44
- "ultrawork",
45
- "parallel-agents",
46
- "memory-management",
47
- "knowledge-graph",
48
- "code-analysis",
49
- "code-quality"
50
- ],
51
- "author": "Su",
52
- "license": "MIT",
53
- "repository": {
54
- "type": "git",
55
- "url": "https://github.com/su-record/vibe.git"
56
- },
57
- "homepage": "https://github.com/su-record/vibe#readme",
58
- "engines": {
59
- "node": ">=18.0.0"
60
- },
61
- "dependencies": {
62
- "@anthropic-ai/claude-agent-sdk": "^0.2.6",
63
- "@modelcontextprotocol/sdk": "^1.0.0",
64
- "better-sqlite3": "^12.4.1",
65
- "chalk": "^5.3.0",
66
- "glob": "^11.0.3",
67
- "ts-morph": "^26.0.0"
68
- },
69
- "devDependencies": {
70
- "@types/better-sqlite3": "^7.6.13",
71
- "@types/glob": "^8.1.0",
72
- "@types/node": "^22.0.0",
73
- "typescript": "^5.5.4",
74
- "vitest": "^4.0.9"
75
- },
76
- "files": [
77
- "dist/",
78
- ".claude/",
79
- "commands/",
80
- "agents/",
81
- "skills/",
82
- "hooks/",
83
- "CLAUDE.md",
84
- "README.md",
85
- "LICENSE"
86
- ]
87
- }
1
+ {
2
+ "name": "@su-record/vibe",
3
+ "version": "2.4.35",
4
+ "description": "Vibe - Claude Code exclusive SPEC-driven AI coding framework with 35+ integrated tools",
5
+ "type": "module",
6
+ "main": "dist/cli/index.js",
7
+ "exports": {
8
+ ".": "./dist/cli/index.js",
9
+ "./tools": "./dist/tools/index.js",
10
+ "./tools/memory": "./dist/tools/memory/index.js",
11
+ "./tools/convention": "./dist/tools/convention/index.js",
12
+ "./tools/semantic": "./dist/tools/semantic/index.js",
13
+ "./tools/thinking": "./dist/tools/thinking/index.js",
14
+ "./tools/planning": "./dist/tools/planning/index.js",
15
+ "./tools/prompt": "./dist/tools/prompt/index.js",
16
+ "./tools/ui": "./dist/tools/ui/index.js",
17
+ "./tools/time": "./dist/tools/time/index.js",
18
+ "./tools/reasoning": "./dist/tools/reasoning/index.js",
19
+ "./tools/analytics": "./dist/tools/analytics/index.js",
20
+ "./orchestrator": "./dist/orchestrator/index.js",
21
+ "./lib/gpt": "./dist/lib/gpt-api.js",
22
+ "./lib/gemini": "./dist/lib/gemini-api.js"
23
+ },
24
+ "bin": {
25
+ "vibe": "./dist/cli/index.js"
26
+ },
27
+ "scripts": {
28
+ "build": "tsc",
29
+ "dev": "tsc --watch",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest",
32
+ "prepublishOnly": "npm run build"
33
+ },
34
+ "keywords": [
35
+ "ai",
36
+ "vibe",
37
+ "coding",
38
+ "spec-driven",
39
+ "claude",
40
+ "mcp",
41
+ "framework",
42
+ "requirements",
43
+ "user-story",
44
+ "ultrawork",
45
+ "parallel-agents",
46
+ "memory-management",
47
+ "knowledge-graph",
48
+ "code-analysis",
49
+ "code-quality"
50
+ ],
51
+ "author": "Su",
52
+ "license": "MIT",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "https://github.com/su-record/vibe.git"
56
+ },
57
+ "homepage": "https://github.com/su-record/vibe#readme",
58
+ "engines": {
59
+ "node": ">=18.0.0"
60
+ },
61
+ "dependencies": {
62
+ "@anthropic-ai/claude-agent-sdk": "^0.2.6",
63
+ "@modelcontextprotocol/sdk": "^1.0.0",
64
+ "better-sqlite3": "^12.4.1",
65
+ "chalk": "^5.3.0",
66
+ "glob": "^11.0.3",
67
+ "ts-morph": "^26.0.0"
68
+ },
69
+ "devDependencies": {
70
+ "@types/better-sqlite3": "^7.6.13",
71
+ "@types/glob": "^8.1.0",
72
+ "@types/node": "^22.0.0",
73
+ "typescript": "^5.5.4",
74
+ "vitest": "^4.0.9"
75
+ },
76
+ "files": [
77
+ "dist/",
78
+ "vibe/",
79
+ "languages/",
80
+ "commands/",
81
+ "agents/",
82
+ "skills/",
83
+ "hooks/",
84
+ "CLAUDE.md",
85
+ "README.md",
86
+ "LICENSE"
87
+ ]
88
+ }
@@ -1,82 +1,82 @@
1
- ---
2
- description: Context7 MCP for latest library documentation. Auto-activates when docs, documentation, latest version, official docs, API reference, or library help is needed.
3
- ---
4
- # Context7 Usage
5
-
6
- Guide for searching latest library/framework documentation using Context7 MCP.
7
-
8
- ## When to Use
9
-
10
- | Situation | Example |
11
- |-----------|---------|
12
- | Latest API check | "React 19 use() hook usage" |
13
- | Version differences | "Next.js 15 changes" |
14
- | Official docs needed | "Prisma schema syntax" |
15
- | Migration guide | "Vue 2 → Vue 3 migration" |
16
-
17
- ## Usage (2 Steps)
18
-
19
- ### Step 1: Find Library ID
20
-
21
- ```
22
- mcp__context7__resolve-library-id({
23
- libraryName: "react"
24
- })
25
- ```
26
-
27
- Returns: `/facebook/react`, `/vercel/next.js`, etc.
28
-
29
- ### Step 2: Get Documentation
30
-
31
- ```
32
- mcp__context7__get-library-docs({
33
- context7CompatibleLibraryID: "/facebook/react",
34
- topic: "hooks" // optional: specific topic only
35
- })
36
- ```
37
-
38
- ## Common Library IDs
39
-
40
- | Library | Context7 ID |
41
- |---------|-------------|
42
- | React | /facebook/react |
43
- | Next.js | /vercel/next.js |
44
- | Vue | /vuejs/vue |
45
- | Svelte | /sveltejs/svelte |
46
- | Express | /expressjs/express |
47
- | Prisma | /prisma/prisma |
48
- | TypeScript | /microsoft/typescript |
49
-
50
- ## Search Tips
51
-
52
- ```
53
- # Broad search
54
- topic: omit → full documentation
55
-
56
- # Narrow search
57
- topic: "authentication" → auth related only
58
-
59
- # Specific feature
60
- topic: "server components" → server components only
61
- ```
62
-
63
- ## Web Search vs Context7
64
-
65
- | Aspect | Web Search | Context7 |
66
- |--------|------------|----------|
67
- | Speed | Slow | Fast |
68
- | Accuracy | Blogs mixed in | Official docs only |
69
- | Freshness | Variable | Always latest |
70
- | Reliability | Medium | High |
71
-
72
- **Prefer Context7 for library documentation**
73
-
74
- ## Fallback When Fails
75
-
76
- ```
77
- context7 fails
78
-
79
- Web Search for official docs
80
-
81
- gpt- [library question]
82
- ```
1
+ ---
2
+ description: Context7 MCP for latest library documentation. Auto-activates when docs, documentation, latest version, official docs, API reference, or library help is needed.
3
+ ---
4
+ # Context7 Usage
5
+
6
+ Guide for searching latest library/framework documentation using Context7 MCP.
7
+
8
+ ## When to Use
9
+
10
+ | Situation | Example |
11
+ |-----------|---------|
12
+ | Latest API check | "React 19 use() hook usage" |
13
+ | Version differences | "Next.js 15 changes" |
14
+ | Official docs needed | "Prisma schema syntax" |
15
+ | Migration guide | "Vue 2 → Vue 3 migration" |
16
+
17
+ ## Usage (2 Steps)
18
+
19
+ ### Step 1: Find Library ID
20
+
21
+ ```
22
+ mcp__context7__resolve-library-id({
23
+ libraryName: "react"
24
+ })
25
+ ```
26
+
27
+ Returns: `/facebook/react`, `/vercel/next.js`, etc.
28
+
29
+ ### Step 2: Get Documentation
30
+
31
+ ```
32
+ mcp__context7__get-library-docs({
33
+ context7CompatibleLibraryID: "/facebook/react",
34
+ topic: "hooks" // optional: specific topic only
35
+ })
36
+ ```
37
+
38
+ ## Common Library IDs
39
+
40
+ | Library | Context7 ID |
41
+ |---------|-------------|
42
+ | React | /facebook/react |
43
+ | Next.js | /vercel/next.js |
44
+ | Vue | /vuejs/vue |
45
+ | Svelte | /sveltejs/svelte |
46
+ | Express | /expressjs/express |
47
+ | Prisma | /prisma/prisma |
48
+ | TypeScript | /microsoft/typescript |
49
+
50
+ ## Search Tips
51
+
52
+ ```
53
+ # Broad search
54
+ topic: omit → full documentation
55
+
56
+ # Narrow search
57
+ topic: "authentication" → auth related only
58
+
59
+ # Specific feature
60
+ topic: "server components" → server components only
61
+ ```
62
+
63
+ ## Web Search vs Context7
64
+
65
+ | Aspect | Web Search | Context7 |
66
+ |--------|------------|----------|
67
+ | Speed | Slow | Fast |
68
+ | Accuracy | Blogs mixed in | Official docs only |
69
+ | Freshness | Variable | Always latest |
70
+ | Reliability | Medium | High |
71
+
72
+ **Prefer Context7 for library documentation**
73
+
74
+ ## Fallback When Fails
75
+
76
+ ```
77
+ context7 fails
78
+
79
+ Web Search for official docs
80
+
81
+ gpt- [library question]
82
+ ```