gitagent/skills/export-database/SKILL.md
Converts IntelliStack's SQLAlchemy 2.0 models and Alembic migrations to any target ORM or database toolkit, preserving the full schema, indexes, relationships, and cascade rules.
npx skillsauth add SARAMALI15792/AINativeBook export-databaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce a ready-to-run database schema in any target ORM from the authoritative IntelliStack SQLAlchemy models.
asyncpg driverintellistack/backend/src/core/<module>/models.py| Table | Module | Notes | |------------------------|--------------|--------------------------------| | users | auth/users | Core identity | | sessions | auth | JWT refresh tokens | | oauth_accounts | auth | Google / GitHub links | | learning_stages | learning | 5-stage curriculum | | lessons | learning | Lesson metadata | | user_progress | learning | Per-user stage/lesson progress | | exercises | learning | Coding exercises | | assessments | learning | Quizzes / evaluations | | content_items | content | MDX documents | | content_versions | content | Version history | | institutions | institution | Org entities | | cohorts | institution | Student groups | | cohort_enrollments | institution | User ↔ cohort | | webhooks | institution | Outbound webhook configs | | chat_sessions | rag | Chatbot conversations | | chat_messages | rag | Per-turn messages + citations | | badges | badges | Badge definitions | | user_badges | badges | Issued badges |
| ORM | Language | Migration Tool |
|----------------|------------|-----------------------|
| Prisma | TypeScript | prisma migrate dev |
| TypeORM | TypeScript | typeorm migration |
| Drizzle ORM | TypeScript | drizzle-kit push |
| Hibernate | Java | Flyway / Liquibase |
| Django ORM | Python | manage.py migrate |
| GORM | Go | AutoMigrate / Goose |
| ActiveRecord | Ruby | rails db:migrate |
| Eloquent | PHP | Laravel migrations |
For each requested module, read:
intellistack/backend/src/core/<module>/models.py
Extract for every model class:
__tablename__Column(...) definitions (name, type, nullable, default, server_default)relationship(...) (back_populates, cascade, lazy)Index(...) and UniqueConstraint(...) definitionsOutput the complete target schema file. For TypeScript ORMs, include the TypeScript types. For Java, include the full entity class with annotations. Never truncate — output every field.
Output the migration command for the target tool, e.g.:
# Prisma
npx prisma migrate dev --name init_intellistack
# Django
python manage.py makemigrations && python manage.py migrate
# GORM
# AutoMigrate called in main.go startup
SQLAlchemy → Prisma
String → String
Integer → Int
BigInteger → BigInt
Boolean → Boolean
DateTime → DateTime
UUID → String @db.Uuid
Text → String @db.Text
JSON / JSONB → Json
Enum → enum declaration
ForeignKey → @relation(...)
development
Re-implements the IntelliStack RAG pipeline (Qdrant + Cohere + OpenAI SSE) in any target language or framework, preserving hybrid retrieval, reranking, citation architecture, and stage-based access control.
tools
Generates typed API clients and frontend integration code for any framework consuming the IntelliStack REST API, including auth flows, learning path UI, chatbot UI, and admin dashboards.
development
Migrates IntelliStack FastAPI routers, services, and Pydantic schemas to any target backend framework while preserving every business rule, auth guard, and error contract.
development
Migrates the IntelliStack Better-Auth OIDC authentication system to any target auth framework, preserving OAuth flows, session management, role/permission model, and JWT claim structure.