# vedats/ragskill-dotnet architecture

> Architecture diagram of the GitHub repository vedats/ragskill-dotnet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vedats/ragskill-dotnet
- Repository: https://github.com/vedats/ragskill-dotnet

## Overview

RagSkill-Dotnet is a Claude Code skill that scaffolds a runnable .NET document-Q&A application or integrates its components into an existing app. The generated app’s user workflow is document upload and indexing, followed by question answering with retrieved chunks and clickable citations; its UI also manages documents and persistent chat history. The template and scripts are visible in the tree, while runtime wiring is described by the README’s architecture and feature summary; unsampled implementation details are not expanded into unsupported call edges.

Main entry points: [`skills/dotnet-rag-chat/assets/template/Services/SemanticSearch.cs`](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/SemanticSearch.cs) (Semantic search), [`skills/dotnet-rag-chat/assets/template/Services/Ingestion/DataIngestor.cs`](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DataIngestor.cs) (Document ingestion), [`skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/Chat.razor`](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/Chat.razor) (Chat page), [`skills/dotnet-rag-chat/SKILL.md`](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/SKILL.md) (Skill instructions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_skill["Skill workflow"]
  node_skillfile["Skill instructions<br/>[SKILL.md]"]
  node_scaffold["Scaffold script<br/>[scaffold.py]"]
  node_integrate["Integration script<br/>[integrate.py]"]
  node_template["Runnable template"]
end

subgraph group_ui["Generated interface"]
  node_chatui["Chat page<br/>[Chat.razor]"]
  node_docui["Documents page<br/>[Documents.razor]"]
  node_citation["Citation viewer<br/>[ChatCitation.razor]"]
end

subgraph group_rag["RAG runtime"]
  node_program["App registration<br/>[Program.cs]"]
  node_ingest["Document ingestion<br/>[DataIngestor.cs]"]
  node_reader["Document reader<br/>[DocumentReader.cs]"]
  node_sync["Index synchronization"]
  node_search["Semantic search<br/>[SemanticSearch.cs]"]
  node_embedding["Embedding retries"]
end

subgraph group_state["Models and storage"]
  node_chunks["Indexed chunks<br/>[IngestedChunk.cs]"]
  node_history["Chat history store"]
  node_vector[("SQLite vector store")]
end

node_developer(("Developer"))
node_claude(("Claude Code"))
node_ollama{{"Ollama models"}}
node_visitor(("App user"))
node_documents["PDF / Markdown"]

node_developer -->|"requests app"| node_claude
node_claude -->|"follows"| node_skillfile
node_skillfile -->|"creates project"| node_scaffold
node_scaffold -->|"copies and configures"| node_template
node_skillfile -->|"integrates project"| node_integrate
node_integrate -->|"copies components"| node_template
node_visitor -->|"uploads and deletes"| node_docui
node_docui -->|"indexes documents"| node_ingest
node_documents -->|"read and chunk"| node_reader
node_ingest -->|"uses reader"| node_reader
node_program -->|"starts indexing"| node_sync
node_sync -->|"synchronizes"| node_ingest
node_ingest -->|"embeds chunks"| node_embedding
node_embedding -->|"requests embeddings"| node_ollama
node_ingest -->|"stores vectors"| node_vector
node_visitor -->|"asks question"| node_chatui
node_chatui -->|"search tool"| node_search
node_search -->|"embeds query"| node_embedding
node_search -->|"retrieves top chunks"| node_vector
node_search -->|"requests chat response"| node_ollama
node_chatui -->|"loads and saves"| node_history
node_search -->|"uses retrieved content"| node_chunks
node_chatui -->|"renders citations"| node_citation
node_citation -->|"opens source quote"| node_visitor

click node_skillfile "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/SKILL.md"
click node_scaffold "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/scripts/scaffold.py"
click node_integrate "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/scripts/integrate.py"
click node_template "https://github.com/vedats/ragskill-dotnet/tree/main/skills/dotnet-rag-chat/assets/template"
click node_chatui "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/Chat.razor"
click node_docui "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Documents.razor"
click node_citation "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/ChatCitation.razor"
click node_program "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Program.cs"
click node_ingest "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DataIngestor.cs"
click node_reader "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DocumentReader.cs"
click node_sync "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DocumentSyncService.cs"
click node_search "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/SemanticSearch.cs"
click node_embedding "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/RetryingEmbeddingGenerator.cs"
click node_chunks "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/IngestedChunk.cs"
click node_history "https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/ChatHistoryStore.cs"
click node_documents "https://github.com/vedats/ragskill-dotnet/tree/main/skills/dotnet-rag-chat/assets/template/wwwroot/Data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skillfile,node_scaffold,node_integrate,node_template,node_visitor toneBlue
class node_chatui,node_docui,node_citation toneAmber
class node_program,node_ingest,node_reader,node_sync,node_search,node_embedding toneMint
class node_chunks,node_history,node_vector toneRose
class node_developer,node_claude,node_ollama toneIndigo
class node_documents toneTeal
```

## Components

### Skill workflow

- [Skill instructions](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/SKILL.md): `skills/dotnet-rag-chat/SKILL.md`
- [Scaffold script](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/scripts/scaffold.py): `skills/dotnet-rag-chat/scripts/scaffold.py`
- [Integration script](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/scripts/integrate.py): `skills/dotnet-rag-chat/scripts/integrate.py`
- [Runnable template](https://github.com/vedats/ragskill-dotnet/tree/main/skills/dotnet-rag-chat/assets/template): `skills/dotnet-rag-chat/assets/template`

### Generated interface

- [Chat page](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/Chat.razor): `skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/Chat.razor`
- [Documents page](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Documents.razor): `skills/dotnet-rag-chat/assets/template/Components/Pages/Documents.razor`
- [Citation viewer](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/ChatCitation.razor): `skills/dotnet-rag-chat/assets/template/Components/Pages/Chat/ChatCitation.razor`

### RAG runtime

- [App registration](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Program.cs): `skills/dotnet-rag-chat/assets/template/Program.cs`
- [Document ingestion](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DataIngestor.cs): `skills/dotnet-rag-chat/assets/template/Services/Ingestion/DataIngestor.cs`
- [Document reader](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DocumentReader.cs): `skills/dotnet-rag-chat/assets/template/Services/Ingestion/DocumentReader.cs`
- [Index synchronization](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/Ingestion/DocumentSyncService.cs): `skills/dotnet-rag-chat/assets/template/Services/Ingestion/DocumentSyncService.cs`
- [Semantic search](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/SemanticSearch.cs): `skills/dotnet-rag-chat/assets/template/Services/SemanticSearch.cs`
- [Embedding retries](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/RetryingEmbeddingGenerator.cs): `skills/dotnet-rag-chat/assets/template/Services/RetryingEmbeddingGenerator.cs`

### Models and storage

- [Indexed chunks](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/IngestedChunk.cs): `skills/dotnet-rag-chat/assets/template/Services/IngestedChunk.cs`
- [Chat history store](https://github.com/vedats/ragskill-dotnet/blob/main/skills/dotnet-rag-chat/assets/template/Services/ChatHistoryStore.cs): `skills/dotnet-rag-chat/assets/template/Services/ChatHistoryStore.cs`
- **SQLite vector store**

### Other components

- **Developer**
- **Claude Code**
- **Ollama models**
- **App user**
- [PDF / Markdown](https://github.com/vedats/ragskill-dotnet/tree/main/skills/dotnet-rag-chat/assets/template/wwwroot/Data): `skills/dotnet-rag-chat/assets/template/wwwroot/Data`

## Connections

- Developer → Claude Code: requests app
- Claude Code → Skill instructions: follows
- Skill instructions → Scaffold script: creates project
- Scaffold script → Runnable template: copies and configures
- Skill instructions → Integration script: integrates project
- Integration script → Runnable template: copies components
- App user → Documents page: uploads and deletes
- Documents page → Document ingestion: indexes documents
- PDF / Markdown → Document reader: read and chunk
- Document ingestion → Document reader: uses reader
- App registration → Index synchronization: starts indexing
- Index synchronization → Document ingestion: synchronizes
- Document ingestion → Embedding retries: embeds chunks
- Embedding retries → Ollama models: requests embeddings
- Document ingestion → SQLite vector store: stores vectors
- App user → Chat page: asks question
- Chat page → Semantic search: search tool
- Semantic search → Embedding retries: embeds query
- Semantic search → SQLite vector store: retrieves top chunks
- Semantic search → Ollama models: requests chat response
- Chat page → Chat history store: loads and saves
- Semantic search → Indexed chunks: uses retrieved content
- Chat page → Citation viewer: renders citations
- Citation viewer → App user: opens source quote
