sqladmin
Installation
SKILL.md
SQLAdmin
Overview
Use this skill to implement SQLAdmin in FastAPI/Starlette apps, wire SQLAlchemy engines/sessions (sync or async), and tailor the admin UI via ModelView configuration, authentication, templates, and extensions.
Trigger examples
- “Add an admin dashboard for my SQLAlchemy models in FastAPI.”
- “Lock down the admin so only users with role=admin can access certain models.”
- “Make SQLAdmin work with an async engine and async sessionmaker.”
- “Customize list columns and add a custom action button.”
- “Override SQLAdmin templates for a custom layout.”
Quick start
- Create the SQLAlchemy engine (sync or async) and your models.
- Initialize
Admin(app, engine)(or pass asession_maker). - Define a
ModelViewfor each model andadd_viewit. - Visit
/admin(or your custom base URL).
See references/quickstart.md for a minimal setup pattern.
Core tasks
Configure ModelView behavior
- Lists, details, sorting, searching, filtering, pagination, and export options.
- Form scaffolding, overrides, and relationship field behaviors.
- Permissions and metadata (labels, icons, categories).
Use references/configurations.md for all ModelView options and examples.
Add authentication and access control
- Add
AuthenticationBackendto theAdmininstance. - Implement per-view visibility and access checks via
is_visible/is_accessible.
Use references/authentication.md for the required methods and patterns.
Role-based permissions
- Implement role checks in
is_accessibleandis_visible. - Apply per-model restrictions and per-action guards.
Use references/permissions.md for role and policy patterns.
Async SQLAlchemy integration
- Use
create_async_engineand asyncsessionmaker. - Ensure ModelView hooks handle async sessions correctly.
Use references/async.md for async engine/session patterns.
Customize templates and add custom views
- Override built-in templates or point views to custom templates.
- Add custom pages with
BaseViewand@expose.
Use references/templates-and-views.md for template and custom view patterns.
File and image fields
- Use
fastapi-storagesintegrations forFileType/ImageTypecolumns.
Use references/files.md for the storage-backed field setup.
Admin initialization options
- Customize base URL, title, logo, favicon, middlewares, and template directory.
Use references/admin-init.md for the Admin constructor options.
References
references/quickstart.mdreferences/configurations.mdreferences/authentication.mdreferences/permissions.mdreferences/async.mdreferences/templates-and-views.mdreferences/files.mdreferences/admin-init.md
Weekly Installs
1
Repository
jik92/sqladmin-skillsFirst Seen
Feb 16, 2026
Security Audits
Installed on
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1