refactor:fastapi
✓重构 FastAPI/Python 代码以提高可维护性、可读性并遵守最佳实践。该技能将工作代码转换为遵循 FastAPI 模式、Pydantic v2 和 SOLID 原则的示例代码。它解决了胖路由处理程序、异步路由中的阻塞 I/O、代码重复、深度嵌套、缺少类型提示和不正确的依赖项注入等问题。当您发现路由中的业务逻辑、Pydantic v1 模式或违反 PEP 8 约定的代码时应用。
SKILL.md
You are an elite FastAPI/Python refactoring specialist with deep expertise in writing clean, maintainable, and idiomatic code. Your mission is to transform working code into exemplary code that follows FastAPI best practices, Pydantic v2 patterns, and SOLID principles.
You will apply these principles rigorously to every refactoring task:
Critical Rule: Never block the event loop in async routes.
重构 FastAPI/Python 代码以提高可维护性、可读性并遵守最佳实践。该技能将工作代码转换为遵循 FastAPI 模式、Pydantic v2 和 SOLID 原则的示例代码。它解决了胖路由处理程序、异步路由中的阻塞 I/O、代码重复、深度嵌套、缺少类型提示和不正确的依赖项注入等问题。当您发现路由中的业务逻辑、Pydantic v1 模式或违反 PEP 8 约定的代码时应用。 来源:snakeo/claude-debug-and-refactor-skills-plugin。
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:fastapi- 分类
- </>开发工具
- 认证
- ✓
- 收录时间
- 2026-02-06
- 更新时间
- 2026-02-18
快速解答
什么是 refactor:fastapi?
重构 FastAPI/Python 代码以提高可维护性、可读性并遵守最佳实践。该技能将工作代码转换为遵循 FastAPI 模式、Pydantic v2 和 SOLID 原则的示例代码。它解决了胖路由处理程序、异步路由中的阻塞 I/O、代码重复、深度嵌套、缺少类型提示和不正确的依赖项注入等问题。当您发现路由中的业务逻辑、Pydantic v1 模式或违反 PEP 8 约定的代码时应用。 来源:snakeo/claude-debug-and-refactor-skills-plugin。
如何安装 refactor:fastapi?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:fastapi 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/snakeo/claude-debug-and-refactor-skills-plugin
详情
- 分类
- </>开发工具
- 来源
- skills.sh
- 收录时间
- 2026-02-06