
Claude Code 完整 Python 工具包 — 20 项技能,11 个代理,11 个命令,适用于 FastAPI、Django、SQLAlchemy、pytest、Allure、PostgreSQL、Redis、ClickHouse、Docker 等
概览
这能让Claude代码在Python开发和质量保证自动化中获得极大提升。一旦你把它加入你的项目,ClaudeCode立刻就成为了一位严格遵循你团队标准的高级Python工程师。 —— Claude Code 是个聪明的通才。—— Claude Code 编写 Python 代码,设计架构,使用 Allure 生成面向对象编程测试套件,审查 OWASP 漏洞,并严格遵循你的规范。 当你在项目中运行 Claude Code 时,它会从 .claude/ 目录读取特殊文件: 该工具包提供了所有这些组件,并预先配置为 Python。 这个 .就在你的项目根中。Claude 在每次对话开始时都会阅读它,并严格遵循它。 我们的CLAUDE。
概述(AI 翻译)
英语 |Русский
这是什么?
一个即用工具包,能强化Claude代码用于Python开发和质量保证自动化。一旦你将其加入项目,Claude代码立刻成为一名高级Python工程师,严格遵循团队的标准。
没有这个工具包——Claude Code是个聪明的通才。 有了这个工具包——Claude Code编写Python代码,设计架构,用Allure生成面向对象编程测试套件,审核OWASP漏洞,并严格遵循你的规范。
Claude 代码配置工作原理
当你在项目中运行 Claude Code 时,它会从 .claude/ 目录读取特殊文件:
该工具包提供了所有这些组件,并预先配置为 Python。
组件解析
CLAUDE.md — 大脑
最重要的单一文件。就放在你的项目根节点里。Claude每次对话开始都会阅读它,并严格遵循它。
我们的 CLAUDE.md 包括:
- Python 约定(PEP 8、类型提示、black/ruff/mypy)
- 严格的面向对象测试规则(类、服务层、Allure — 强制)
- 框架规则(FastAPI、Django、SQLAlchemy、Celery)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Python Stack for Claude Code
What Is This?
A ready-to-use toolkit that supercharges Claude Code for Python development and QA automation. Once you drop it into your project, Claude Code instantly becomes a senior Python engineer who follows your team’s exact standards.
Without this toolkit — Claude Code is a smart generalist. With this toolkit — Claude Code writes Pythonic code, designs architectures, generates OOP test suites with Allure, reviews for OWASP vulnerabilities, and follows your exact conventions.
How Claude Code Configuration Works
When you run Claude Code in a project, it reads special files from a .claude/ directory:
your-project/
├── CLAUDE.md # Main instructions — "the brain"
├── .claude/
│ ├── rules/ # Always-on guidelines (activate by file type)
│ ├── skills/ # Deep knowledge (activated when context matches)
│ ├── agents/ # Specialized sub-agents (reviewers, planners, etc.)
│ ├── commands/ # Slash commands you type (/plan, /tdd, /verify)
│ └── hooks.json # Automatic actions (format on save, type check)
└── src/
This toolkit provides all of these components, pre-configured for Python.
Components Explained
CLAUDE.md — The Brain
The single most important file. Sits in your project root. Claude reads it at the start of every conversation and follows it as law.
Our CLAUDE.md includes:
- Python conventions (PEP 8, type hints, black/ruff/mypy)
- Strict OOP test rules (classes, service layers, Allure — mandatory)
- Framework rules (FastAPI, Django, SQLAlchemy, Celery)
- Database rules (PostgreSQL types, indexes, N+1 prevention)
- Security rules (no eval, no hardcoded secrets, bandit)
- All available commands and agents listed
Think of it as: an onboarding doc for a new team member. Everything they must always follow.
Rules — Always-On Guidelines
Location: rules/ → copy to .claude/rules/
Markdown files that auto-activate by file pattern. Edit a .py file — Python rules kick in automatically.
---
paths:
- "**/*.py"
---
# Python Coding Style
- Follow PEP 8
- Type annotations on all public functions
- black for formatting, ruff for linting
| File | What It Enforces |
|---|---|
coding-style.md |
PEP 8, type hints, immutability, formatting tools |
patterns.md |
Protocol classes, dataclasses, context managers |
security.md |
Secrets via env vars, bandit scanning |
testing.md |
pytest, 80%+ coverage, test markers |
hooks.md |
Auto-format after edit, mypy, print() warnings |
Rules vs CLAUDE.md: CLAUDE.md = always on for everything. Rules = activate conditionally by file type.
Skills — Deep Knowledge On Demand
Location: skills/ → copy to .claude/skills/
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add manikosto/claude-code-python-stack