一键导入
project-structure
Project file tree and layout conventions. Use when navigating the codebase, finding where files belong, or understanding the project layout.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Project file tree and layout conventions. Use when navigating the codebase, finding where files belong, or understanding the project layout.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | project-structure |
| description | Project file tree and layout conventions. Use when navigating the codebase, finding where files belong, or understanding the project layout. |
| user-invokable | false |
obviously-the-best-hello-world-app/
├── CLAUDE.md <- project instructions (Claude Code)
├── GEMINI.md <- project instructions (Gemini)
├── main.py <- FastAPI app (single file for now)
├── requirements.txt <- Python dependencies
├── Dockerfile <- Container build
├── .claude/
│ ├── settings.json <- Claude Code permissions
│ └── skills/ <- Claude Code skills
│ ├── coding-standards/
│ ├── verification-loop/
│ ├── tdd-workflow/
│ ├── add-endpoint/
│ ├── add-migration/
│ ├── db-schema/
│ ├── project-structure/
│ └── docker-patterns/
└── .gemini/
├── settings.json <- Gemini permissions
└── skills/ <- Gemini skills (mirrors .claude)
As the app grows beyond a single main.py, adopt this structure:
app/
├── main.py <- FastAPI app setup, lifespan, router registration
├── db.py <- asyncpg pool lifecycle + dependency injection
├── schemas.py <- Shared Pydantic models
├── domains/
│ └── {domain}/
│ ├── router.py <- Route handlers (thin — wire deps, return results)
│ ├── queries.py <- SQL queries (all DB access here)
│ └── schemas.py <- Domain-specific Pydantic models
├── migrations/
│ ├── 001_initial.sql
│ └── 002_add_events.sql
└── tests/
├── conftest.py <- Shared fixtures (mock pool, test client)
├── test_endpoints.py <- API integration tests
└── test_queries.py <- Query unit tests
router.py + queries.py + schemas.pyqueries.pyresponse_model=001_, 002_, etc.test_endpoints.py tests routes, test_queries.py tests queriesCreate a new database migration for PostgreSQL. Covers file naming, SQL patterns, running, and updating dependent code.
Baseline code quality enforcer — naming conventions, import hygiene, type safety, and style rules for a FastAPI + asyncpg + PostgreSQL Python backend.
Database schema reference for the hello-world app's PostgreSQL instance. Use when writing queries, creating migrations, or debugging data issues.
Docker patterns for this project — DooD (Docker-outside-of-Docker), compose conventions, container lifecycle, and dev-box workflow.
Step-by-step checklist for adding a new API endpoint to a FastAPI + asyncpg app. Covers schema, query, route, and verification.
Test-driven development workflow for FastAPI + asyncpg apps. Write tests first, then implement, then refactor.