async-python-patterns – skill Lập trình cho agent AI
Hướng dẫn toàn diện để triển khai ứng dụng Python bất đồng bộ sử dụng asyncio, các mẫu lập trình đồng thời, và async/await để xây dựng hệ thống hiệu năng cao, không chặn luồng.
Cài skill async-python-patterns bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/async-python-patterns-e93a5.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /async-python-patterns – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/async-python-patterns-e93a5.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $async-python-patterns – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/async-python-patterns-e93a5.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /async-python-patterns – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/async-python-patterns-e93a5.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /async-python-patterns – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Async Python Patterns
Comprehensive guidance for implementing asynchronous Python applications using asyncio, concurrent programming patterns, and async/await for building high-performance, non-blocking systems.
Use this skill when
- Building async web APIs (FastAPI, aiohttp, Sanic)
- Implementing concurrent I/O operations (database, file, network)
- Creating web scrapers with concurrent requests
- Developing real-time applications (WebSocket servers, chat systems)
- Processing multiple independent tasks simultaneously
- Building microservices with async communication
- Optimizing I/O-bound workloads
- Implementing async background tasks and queues
Do not use this skill when
- The workload is CPU-bound with minimal I/O.
- A simple synchronous script is sufficient.
- The runtime environment cannot support asyncio/event loop usage.
Instructions
- Clarify workload characteristics (I/O vs CPU), targets, and runtime constraints.
- Pick concurrency patterns (tasks, gather, queues, pools) with cancellation rules.
- Add timeouts, backpressure, and structured error handling.
- Include testing and debugging guidance for async code paths.
- If detailed examples are required, open
resources/implementation-playbook.md.
Refer to resources/implementation-playbook.md for detailed patterns and examples.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- atlas-contract – Skill đảm bảo tính toàn vẹn mục tiêu. Dùng cho backend/API/persistence, phần giữ…
- gtars – Hỗ trợ Gtars cho các mô hình khoảng genom cục bộ và đại số tập hợp, chồng lấp và đếm…
- auth-implementation-patterns – Triển khai hoặc rà soát xác thực và phân quyền với ranh giới rõ ràng cho token, session…
- go-concurrency-patterns – Làm chủ lập trình đồng thời trong Go với goroutine, channel, sync primitives và context…
- ciso-review – /c-level-agents:ciso-review [plan] — Rà soát theo hướng cảnh giác rủi ro mọi kế hoạch có…
- grounded-vault – Dùng khi duy trì kho kiến thức Markdown bền vững do agent biên soạn từ các nguồn, khi…
- grpo-rlvr-training – Huấn luyện hành vi suy luận và tác vụ kiểm chứng được bằng GRPO và học tăng cường từ…
- cmo-review – /c-level-agents:cmo-review [plan] — Thẩm vấn theo hướng kể chuyện trước về định vị, ICP…