gitagent/skills/export-rag/SKILL.md
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.
npx skillsauth add SARAMALI15792/AINativeBook export-ragInstall 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.
Port the IntelliStack RAG chatbot — the most complex subsystem — to any target stack while keeping retrieval quality, citation fidelity, and streaming behaviour identical.
Raw document
→ text extraction
→ tiktoken chunking (512 tokens, 50 token overlap)
→ OpenAI text-embedding-3-small (1536 dims)
→ BM25 sparse vector (SPLADE or keyword)
→ Qdrant upsert (collection per stage)
payload: { source_id, chunk_index, stage_id, lesson_id, text }
User query
→ dense embedding (text-embedding-3-small)
→ Qdrant hybrid search (dense + sparse, top-20)
→ stage_access filter (only user's unlocked stages)
→ Cohere rerank-v3.5 (top-5)
→ system prompt assembly
→ OpenAI GPT-4o streaming (SSE)
→ citation extraction from streamed text
event: data → { content: string }
event: citation → { id, source_id, lesson_id, passage, score }
event: done → {}
event: error → { message: string }
intellistack/backend/src/core/rag/routes.py — endpointsintellistack/backend/src/core/rag/service.py — retrieval + LLMintellistack/backend/src/core/rag/ingestion.py — chunking + embeddingintellistack/backend/src/core/rag/schemas.py — request/response shapes| Target | Language | Notes | |---------------------------|------------|-------------------------------| | LangChain.js + Express | TypeScript | Drop-in for Node backends | | LlamaIndex (Python) | Python | Alternative retrieval engine | | Spring AI | Java | Spring Boot RAG | | Go + Qdrant Go SDK | Go | Low-latency option | | Vercel AI SDK | TypeScript | Edge-compatible streaming |
Ask: "Are you keeping Qdrant as the vector store, or switching?"
For the target language, produce:
text-embedding-3-small or alternative)For the target framework, wire the streaming function to an HTTP endpoint that emits the exact SSE event schema above.
OPENAI_API_KEY=
COHERE_API_KEY=
QDRANT_URL=
QDRANT_API_KEY=
QDRANT_COLLECTION_PREFIX=intellistack_stage_
event: error before closing streamtools
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.
tools
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.
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.