Skip to main content

project-guidelines-example

Project-specific skill template covering architecture, patterns, testing, and deployment guidance.

Source facts

Repository
affaan-m/ECC
Last source activity
August 11, 2026 at 23:36
Detected SKILL.md language
Japanese
Stars
279,616
Forks
41,604

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
project-guidelines-example
description
Project-specific skill template covering architecture, patterns, testing, and deployment guidance.
metadata
{"origin":"ECC"}
# ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใ‚ฌใ‚คใƒ‰ใƒฉใ‚คใƒณใ‚นใ‚ญใƒซ๏ผˆไพ‹๏ผ‰ ใ“ใ‚Œใฏใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆๅ›บๆœ‰ใฎใ‚นใ‚ญใƒซใฎไพ‹ใงใ™ใ€‚่‡ชๅˆ†ใฎใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใฎใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆใจใ—ใฆไฝฟ็”จใ—ใฆใใ ใ•ใ„ใ€‚ ๅฎŸ้š›ใฎๆœฌ็•ชใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใซๅŸบใฅใ„ใฆใ„ใพใ™๏ผš[Zenith](https://zenith.chat) - AI้ง†ๅ‹•ใฎ้กงๅฎข็™บ่ฆ‹ใƒ—ใƒฉใƒƒใƒˆใƒ•ใ‚ฉใƒผใƒ ใ€‚ --- ## ไฝฟ็”จใ™ใ‚‹ใ‚ฟใ‚คใƒŸใƒณใ‚ฐ ใ“ใฎใ‚นใ‚ญใƒซใŒ่จญ่จˆใ•ใ‚ŒใŸ็‰นๅฎšใฎใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใงไฝœๆฅญใ™ใ‚‹้š›ใซๅ‚็…งใ—ใฆใใ ใ•ใ„ใ€‚ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใ‚นใ‚ญใƒซใซใฏไปฅไธ‹ใŒๅซใพใ‚Œใพใ™๏ผš - ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใฎๆฆ‚่ฆ - ใƒ•ใ‚กใ‚คใƒซๆง‹้€  - ใ‚ณใƒผใƒ‰ใƒ‘ใ‚ฟใƒผใƒณ - ใƒ†ใ‚นใƒˆ่ฆไปถ - ใƒ‡ใƒ—ใƒญใ‚คใƒกใƒณใƒˆใƒฏใƒผใ‚ฏใƒ•ใƒญใƒผ --- ## ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใฎๆฆ‚่ฆ **ๆŠ€่ก“ใ‚นใ‚ฟใƒƒใ‚ฏ๏ผš** - **ใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰**: Next.js 15 (App Router), TypeScript, React - **ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰**: FastAPI (Python), Pydanticใƒขใƒ‡ใƒซ - **ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚น**: Supabase (PostgreSQL) - **AI**: Claudeใƒ„ใƒผใƒซๅ‘ผใณๅ‡บใ—ใจๆง‹้€ ๅŒ–ๅ‡บๅŠ›ไป˜ใAPI - **ใƒ‡ใƒ—ใƒญใ‚คใƒกใƒณใƒˆ**: Google Cloud Run - **ใƒ†ใ‚นใƒˆ**: Playwright (E2E), pytest (ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰), React Testing Library **ใ‚ตใƒผใƒ“ใ‚น๏ผš** ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Frontend โ”‚ โ”‚ Next.js 15 + TypeScript + TailwindCSS โ”‚ โ”‚ Deployed: Vercel / Cloud Run โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Backend โ”‚ โ”‚ FastAPI + Python 3.11 + Pydantic โ”‚ โ”‚ Deployed: Cloud Run โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ–ผ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Supabase โ”‚ โ”‚ Claude โ”‚ โ”‚ Redis โ”‚ โ”‚ Database โ”‚ โ”‚ API โ”‚ โ”‚ Cache โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` --- ## ใƒ•ใ‚กใ‚คใƒซๆง‹้€  ``` project/ โ”œโ”€โ”€ frontend/ โ”‚ โ””โ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ app/ # Next.js app routerใƒšใƒผใ‚ธ โ”‚ โ”‚ โ”œโ”€โ”€ api/ # APIใƒซใƒผใƒˆ โ”‚ โ”‚ โ”œโ”€โ”€ (auth)/ # ่ช่จผไฟ่ญทใ•ใ‚ŒใŸใƒซใƒผใƒˆ โ”‚ โ”‚ โ””โ”€โ”€ workspace/ # ใƒกใ‚คใƒณใ‚ขใƒ—ใƒชใƒฏใƒผใ‚ฏใ‚นใƒšใƒผใ‚น โ”‚ โ”œโ”€โ”€ components/ # Reactใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ โ”‚ โ”‚ โ”œโ”€โ”€ ui/ # ใƒ™ใƒผใ‚นUIใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ โ”‚ โ”‚ โ”œโ”€โ”€ forms/ # ใƒ•ใ‚ฉใƒผใƒ ใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ โ”‚ โ”‚ โ””โ”€โ”€ layouts/ # ใƒฌใ‚คใ‚ขใ‚ฆใƒˆใ‚ณใƒณใƒใƒผใƒใƒณใƒˆ โ”‚ โ”œโ”€โ”€ hooks/ # ใ‚ซใ‚นใ‚ฟใƒ Reactใƒ•ใƒƒใ‚ฏ โ”‚ โ”œโ”€โ”€ lib/ # ใƒฆใƒผใƒ†ใ‚ฃใƒชใƒ†ใ‚ฃ โ”‚ โ”œโ”€โ”€ types/ # TypeScriptๅฎš็พฉ โ”‚ โ””โ”€โ”€ config/ # ่จญๅฎš โ”‚ โ”œโ”€โ”€ backend/ โ”‚ โ”œโ”€โ”€ routers/ # FastAPIใƒซใƒผใƒˆใƒใƒณใƒ‰ใƒฉ โ”‚ โ”œโ”€โ”€ models.py # Pydanticใƒขใƒ‡ใƒซ โ”‚ โ”œโ”€โ”€ main.py # FastAPIใ‚ขใƒ—ใƒชใ‚จใƒณใƒˆใƒช โ”‚ โ”œโ”€โ”€ auth_system.py # ่ช่จผ โ”‚ โ”œโ”€โ”€ database.py # ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นๆ“ไฝœ โ”‚ โ”œโ”€โ”€ services/ # ใƒ“ใ‚ธใƒใ‚นใƒญใ‚ธใƒƒใ‚ฏ โ”‚ โ””โ”€โ”€ tests/ # pytestใƒ†ใ‚นใƒˆ โ”‚ โ”œโ”€โ”€ deploy/ # ใƒ‡ใƒ—ใƒญใ‚คใƒกใƒณใƒˆ่จญๅฎš โ”œโ”€โ”€ docs/ # ใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆ โ””โ”€โ”€ scripts/ # ใƒฆใƒผใƒ†ใ‚ฃใƒชใƒ†ใ‚ฃใ‚นใ‚ฏใƒชใƒ—ใƒˆ ``` --- ## ใ‚ณใƒผใƒ‰ใƒ‘ใ‚ฟใƒผใƒณ ### APIใƒฌใ‚นใƒใƒณใ‚นๅฝขๅผ (FastAPI) ```python from pydantic import BaseModel from typing import Generic, TypeVar, Optional T = TypeVar('T') class ApiResponse(BaseModel, Generic[T]): success: bool data: Optional[T] = None error: Optional[str] = None @classmethod def ok(cls, data: T) -> "ApiResponse[T]": return cls(success=True, data=data) @classmethod def fail(cls, error: str) -> "ApiResponse[T]": return cls(success=False, error=error) ``` ### ใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰APIๅ‘ผใณๅ‡บใ— (TypeScript) ```typescript interface ApiResponse<T> { success: boolean data?: T error?: string } async function fetchApi<T>( endpoint: string, options?: RequestInit ): Promise<ApiResponse<T>> { try { const response = await fetch(`/api${endpoint}`, { ...options, headers: { 'Content-Type': 'application/json', ...options?.headers, }, }) if (!response.ok) { return { success: false, error: `HTTP ${response.status}` } } return await response.json() } catch (error) { return { success: false, error: String(error) } } } ``` ### Claude AI็ตฑๅˆ๏ผˆๆง‹้€ ๅŒ–ๅ‡บๅŠ›๏ผ‰ ```python from anthropic import Anthropic from pydantic import BaseModel class AnalysisResult(BaseModel): summary: str key_points: list[str] confidence: float async def analyze_with_claude(content: str) -> AnalysisResult: client = Anthropic() response = client.messages.create( model="claude-sonnet-5", max_tokens=1024, messages=[{"role": "user", "content": content}], tools=[{ "name": "provide_analysis", "description": "Provide structured analysis", "input_schema": AnalysisResult.model_json_schema() }], tool_choice={"type": "tool", "name": "provide_analysis"} ) # Extract tool use result tool_use = next( block for block in response.content if block.type == "tool_use" ) return AnalysisResult(**tool_use.input) ``` ### ใ‚ซใ‚นใ‚ฟใƒ ใƒ•ใƒƒใ‚ฏ (React) ```typescript import { useState, useCallback } from 'react' interface UseApiState<T> { data: T | null loading: boolean error: string | null } export function useApi<T>( fetchFn: () => Promise<ApiResponse<T>> ) { const [state, setState] = useState<UseApiState<T>>({ data: null, loading: false, error: null, }) const execute = useCallback(async () => { setState(prev => ({ ...prev, loading: true, error: null })) const result = await fetchFn() if (result.success) { setState({ data: result.data!, loading: false, error: null }) } else { setState({ data: null, loading: false, error: result.error! }) } }, [fetchFn]) return { ...state, execute } } ``` --- ## ใƒ†ใ‚นใƒˆ่ฆไปถ ### ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ (pytest) ```bash # ใ™ในใฆใฎใƒ†ใ‚นใƒˆใ‚’ๅฎŸ่กŒ poetry run pytest tests/ # ใ‚ซใƒใƒฌใƒƒใ‚ธไป˜ใใงๅฎŸ่กŒ poetry run pytest tests/ --cov=. --cov-report=html # ็‰นๅฎšใฎใƒ†ใ‚นใƒˆใƒ•ใ‚กใ‚คใƒซใ‚’ๅฎŸ่กŒ poetry run pytest tests/test_auth.py -v ``` **ใƒ†ใ‚นใƒˆๆง‹้€ ๏ผš** ```python import pytest from httpx import AsyncClient from main import app @pytest.fixture async def client(): async with AsyncClient(app=app, base_url="http://test") as ac: yield ac @pytest.mark.asyncio async def test_health_check(client: AsyncClient): response = await client.get("/health") assert response.status_code == 200 assert response.json()["status"] == "healthy" ``` ### ใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰ (React Testing Library) ```bash # ใƒ†ใ‚นใƒˆใ‚’ๅฎŸ่กŒ npm run test # ใ‚ซใƒใƒฌใƒƒใ‚ธไป˜ใใงๅฎŸ่กŒ npm run test -- --coverage # E2Eใƒ†ใ‚นใƒˆใ‚’ๅฎŸ่กŒ npm run test:e2e ``` **ใƒ†ใ‚นใƒˆๆง‹้€ ๏ผš** ```typescript import { render, screen, fireEvent } from '@testing-library/react' import { WorkspacePanel } from './WorkspacePanel' describe('WorkspacePanel', () => { it('renders workspace correctly', () => { render(<WorkspacePanel />) expect(screen.getByRole('main')).toBeInTheDocument() }) it('handles session creation', async () => { render(<WorkspacePanel />) fireEvent.click(screen.getByText('New Session')) expect(await screen.findByText('Session created')).toBeInTheDocument() }) }) ``` --- ## ใƒ‡ใƒ—ใƒญใ‚คใƒกใƒณใƒˆใƒฏใƒผใ‚ฏใƒ•ใƒญใƒผ ### ใƒ‡ใƒ—ใƒญใ‚คๅ‰ใƒใ‚งใƒƒใ‚ฏใƒชใ‚นใƒˆ - [ ] ใ™ในใฆใฎใƒ†ใ‚นใƒˆใŒใƒญใƒผใ‚ซใƒซใงๆˆๅŠŸ - [ ] `npm run build` ใŒๆˆๅŠŸ๏ผˆใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰๏ผ‰ - [ ] `poetry run pytest` ใŒๆˆๅŠŸ๏ผˆใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰๏ผ‰ - [ ] ใƒใƒผใƒ‰ใ‚ณใƒผใƒ‰ใ•ใ‚ŒใŸใ‚ทใƒผใ‚ฏใƒฌใƒƒใƒˆใชใ— - [ ] ็’ฐๅขƒๅค‰ๆ•ฐใŒใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆๅŒ–ใ•ใ‚Œใฆใ„ใ‚‹ - [ ] ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใƒžใ‚คใ‚ฐใƒฌใƒผใ‚ทใƒงใƒณใŒๆบ–ๅ‚™ใ•ใ‚Œใฆใ„ใ‚‹ ### ใƒ‡ใƒ—ใƒญใ‚คใƒกใƒณใƒˆใ‚ณใƒžใƒณใƒ‰ ```bash # ใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰ใฎใƒ“ใƒซใƒ‰ใจใƒ‡ใƒ—ใƒญใ‚ค cd frontend && npm run build gcloud run deploy frontend --source . # ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ใฎใƒ“ใƒซใƒ‰ใจใƒ‡ใƒ—ใƒญใ‚ค cd backend gcloud run deploy backend --source . ``` ### ็’ฐๅขƒๅค‰ๆ•ฐ ```bash # ใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰ (.env.local) NEXT_PUBLIC_API_URL=https://api.example.com NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ... # ใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ (.env) DATABASE_URL=postgresql://... ANTHROPIC_API_KEY=sk-ant-... SUPABASE_URL=https://xxx.supabase.co SUPABASE_KEY=eyJ... ``` --- ## ้‡่ฆใชใƒซใƒผใƒซ 1. **็ตตๆ–‡ๅญ—ใชใ—** - ใ‚ณใƒผใƒ‰ใ€ใ‚ณใƒกใƒณใƒˆใ€ใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใซ็ตตๆ–‡ๅญ—ใ‚’ไฝฟ็”จใ—ใชใ„ 2. **ไธๅค‰ๆ€ง** - ใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใ‚„้…ๅˆ—ใ‚’ๅค‰ๆ›ดใ—ใชใ„ 3. **TDD** - ๅฎŸ่ฃ…ๅ‰ใซใƒ†ใ‚นใƒˆใ‚’ๆ›ธใ 4. **80%ใ‚ซใƒใƒฌใƒƒใ‚ธ** - ๆœ€ไฝŽๅŸบๆบ– 5. **ๅฐใ•ใชใƒ•ใ‚กใ‚คใƒซๅคšๆ•ฐ** - ้€šๅธธ200-400่กŒใ€ๆœ€ๅคง800่กŒ 6. **console.log็ฆๆญข** - ๆœฌ็•ชใ‚ณใƒผใƒ‰ใซใฏไฝฟ็”จใ—ใชใ„ 7. **้ฉๅˆ‡ใชใ‚จใƒฉใƒผๅ‡ฆ็†** - try/catchใ‚’ไฝฟ็”จ 8. **ๅ…ฅๅŠ›ๆคœ่จผ** - Pydantic/Zodใ‚’ไฝฟ็”จ --- ## ้–ข้€ฃใ‚นใ‚ญใƒซ - `coding-standards.md` - ไธ€่ˆฌ็š„ใชใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใƒ™ใ‚นใƒˆใƒ—ใƒฉใ‚ฏใƒ†ใ‚ฃใ‚น - `backend-patterns.md` - APIใจใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใƒ‘ใ‚ฟใƒผใƒณ - `frontend-patterns.md` - ReactใจNext.jsใƒ‘ใ‚ฟใƒผใƒณ - `tdd-workflow/` - ใƒ†ใ‚นใƒˆ้ง†ๅ‹•้–‹็™บใฎๆ–นๆณ•่ซ–
View on GitHub