FastAPI Cursor Rules Starter (Free)
Free FastAPI Cursor rules in .mdc format, checked against current FastAPI docs, plus a linter that shows why a rule isn't applying.
View FastAPI Cursor Rules Starter (Free)
7 FastAPI rules your agent actually follows: each one attaches only to the files it's about, states the version-specific behavior, and installs with one command.

7 Cursor project rules (.mdc) for FastAPI, scoped so each loads only when relevant, with an installer that detects your stack, an AGENTS.md exporter (Claude Code, Codex) and a rules linter. Written against current docs (checked Nov 2026).
The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 8 tests OK on Python 3.13 and 3.10.

python3 tools/install_rules.py --detect /path/to/app # what it finds
python3 tools/install_rules.py /path/to/app --auto # install rules for detected stacks into .cursor/rules/
python3 tools/install_rules.py /path/to/app --all --agents-md # everything, plus AGENTS.md
python3 tools/lint_rules.py /path/to/app/.cursor/rules --project /path/to/appExisting files are never overwritten unless you pass --force; --dry-run previews. ./tools/demo.sh runs it on examples/sample-app; ./run_tests.sh runs the tests. As a Cursor plugin, the manifest is .cursor-plugin/plugin.json.
| Rule | Loads | First instruction |
|---|---|---|
| fastapi-overview.mdc | always | Check the installed fastapi version before using an API |
| fastapi-routes-deps.mdc | by file (app//*.py, src//*.py, main.py) | Declare parameters with Annotated: user: Annotated[User, Depends(get_current_user)], q: Annotated[str / None,... |
| fastapi-pydantic.mdc | by file (app/schemas//*.py, app/models//*.py, /schemas.py) | Use v2 APIs: model_config = ConfigDict(...), model_dump(), model_validate(), field_validator, model_validator |
| fastapi-database.mdc | by file (app/db//*.py, app/repositories//*.py, app/crud//*.py, alembic//*.py, alembic.ini) | One session per request via a yield dependency |
| fastapi-security.mdc | by file (app/core//*.py, app/auth//*.py, app/security//*.py, app/routers//*.py, app/main.py) | Protect routes with dependencies (Depends(get_current_user), Security(..., scopes=[...])) at the router level... |
| fastapi-testing.mdc | by file (tests//*.py, /test_*.py, conftest.py) | Use TestClient (sync) or httpx.AsyncClient with ASGITransport for async tests |
| fastapi-performance.mdc | Agent picks it | With a response_model or return type, FastAPI serializes JSON with Pydantic (Rust) directly (0.130+) |
Zip, 19 KB, v1.0, 26 files. You may use and modify this kit for your own work and for clients you serve, including paid client work. Not affiliated with or endorsed by Cursor (Anysphere) or the FastAPI project.
7 Cursor rules for FastAPI, written against current docs. Installs in one command, exports AGENTS.md for Claude Code and Codex. $12 once.
Free FastAPI Cursor rules in .mdc format, checked against current FastAPI docs, plus a linter that shows why a rule isn't applying.
View FastAPI Cursor Rules Starter (Free)7 Cursor rules for SvelteKit, written against current docs. Installs in one command, exports AGENTS.md for Claude Code and Codex. $12 once.
View Cursor Rules for SvelteKitFree SvelteKit Cursor rules in .mdc format, checked against current SvelteKit docs, plus a linter that shows why a rule isn't applying.
View SvelteKit Cursor Rules Starter (Free)