Skill站外收录 @skilllib/skill-2014279399359590405
docs-reader
基于项目文档结构提供精准的技术指引,通过分类检索实现对教程、概念、操作指南及参考信息的快速定位,帮助用户理解架构设计并完成开发任务。
文档处理 AI 技能
Skills.MD
# Documentation Reader Skill
This skill helps you navigate and reference the comprehensive project documentation located in `docs/en/`. Always consult these docs before answering questions about the codebase.
## Documentation Framework: Diataxis
The documentation follows the [Diataxis framework](https://diataxis.fr/). Use this mapping to find the right content:
| User Intent | Doc Section | Location |
|-------------|-------------|----------|
| "I want to learn" | Tutorial | `docs/en/tutorial/` |
| "I want to do X" | How-To Guides | `docs/en/how-to/` |
| "I want to understand" | Concepts | `docs/en/concepts/` |
| "I need facts" | Reference | `docs/en/reference/` |
## Quick Reference: Documentation Map
### Getting Started (Onboarding)
| Question | File |
|----------|------|
| How do I set up the project? | `docs/en/getting-started/quick-start.md` |
| What's the project structure? | `docs/en/getting-started/project-structure.md` |
| How do I configure my dev environment? | `docs/en/getting-started/development-environment.md` |
### Tutorial (Step-by-Step Learning)
The tutorial builds a complete Todo List feature:
| Step | Topic | File |
|------|-------|------|
| 1 | Model & Service | `docs/en/tutorial/01-model-and-service.md` |
| 2 | IoC Registration | `docs/en/tutorial/02-ioc-registration.md` |
| 3 | HTTP API | `docs/en/tutorial/03-http-api.md` |
| 4 | Celery Tasks | `docs/en/tutorial/04-celery-tasks.md` |
| 5 | Observability | `docs/en/tutorial/05-observability.md` |
| 6 | Testing | `docs/en/tutorial/06-testing.md` |
### Concepts (Understanding Architecture)
| Topic | File | Key Content |
|-------|------|-------------|
| Service Layer | `docs/en/concepts/service-layer.md` | The Golden Rule, why services matter |
| IoC Container | `docs/en/concepts/ioc-container.md` | Dependency injection with punq |
| Controller Pattern | `docs/en/concepts/controller-pattern.md` | HTTP, Celery controllers |
| Factory Pattern | `docs/en/concepts/factory-pattern.md` | FastAPIFactory, CeleryAppFactory |
| Pydantic Settings | `docs/en/concepts/pydantic-settings.md` | Environment-based configuration |
### How-To Guides (Task-Focused)
| Task | File |
|------|------|
| Add a new domain/feature | `docs/en/how-to/add-new-domain.md` |
| Add a Celery task | `docs/en/how-to/add-celery-task.md` |
| Handle exceptions | `docs/en/how-to/custom-exception-handling.md` |
| Override IoC in tests | `docs/en/how-to/override-ioc-in-tests.md` |
| Secure endpoints | `docs/en/how-to/secure-endpoints.md` |
| Configure observability | `docs/en/how-to/configure-observability.md` |
### Reference (Facts & Details)
| Topic | File |
|-------|------|
| Environment variables | `docs/en/reference/environment-variables.md` |
| Makefile commands | `docs/en/reference/makefile.md` |
| Docker services | `docs/en/reference/docker-services.md` |
## How to Use This Skill
### Step 1: Identify the Question Type
Match the user's question to a Diataxis category:
- **Tutorial questions**: "How do I learn...", "Walk me through...", "Show me step by step..."
- **How-To questions**: "How do I add...", "How can I configure...", "What's the process for..."
- **Concept questions**: "What is...", "Why does...", "How does... work", "Explain..."
- **Reference questions**: "What are the options for...", "List all...", "What environment variables..."
### Step 2: Read the Relevant Documentation
Use the Read tool to access the appropriate documentation file:
```
Read: docs/en/concepts/service-layer.md
```
### Step 3: Answer from Documentation
Quote or reference specific sections from the docs. Always provide file paths for further reading.
## Common Question Mappings
### Architecture Questions
| Question | Read |
|----------|------|
| "How does the service layer work?" | `docs/en/concepts/service-layer.md` |
| "Why can't controllers use models?" | `docs/en/concepts/service-layer.md` |
| "How does dependency injection work?" | `docs/en/concepts/ioc-container.md` |
| "What's the factory pattern?" | `docs/en/concepts/factory-pattern.md` |
| "How are controllers structured?" | `docs/en/concepts/controller-pattern.md` |
### Implementation Questions
| Question | Read |
|----------|------|
| "How do I add a new feature?" | `docs/en/how-to/add-new-domain.md` |
| "How do I create a Celery task?" | `docs/en/how-to/add-celery-task.md` |
| "How do I handle errors?" | `docs/en/how-to/custom-exception-handling.md` |
| "How do I mock services in tests?" | `docs/en/how-to/override-ioc-in-tests.md` |
| "How do I protect endpoints?" | `docs/en/how-to/secure-endpoints.md` |
### Setup Questions
| Question | Read |
|----------|------|
| "How do I set up the project?" | `docs/en/getting-started/quick-start.md` |
| "What commands are available?" | `docs/en/reference/makefile.md` |
| "What env vars do I need?" | `docs/en/reference/environment-variables.md` |
| "What Docker services exist?" | `docs/en/reference/docker-services.md` |
### Learning Questions
| Question | Read First |
|----------|------------|
| "Show me a complete example" | `docs/en/tutorial/index.md` (then follow all steps) |
| "How do I build a feature from scratch?" | `docs/en/tutorial/01-model-and-service.md` |
| "How do I write tests?" | `docs/en/tutorial/06-testing.md` |
## Key Architectural Rules
Always reference these when answering architecture questions:
### The Golden Rule
```
Controller -> Service -> Model
Controllers NEVER import models directly.
```
From `docs/en/concepts/service-layer.md`:
> This rule is non-negotiable. Every database operation must go through a service.
### IoC Registration Order
From `docs/en/concepts/ioc-container.md`:
```python
container = Container()
register_core(container) # 1. Domain services first
register_infrastructure(container) # 2. Infrastructure (JWT, auth)
register_delivery(container) # 3. Controllers and factories
```
### Controller Types
From `docs/en/concepts/controller-pattern.md`:
- `Controller` (sync) - HTTP API, Celery tasks
## Additional Documentation
Also check `CLAUDE.md` in the project root - it contains development guidelines and code quality requirements.
## Reference Files
For deeper documentation exploration, see:
- `references/doc-structure.md` - Complete file listing
- `references/question-mappings.md` - Extended Q&A mappings
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「docs-reader」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次