[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-bd862557-410f-427a-8ac0-f2c864f07f96":3,"$fBCvszLT0ZHo6n9fKNJJ3dN5_c-Ytdcjcu03J-B0mOsM":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"bd862557-410f-427a-8ac0-f2c864f07f96","cc-skill-project-guidelines-example","项目指南技能（示例）","cat_life_career","mod_other","sickn33,other","---\nname: cc-skill-project-guidelines-example\ndescription: \"Project Guidelines Skill (Example)\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Project Guidelines Skill (Example)\n\nThis is an example of a project-specific skill. Use this as a template for your own projects.\n\nBased on a real production application: [Zenith](https:\u002F\u002Fzenith.chat) - AI-powered customer discovery platform.\n\n---\n\n## When to Use\nReference this skill when working on the specific project it's designed for. Project skills contain:\n- Architecture overview\n- File structure\n- Code patterns\n- Testing requirements\n- Deployment workflow\n\n---\n\n## Architecture Overview\n\n**Tech Stack:**\n- **Frontend**: Next.js 15 (App Router), TypeScript, React\n- **Backend**: FastAPI (Python), Pydantic models\n- **Database**: Supabase (PostgreSQL)\n- **AI**: Claude API with tool calling and structured output\n- **Deployment**: Google Cloud Run\n- **Testing**: Playwright (E2E), pytest (backend), React Testing Library\n\n**Services:**\n```\n┌─────────────────────────────────────────────────────────────┐\n│                         Frontend                            │\n│  Next.js 15 + TypeScript + TailwindCSS                     │\n│  Deployed: Vercel \u002F Cloud Run                              │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                         Backend                             │\n│  FastAPI + Python 3.11 + Pydantic                          │\n│  Deployed: Cloud Run                                       │\n└─────────────────────────────────────────────────────────────┘\n                              │\n              ┌───────────────┼───────────────┐\n              ▼               ▼               ▼\n        ┌──────────┐   ┌──────────┐   ┌──────────┐\n        │ Supabase │   │  Claude  │   │  Redis   │\n        │ Database │   │   API    │   │  Cache   │\n        └──────────┘   └──────────┘   └──────────┘\n```\n\n---\n\n## File Structure\n\n```\nproject\u002F\n├── frontend\u002F\n│   └── src\u002F\n│       ├── app\u002F              # Next.js app router pages\n│       │   ├── api\u002F          # API routes\n│       │   ├── (auth)\u002F       # Auth-protected routes\n│       │   └── workspace\u002F    # Main app workspace\n│       ├── components\u002F       # React components\n│       │   ├── ui\u002F           # Base UI components\n│       │   ├── forms\u002F        # Form components\n│       │   └── layouts\u002F      # Layout components\n│       ├── hooks\u002F            # Custom React hooks\n│       ├── lib\u002F              # Utilities\n│       ├── types\u002F            # TypeScript definitions\n│       └── config\u002F           # Configuration\n│\n├── backend\u002F\n│   ├── routers\u002F              # FastAPI route handlers\n│   ├── models.py             # Pydantic models\n│   ├── main.py               # FastAPI app entry\n│   ├── auth_system.py        # Authentication\n│   ├── database.py           # Database operations\n│   ├── services\u002F             # Business logic\n│   └── tests\u002F                # pytest tests\n│\n├── deploy\u002F                   # Deployment configs\n├── docs\u002F                     # Documentation\n└── scripts\u002F                  # Utility scripts\n```\n\n---\n\n## Code Patterns\n\n### API Response Format (FastAPI)\n\n```python\nfrom pydantic import BaseModel\nfrom typing import Generic, TypeVar, Optional\n\nT = TypeVar('T')\n\nclass ApiResponse(BaseModel, Generic[T]):\n    success: bool\n    data: Optional[T] = None\n    error: Optional[str] = None\n\n    @classmethod\n    def ok(cls, data: T) -> \"ApiResponse[T]\":\n        return cls(success=True, data=data)\n\n    @classmethod\n    def fail(cls, error: str) -> \"ApiResponse[T]\":\n        return cls(success=False, error=error)\n```\n\n### Frontend API Calls (TypeScript)\n\n```typescript\ninterface ApiResponse\u003CT> {\n  success: boolean\n  data?: T\n  error?: string\n}\n\nasync function fetchApi\u003CT>(\n  endpoint: string,\n  options?: RequestInit\n): Promise\u003CApiResponse\u003CT>> {\n  try {\n    const response = await fetch(`\u002Fapi${endpoint}`, {\n      ...options,\n      headers: {\n        'Content-Type': 'application\u002Fjson',\n        ...options?.headers,\n      },\n    })\n\n    if (!response.ok) {\n      return { success: false, error: `HTTP ${response.status}` }\n    }\n\n    return await response.json()\n  } catch (error) {\n    return { success: false, error: String(error) }\n  }\n}\n```\n\n### Claude AI Integration (Structured Output)\n\n```python\nfrom anthropic import Anthropic\nfrom pydantic import BaseModel\n\nclass AnalysisResult(BaseModel):\n    summary: str\n    key_points: list[str]\n    confidence: float\n\nasync def analyze_with_claude(content: str) -> AnalysisResult:\n    client = Anthropic()\n\n    response = client.messages.create(\n        model=\"claude-sonnet-4-5-20250514\",\n        max_tokens=1024,\n        messages=[{\"role\": \"user\", \"content\": content}],\n        tools=[{\n            \"name\": \"provide_analysis\",\n            \"description\": \"Provide structured analysis\",\n            \"input_schema\": AnalysisResult.model_json_schema()\n        }],\n        tool_choice={\"type\": \"tool\", \"name\": \"provide_analysis\"}\n    )\n\n    # Extract tool use result\n    tool_use = next(\n        block for block in response.content\n        if block.type == \"tool_use\"\n    )\n\n    return AnalysisResult(**tool_use.input)\n```\n\n### Custom Hooks (React)\n\n```typescript\nimport { useState, useCallback } from 'react'\n\ninterface UseApiState\u003CT> {\n  data: T | null\n  loading: boolean\n  error: string | null\n}\n\nexport function useApi\u003CT>(\n  fetchFn: () => Promise\u003CApiResponse\u003CT>>\n) {\n  const [state, setState] = useState\u003CUseApiState\u003CT>>({\n    data: null,\n    loading: false,\n    error: null,\n  })\n\n  const execute = useCallback(async () => {\n    setState(prev => ({ ...prev, loading: true, error: null }))\n\n    const result = await fetchFn()\n\n    if (result.success) {\n      setState({ data: result.data!, loading: false, error: null })\n    } else {\n      setState({ data: null, loading: false, error: result.error! })\n    }\n  }, [fetchFn])\n\n  return { ...state, execute }\n}\n```\n\n---\n\n## Testing Requirements\n\n### Backend (pytest)\n\n```bash\n# Run all tests\npoetry run pytest tests\u002F\n\n# Run with coverage\npoetry run pytest tests\u002F --cov=. --cov-report=html\n\n# Run specific test file\npoetry run pytest tests\u002Ftest_auth.py -v\n```\n\n**Test structure:**\n```python\nimport pytest\nfrom httpx import AsyncClient\nfrom main import app\n\n@pytest.fixture\nasync def client():\n    async with AsyncClient(app=app, base_url=\"http:\u002F\u002Ftest\") as ac:\n        yield ac\n\n@pytest.mark.asyncio\nasync def test_health_check(client: AsyncClient):\n    response = await client.get(\"\u002Fhealth\")\n    assert response.status_code == 200\n    assert response.json()[\"status\"] == \"healthy\"\n```\n\n### Frontend (React Testing Library)\n\n```bash\n# Run tests\nnpm run test\n\n# Run with coverage\nnpm run test -- --coverage\n\n# Run E2E tests\nnpm run test:e2e\n```\n\n**Test structure:**\n```typescript\nimport { render, screen, fireEvent } from '@testing-library\u002Freact'\nimport { WorkspacePanel } from '.\u002FWorkspacePanel'\n\ndescribe('WorkspacePanel', () => {\n  it('renders workspace correctly', () => {\n    render(\u003CWorkspacePanel \u002F>)\n    expect(screen.getByRole('main')).toBeInTheDocument()\n  })\n\n  it('handles session creation', async () => {\n    render(\u003CWorkspacePanel \u002F>)\n    fireEvent.click(screen.getByText('New Session'))\n    expect(await screen.findByText('Session created')).toBeInTheDocument()\n  })\n})\n```\n\n---\n\n## Deployment Workflow\n\n### Pre-Deployment Checklist\n\n- [ ] All tests passing locally\n- [ ] `npm run build` succeeds (frontend)\n- [ ] `poetry run pytest` passes (backend)\n- [ ] No hardcoded secrets\n- [ ] Environment variables documented\n- [ ] Database migrations ready\n\n### Deployment Commands\n\n```bash\n# Build and deploy frontend\ncd frontend && npm run build\ngcloud run deploy frontend --source .\n\n# Build and deploy backend\ncd backend\ngcloud run deploy backend --source .\n```\n\n### Environment Variables\n\n```bash\n# Frontend (.env.local)\nNEXT_PUBLIC_API_URL=https:\u002F\u002Fapi.example.com\nNEXT_PUBLIC_SUPABASE_URL=https:\u002F\u002Fxxx.supabase.co\nNEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...\n\n# Backend (.env)\nDATABASE_URL=postgresql:\u002F\u002F...\nANTHROPIC_API_KEY=sk-ant-...\nSUPABASE_URL=https:\u002F\u002Fxxx.supabase.co\nSUPABASE_KEY=eyJ...\n```\n\n---\n\n## Critical Rules\n\n1. **No emojis** in code, comments, or documentation\n2. **Immutability** - never mutate objects or arrays\n3. **TDD** - write tests before implementation\n4. **80% coverage** minimum\n5. **Many small files** - 200-400 lines typical, 800 max\n6. **No console.log** in production code\n7. **Proper error handling** with try\u002Fcatch\n8. **Input validation** with Pydantic\u002FZod\n\n---\n\n## Related Skills\n\n- `coding-standards.md` - General coding best practices\n- `backend-patterns.md` - API and database patterns\n- `frontend-patterns.md` - React and Next.js patterns\n- `tdd-workflow\u002F` - Test-driven development methodology\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,169,453,"2026-05-16 13:10:16",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"0df766a4-a418-4639-ad46-f5c837cc09c3","1.0.0","cc-skill-project-guidelines-example.zip",3691,"uploads\u002Fskills\u002Fbd862557-410f-427a-8ac0-f2c864f07f96\u002Fcc-skill-project-guidelines-example.zip","2a317b22dceca2b099c604912ca8b6ee559370bf01e3f1dbb8a1d521e59cfadd","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":10142}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]