@jwdobeutechsolutions/dobeutech-claude-code-custom 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.
- package/CLAUDE.md +174 -0
- package/CONTRIBUTING.md +191 -0
- package/README.md +345 -0
- package/agents/accessibility-auditor.md +315 -0
- package/agents/api-designer.md +265 -0
- package/agents/architect.md +211 -0
- package/agents/build-error-resolver.md +532 -0
- package/agents/ci-cd-generator.md +318 -0
- package/agents/code-reviewer.md +104 -0
- package/agents/database-migrator.md +258 -0
- package/agents/deployment-manager.md +296 -0
- package/agents/doc-updater.md +452 -0
- package/agents/docker-specialist.md +293 -0
- package/agents/e2e-runner.md +708 -0
- package/agents/fullstack-architect.md +293 -0
- package/agents/infrastructure-engineer.md +297 -0
- package/agents/integration-tester.md +320 -0
- package/agents/performance-tester.md +243 -0
- package/agents/planner.md +119 -0
- package/agents/refactor-cleaner.md +306 -0
- package/agents/security-reviewer.md +545 -0
- package/agents/tdd-guide.md +280 -0
- package/agents/unit-test-generator.md +290 -0
- package/bin/claude-config.js +290 -0
- package/commands/api-design.md +55 -0
- package/commands/audit-accessibility.md +37 -0
- package/commands/audit-performance.md +38 -0
- package/commands/audit-security.md +43 -0
- package/commands/build-fix.md +29 -0
- package/commands/changelog.md +31 -0
- package/commands/code-review.md +40 -0
- package/commands/deploy.md +51 -0
- package/commands/docs-api.md +41 -0
- package/commands/e2e.md +363 -0
- package/commands/plan.md +113 -0
- package/commands/refactor-clean.md +28 -0
- package/commands/tdd.md +326 -0
- package/commands/test-coverage.md +27 -0
- package/commands/update-codemaps.md +17 -0
- package/commands/update-docs.md +31 -0
- package/hooks/hooks.json +121 -0
- package/mcp-configs/mcp-servers.json +163 -0
- package/package.json +53 -0
- package/rules/agents.md +49 -0
- package/rules/coding-style.md +70 -0
- package/rules/git-workflow.md +45 -0
- package/rules/hooks.md +46 -0
- package/rules/patterns.md +55 -0
- package/rules/performance.md +47 -0
- package/rules/security.md +36 -0
- package/rules/testing.md +30 -0
- package/scripts/install.js +254 -0
- package/skills/backend-patterns.md +582 -0
- package/skills/clickhouse-io.md +429 -0
- package/skills/coding-standards.md +520 -0
- package/skills/frontend-patterns.md +631 -0
- package/skills/project-guidelines-example.md +345 -0
- package/skills/security-review/SKILL.md +494 -0
- package/skills/tdd-workflow/SKILL.md +409 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# Project Guidelines Skill (Example)
|
|
2
|
+
|
|
3
|
+
This is an example of a project-specific skill. Use this as a template for your own projects.
|
|
4
|
+
|
|
5
|
+
Based on a real production application: [Zenith](https://zenith.chat) - AI-powered customer discovery platform.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
Reference this skill when working on the specific project it's designed for. Project skills contain:
|
|
12
|
+
- Architecture overview
|
|
13
|
+
- File structure
|
|
14
|
+
- Code patterns
|
|
15
|
+
- Testing requirements
|
|
16
|
+
- Deployment workflow
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Architecture Overview
|
|
21
|
+
|
|
22
|
+
**Tech Stack:**
|
|
23
|
+
- **Frontend**: Next.js 15 (App Router), TypeScript, React
|
|
24
|
+
- **Backend**: FastAPI (Python), Pydantic models
|
|
25
|
+
- **Database**: Supabase (PostgreSQL)
|
|
26
|
+
- **AI**: Claude API with tool calling and structured output
|
|
27
|
+
- **Deployment**: Google Cloud Run
|
|
28
|
+
- **Testing**: Playwright (E2E), pytest (backend), React Testing Library
|
|
29
|
+
|
|
30
|
+
**Services:**
|
|
31
|
+
```
|
|
32
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
33
|
+
│ Frontend │
|
|
34
|
+
│ Next.js 15 + TypeScript + TailwindCSS │
|
|
35
|
+
│ Deployed: Vercel / Cloud Run │
|
|
36
|
+
└─────────────────────────────────────────────────────────────┘
|
|
37
|
+
│
|
|
38
|
+
▼
|
|
39
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
40
|
+
│ Backend │
|
|
41
|
+
│ FastAPI + Python 3.11 + Pydantic │
|
|
42
|
+
│ Deployed: Cloud Run │
|
|
43
|
+
└─────────────────────────────────────────────────────────────┘
|
|
44
|
+
│
|
|
45
|
+
┌───────────────┼───────────────┐
|
|
46
|
+
▼ ▼ ▼
|
|
47
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
48
|
+
│ Supabase │ │ Claude │ │ Redis │
|
|
49
|
+
│ Database │ │ API │ │ Cache │
|
|
50
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## File Structure
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
project/
|
|
59
|
+
├── frontend/
|
|
60
|
+
│ └── src/
|
|
61
|
+
│ ├── app/ # Next.js app router pages
|
|
62
|
+
│ │ ├── api/ # API routes
|
|
63
|
+
│ │ ├── (auth)/ # Auth-protected routes
|
|
64
|
+
│ │ └── workspace/ # Main app workspace
|
|
65
|
+
│ ├── components/ # React components
|
|
66
|
+
│ │ ├── ui/ # Base UI components
|
|
67
|
+
│ │ ├── forms/ # Form components
|
|
68
|
+
│ │ └── layouts/ # Layout components
|
|
69
|
+
│ ├── hooks/ # Custom React hooks
|
|
70
|
+
│ ├── lib/ # Utilities
|
|
71
|
+
│ ├── types/ # TypeScript definitions
|
|
72
|
+
│ └── config/ # Configuration
|
|
73
|
+
│
|
|
74
|
+
├── backend/
|
|
75
|
+
│ ├── routers/ # FastAPI route handlers
|
|
76
|
+
│ ├── models.py # Pydantic models
|
|
77
|
+
│ ├── main.py # FastAPI app entry
|
|
78
|
+
│ ├── auth_system.py # Authentication
|
|
79
|
+
│ ├── database.py # Database operations
|
|
80
|
+
│ ├── services/ # Business logic
|
|
81
|
+
│ └── tests/ # pytest tests
|
|
82
|
+
│
|
|
83
|
+
├── deploy/ # Deployment configs
|
|
84
|
+
├── docs/ # Documentation
|
|
85
|
+
└── scripts/ # Utility scripts
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Code Patterns
|
|
91
|
+
|
|
92
|
+
### API Response Format (FastAPI)
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
from pydantic import BaseModel
|
|
96
|
+
from typing import Generic, TypeVar, Optional
|
|
97
|
+
|
|
98
|
+
T = TypeVar('T')
|
|
99
|
+
|
|
100
|
+
class ApiResponse(BaseModel, Generic[T]):
|
|
101
|
+
success: bool
|
|
102
|
+
data: Optional[T] = None
|
|
103
|
+
error: Optional[str] = None
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def ok(cls, data: T) -> "ApiResponse[T]":
|
|
107
|
+
return cls(success=True, data=data)
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
def fail(cls, error: str) -> "ApiResponse[T]":
|
|
111
|
+
return cls(success=False, error=error)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Frontend API Calls (TypeScript)
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
interface ApiResponse<T> {
|
|
118
|
+
success: boolean
|
|
119
|
+
data?: T
|
|
120
|
+
error?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async function fetchApi<T>(
|
|
124
|
+
endpoint: string,
|
|
125
|
+
options?: RequestInit
|
|
126
|
+
): Promise<ApiResponse<T>> {
|
|
127
|
+
try {
|
|
128
|
+
const response = await fetch(`/api${endpoint}`, {
|
|
129
|
+
...options,
|
|
130
|
+
headers: {
|
|
131
|
+
'Content-Type': 'application/json',
|
|
132
|
+
...options?.headers,
|
|
133
|
+
},
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
if (!response.ok) {
|
|
137
|
+
return { success: false, error: `HTTP ${response.status}` }
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return await response.json()
|
|
141
|
+
} catch (error) {
|
|
142
|
+
return { success: false, error: String(error) }
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Claude AI Integration (Structured Output)
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
from anthropic import Anthropic
|
|
151
|
+
from pydantic import BaseModel
|
|
152
|
+
|
|
153
|
+
class AnalysisResult(BaseModel):
|
|
154
|
+
summary: str
|
|
155
|
+
key_points: list[str]
|
|
156
|
+
confidence: float
|
|
157
|
+
|
|
158
|
+
async def analyze_with_claude(content: str) -> AnalysisResult:
|
|
159
|
+
client = Anthropic()
|
|
160
|
+
|
|
161
|
+
response = client.messages.create(
|
|
162
|
+
model="claude-sonnet-4-5-20250514",
|
|
163
|
+
max_tokens=1024,
|
|
164
|
+
messages=[{"role": "user", "content": content}],
|
|
165
|
+
tools=[{
|
|
166
|
+
"name": "provide_analysis",
|
|
167
|
+
"description": "Provide structured analysis",
|
|
168
|
+
"input_schema": AnalysisResult.model_json_schema()
|
|
169
|
+
}],
|
|
170
|
+
tool_choice={"type": "tool", "name": "provide_analysis"}
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# Extract tool use result
|
|
174
|
+
tool_use = next(
|
|
175
|
+
block for block in response.content
|
|
176
|
+
if block.type == "tool_use"
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
return AnalysisResult(**tool_use.input)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Custom Hooks (React)
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
import { useState, useCallback } from 'react'
|
|
186
|
+
|
|
187
|
+
interface UseApiState<T> {
|
|
188
|
+
data: T | null
|
|
189
|
+
loading: boolean
|
|
190
|
+
error: string | null
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function useApi<T>(
|
|
194
|
+
fetchFn: () => Promise<ApiResponse<T>>
|
|
195
|
+
) {
|
|
196
|
+
const [state, setState] = useState<UseApiState<T>>({
|
|
197
|
+
data: null,
|
|
198
|
+
loading: false,
|
|
199
|
+
error: null,
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
const execute = useCallback(async () => {
|
|
203
|
+
setState(prev => ({ ...prev, loading: true, error: null }))
|
|
204
|
+
|
|
205
|
+
const result = await fetchFn()
|
|
206
|
+
|
|
207
|
+
if (result.success) {
|
|
208
|
+
setState({ data: result.data!, loading: false, error: null })
|
|
209
|
+
} else {
|
|
210
|
+
setState({ data: null, loading: false, error: result.error! })
|
|
211
|
+
}
|
|
212
|
+
}, [fetchFn])
|
|
213
|
+
|
|
214
|
+
return { ...state, execute }
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Testing Requirements
|
|
221
|
+
|
|
222
|
+
### Backend (pytest)
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Run all tests
|
|
226
|
+
poetry run pytest tests/
|
|
227
|
+
|
|
228
|
+
# Run with coverage
|
|
229
|
+
poetry run pytest tests/ --cov=. --cov-report=html
|
|
230
|
+
|
|
231
|
+
# Run specific test file
|
|
232
|
+
poetry run pytest tests/test_auth.py -v
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Test structure:**
|
|
236
|
+
```python
|
|
237
|
+
import pytest
|
|
238
|
+
from httpx import AsyncClient
|
|
239
|
+
from main import app
|
|
240
|
+
|
|
241
|
+
@pytest.fixture
|
|
242
|
+
async def client():
|
|
243
|
+
async with AsyncClient(app=app, base_url="http://test") as ac:
|
|
244
|
+
yield ac
|
|
245
|
+
|
|
246
|
+
@pytest.mark.asyncio
|
|
247
|
+
async def test_health_check(client: AsyncClient):
|
|
248
|
+
response = await client.get("/health")
|
|
249
|
+
assert response.status_code == 200
|
|
250
|
+
assert response.json()["status"] == "healthy"
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Frontend (React Testing Library)
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# Run tests
|
|
257
|
+
npm run test
|
|
258
|
+
|
|
259
|
+
# Run with coverage
|
|
260
|
+
npm run test -- --coverage
|
|
261
|
+
|
|
262
|
+
# Run E2E tests
|
|
263
|
+
npm run test:e2e
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Test structure:**
|
|
267
|
+
```typescript
|
|
268
|
+
import { render, screen, fireEvent } from '@testing-library/react'
|
|
269
|
+
import { WorkspacePanel } from './WorkspacePanel'
|
|
270
|
+
|
|
271
|
+
describe('WorkspacePanel', () => {
|
|
272
|
+
it('renders workspace correctly', () => {
|
|
273
|
+
render(<WorkspacePanel />)
|
|
274
|
+
expect(screen.getByRole('main')).toBeInTheDocument()
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
it('handles session creation', async () => {
|
|
278
|
+
render(<WorkspacePanel />)
|
|
279
|
+
fireEvent.click(screen.getByText('New Session'))
|
|
280
|
+
expect(await screen.findByText('Session created')).toBeInTheDocument()
|
|
281
|
+
})
|
|
282
|
+
})
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Deployment Workflow
|
|
288
|
+
|
|
289
|
+
### Pre-Deployment Checklist
|
|
290
|
+
|
|
291
|
+
- [ ] All tests passing locally
|
|
292
|
+
- [ ] `npm run build` succeeds (frontend)
|
|
293
|
+
- [ ] `poetry run pytest` passes (backend)
|
|
294
|
+
- [ ] No hardcoded secrets
|
|
295
|
+
- [ ] Environment variables documented
|
|
296
|
+
- [ ] Database migrations ready
|
|
297
|
+
|
|
298
|
+
### Deployment Commands
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
# Build and deploy frontend
|
|
302
|
+
cd frontend && npm run build
|
|
303
|
+
gcloud run deploy frontend --source .
|
|
304
|
+
|
|
305
|
+
# Build and deploy backend
|
|
306
|
+
cd backend
|
|
307
|
+
gcloud run deploy backend --source .
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Environment Variables
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Frontend (.env.local)
|
|
314
|
+
NEXT_PUBLIC_API_URL=https://api.example.com
|
|
315
|
+
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
|
|
316
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
|
|
317
|
+
|
|
318
|
+
# Backend (.env)
|
|
319
|
+
DATABASE_URL=postgresql://...
|
|
320
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
321
|
+
SUPABASE_URL=https://xxx.supabase.co
|
|
322
|
+
SUPABASE_KEY=eyJ...
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Critical Rules
|
|
328
|
+
|
|
329
|
+
1. **No emojis** in code, comments, or documentation
|
|
330
|
+
2. **Immutability** - never mutate objects or arrays
|
|
331
|
+
3. **TDD** - write tests before implementation
|
|
332
|
+
4. **80% coverage** minimum
|
|
333
|
+
5. **Many small files** - 200-400 lines typical, 800 max
|
|
334
|
+
6. **No console.log** in production code
|
|
335
|
+
7. **Proper error handling** with try/catch
|
|
336
|
+
8. **Input validation** with Pydantic/Zod
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Related Skills
|
|
341
|
+
|
|
342
|
+
- `coding-standards.md` - General coding best practices
|
|
343
|
+
- `backend-patterns.md` - API and database patterns
|
|
344
|
+
- `frontend-patterns.md` - React and Next.js patterns
|
|
345
|
+
- `tdd-workflow/` - Test-driven development methodology
|