python-dev
Skill1 starsChanged 9 months agoMITView on GitHub
Python backend conventions for this project. Use when implementing or modifying API endpoints, database models/migrations, services, schemas, or backend tests.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- tenequm/skillstheir own version, first seen Jun 5, 2026
- doccker/cc-use-exptheir own version, first seen May 29, 2026
- kumaran-is/claude-code-onboardingtheir own version, first seen May 25, 2026
- pytholic/claude-skillstheir own version, first seen Apr 22, 2026
- databricks-solutions/ai-dev-kittheir own version, first seen Mar 23, 2026
- JohnJBoren/claude-skills-ecosystemtheir own version, first seen Dec 26, 2025
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- databricks-solutions/ai-dev-kit★ 1.9ksame name
- doccker/cc-use-exp★ 1.1ksame name
- tenequm/skills★ 37same name
- kumaran-is/claude-code-onboarding★ 36same name
- 0xSero/claude-skill-dir★ 3same name
- pytholic/claude-skills★ 3same name
- JohnJBoren/claude-skills-ecosystem★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- .cursor/rules/ask-first.mdcCursor rule
- .cursor/rules/git-mv-rename.mdcCursor rule
- .cursor/rules/include-specs.mdcCursor rule
- .cursor/rules/update-specs.mdcCursor rule
- code-review-codexSkill
- commitSkill
- react-devSkill
- spec-review-codexSkill
- summarizerSkill
- ui-designSkill
- yt-transcriptSkill
- codex-reviewSkill
- python-devSkill
- react-devSkill
- ui-designSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Use Depends() for sessions, config, auth, services
- Very specific: line 32
Use lazy="selectin" or explicit eager loading to avoid N+1 queries
- Distinctive: line 37
Test behavior: inputs, outputs, status codes, side effects
- Very specific: line 38
Use fixtures for shared setup — organize conftest.py by scope
- Distinctive: line 46
Write tests alongside implementation — new endpoints and services should ship with tests
- Distinctive: line 48
If you change database models, create a new Alembic migration revision
- Distinctive: line 52
Speak up: If you spot code that contradicts conventions, has a latent bug, unnecessary complexity, or a missed optimization — flag it.
- Distinctive: line 53
Verify against documentation: Use the context7 MCP to check documentation of libraries when needed.
- Distinctive: line 54
Ask, don't assume: If requirements are ambiguous or you face a non-obvious architectural choice, ask for clarification before proceeding.
- Distinctive: line 55
Stay scoped: If you discover an issue outside your current task, report it instead of silently fixing it.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Conventions
Stack choices
- FastAPI — async endpoints, dependency injection via
Depends(), lifespan events - Pydantic v2 — schemas at all boundaries,
ConfigDict(from_attributes=True)for ORM models - SQLAlchemy 2.0 —
select()style,Mapped[],mapped_column(). No legacy 1.x Query API - Alembic — async migrations, always review autogenerated output
- pytest + pytest-asyncio + httpx AsyncClient for testing
Coding standards
- Async-first — all I/O (DB, HTTP, LLM) must be async. No blocking calls in async paths
- Type hints everywhere — modern Python syntax (PEP 604 unions, generics)
- Pydantic at all boundaries — no raw dicts across module boundaries
- Separate request and response models — don't reuse the same schema for both
- Structured logging — use the project's logging setup, not bare
print() - Meaningful errors —
HTTPExceptionwith correct status codes and clear messages - Small, focused functions — single responsibility
Architecture
- Business logic lives in service modules, not in endpoint functions
- Endpoints: validate input, call services, return responses
- Use
Depends()for sessions, config, auth, services - Group by feature/domain when the project grows, not by layer
- Use
lazy="selectin"or explicit eager loading to avoid N+1 queries - One session per request via dependency injection
Testing
- Test behavior: inputs, outputs, status codes, side effects
- Use fixtures for shared setup — organize
conftest.pyby scope - Mock external dependencies (LLM calls, external HTTP). Never hit real services in tests
- Cover: happy path, validation errors (422), auth failures (401/403), not-found (404)
Workflow
- Orient before coding — read existing code in the area, match patterns and naming conventions
- Small, focused changes — stay within scope, don't refactor unrelated code
- Write tests alongside implementation — new endpoints and services should ship with tests
- Validate after edits — run type checker and linter, run tests if they exist in the area
- If you change database models, create a new Alembic migration revision
Principles
- Speak up. If you spot code that contradicts conventions, has a latent bug, unnecessary complexity, or a missed optimization — flag it. Don't silently work around issues.
- Verify against documentation Use the context7 MCP to check documentation of libraries when needed.
- Ask, don't assume. If requirements are ambiguous or you face a non-obvious architectural choice, ask for clarification before proceeding.
- Stay scoped. If you discover an issue outside your current task, report it instead of silently fixing it. Exception: trivial fixes (typos, obvious off-by-one) that take seconds.
- Leave code better than you found it — but only in the files you're already touching.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

