一键导入
project-discovery
Analyze existing project and extract conventions, patterns, and architecture into .claude/rules/project-conventions.md
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze existing project and extract conventions, patterns, and architecture into .claude/rules/project-conventions.md
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | project-discovery |
| description | Analyze existing project and extract conventions, patterns, and architecture into .claude/rules/project-conventions.md |
| user-invocable | true |
Analyze an existing project codebase and extract everything needed for effective development into .claude/rules/project-conventions.md.
Scan project root for dependency/config files:
package.json, tsconfig.json, .csproj, *.sln,
pyproject.toml, requirements.txt, go.mod, Cargo.toml,
Dockerfile, docker-compose.yml, .github/workflows/
Extract: languages, frameworks, ORM, libraries with exact versions.
Scan directory tree (depth 3-4). Identify:
Read 3-5 representative files from each layer. Identify:
From existing code, detect actual patterns (not guess):
Look for signs of deliberate avoidance:
Find test projects/directories. From existing tests detect:
Write all findings to .claude/rules/project-conventions.md in this format:
# Project Conventions
## Tech Stack
- [Language] [version]
- [Framework] [version]
- [ORM] [version]
- [Key libraries]: [list with versions]
## Architecture
- Style: [vertical slices / layered / clean / etc.]
- Request flow: [controller -> handler -> repository / etc.]
- Error handling: [Result pattern / exceptions + middleware / etc.]
- Validation: [where and how]
- Mapping: [library or approach]
## Structure
[actual directory tree with annotations]
## Naming
- Files: [pattern]
- Classes: [suffixes]
- Methods: [conventions]
- Tests: [naming pattern]
## Testing
- Framework: [name]
- Assertions: [library]
- Mocking: [library and approach]
- Test data: [factories / builders / inline]
## Do NOT Use
- [specific anti-patterns for this project]
- [libraries/approaches deliberately avoided]
After writing, ask the user:
Extracted project conventions to
.claude/rules/project-conventions.md. Please review — are there corrections or additions?
.claude/rules/project-conventions.md already exists, show the user what changed and ask before overwriting.