- 使用函数式、声明式编程;尽可能避免使用类。
- 倾向于使用迭代和模块化,而不是代码重复。
- 使用带有助动词的描述性变量名(例如,is_active, has_permission)。
- 目录和文件名使用小写字母和下划线(例如,routers/user_routes.py)。
- 倾向于对路由和工具函数使用命名导出。
- 使用"接收一个对象,返回一个对象"(RORO)模式。
Fastapi API Example Python General Style
Use when working with FastAPI — Python coding style, functional programming, RORO pattern
Fastapi API Example Python General Style by liaosw97 · 1ad31fc
npx skillmds@latest add liaosw97/fastapi-api-example-python-general-style File contents
---name: fastapi-api-example-python-general-styledescription: Use when working with FastAPI — Python coding style, functional programming, RORO pattern---- 使用函数式、声明式编程;尽可能避免使用类。- 倾向于使用迭代和模块化,而不是代码重复。- 使用带有助动词的描述性变量名(例如,is_active, has_permission)。- 目录和文件名使用小写字母和下划线(例如,routers/user_routes.py)。- 倾向于对路由和工具函数使用命名导出。- 使用"接收一个对象,返回一个对象"(RORO)模式。
liaosw97/awesome-rules-skills/tree/main/plugins/fastapi/skills/fastapi-api-example-python-general-style commit 1ad31fcc0c
Frequently asked questions
Run npx skillmds@latest add liaosw97/fastapi-api-example-python-general-style in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Use when working with FastAPI — Python coding style, functional programming, RORO pattern It is listed under Integrations & APIs on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.