·refactor:fastapi

重構 FastAPI/Python 代碼以提高可維護性、可讀性並遵守最佳實踐。該技能將工作代碼轉換為遵循 FastAPI 模式、Pydantic v2 和 SOLID 原則的示例代碼。它解決了胖路由處理程序、異步路由中的阻塞 I/O、代碼重複、深度嵌套、缺少類型提示和不正確的依賴項注入等問題。當您發現路由中的業務邏輯、Pydantic v1 模式或違反 PEP 8 約定的代碼時應用。

17安裝·0熱度·@snakeo

安裝

$npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:fastapi

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