Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Dotnet Rag Chat

ASecurity

Scaffold a working "chat with your documents" RAG app in .NET 10 Blazor Server (Ollama for chat + local embeddings, SQLite vector store, Microsoft.Extensions.AI/DataIngestion), or add that RAG chat to an existing ASP.NET Core/Blazor project. Includes document upload/delete, citations, incremental indexing, persistent chat history and fixes for known Ollama/SqliteVec pitfalls. Use this whenever the user wants a RAG app, document Q&A, "belgelerimle sohbet", "PDF'lerime soru sormak", a knowledge...

2 stars
0 votes
0 copies
0 views
Added 9/25/2026
ai-agentspythongoc#bashsqldebuggingapi

Works with

api

Security Analysis

A92/100
mediumUses curl or wget to download content

Pro scans all 20 files and shows the line behind each finding

Scanned 9/25/2026

$npx -y skills add vedats/RagSkill-Dotnet --skill dotnet-rag-chat --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dotnet Rag Chat?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Dotnet Rag Chat
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vedats-dotnet-rag-chat/badge)](https://www.skillsdirectory.com/skills/vedats-dotnet-rag-chat)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: dotnet-rag-chat
description: Scaffold a working "chat with your documents" RAG app in .NET 10 Blazor Server (Ollama for chat + local embeddings, SQLite vector store, Microsoft.Extensions.AI/DataIngestion), or add that RAG chat to an existing ASP.NET Core/Blazor project. Includes document upload/delete, citations, incremental indexing, persistent chat history and fixes for known Ollama/SqliteVec pitfalls. Use this whenever the user wants a RAG app, document Q&A, "belgelerimle sohbet", "PDF'lerime soru sormak", a knowledge-base chatbot, AnythingLLM-like app, or semantic search over files in C#/.NET/Blazor — even if they don't say "RAG" — and also when debugging such an app (Ollama errors, embeddings, vector store, chunking, slow first question).
---

# .NET RAG Chat (Blazor + Ollama + SQLite vectors)

This skill packages a tested, working RAG chat app so a new project starts from something that already runs,
instead of from the stock `aichatweb` template, which has several bugs that took real debugging to find
(see `references/pitfalls.md`).

What the app does: users upload PDF/Markdown files → text is chunked and embedded locally → stored in a
SQLite vector DB → questions are answered by an Ollama (cloud or local) chat model that searches the docs via a
tool call and cites sources. Extras: documents page (upload/delete), document list on the start page, only
new/changed files are re-indexed, background indexing at startup, chat history saved per browser and restored,
last-N-messages window, retries for flaky embeddings, friendly error when Ollama is down.

Talk to the user in the language they're using.

## Decide the mode

1. **New app** (most common): use the scaffold script — step "Create a new app".
2. **Add to an existing ASP.NET Core / Blazor project**: run `scripts/integrate.py <project-dir>` for the
   mechanical part, then do the manual steps (Program.cs, a `<script>` tag in App.razor, nav links) in
   `references/integrate-existing.md`. Read that file first — the App.razor script tag is easy to miss and
   without it answers silently don't render.
3. **Questions / debugging an app built from this**: `references/architecture.md` explains every file;
   `references/pitfalls.md` lists known failures and their fixes — check it before debugging from scratch.

## Create a new app

Prerequisites (check, don't assume): .NET 10 SDK (`dotnet --version`), Python 3, Ollama installed and running
(`curl http://localhost:11434/api/version`). Cloud chat models (`*-cloud`) need the Ollama app signed in.

```bash
python <skill-dir>/scripts/scaffold.py <ProjectName> --output <target-dir>
```

Options: `--chat-model` (default `gpt-oss:120b-cloud`; must support tools), `--embedding-model` (default
`all-minilm`), `--embedding-dimensions` (default 384 — must match the embedding model), `--max-tokens-per-chunk`
(default 180 — keep below the embedding model's context window), `--no-examples` (skip the two sample docs).
The script refuses a non-empty target directory, so it can't overwrite work.

Then:
1. `ollama pull <embedding-model>` — Ollama Cloud has no embedding models, embeddings are always local.
   Verify the size: `curl -s localhost:11434/api/embed -d '{"model":"<m>","input":"hi"}'` → vector length must equal
   `--embedding-dimensions`.
2. If the chat model is local (not `-cloud`), `ollama pull` it too, and confirm it lists `tools` in
   `curl -s localhost:11434/api/tags` capabilities — the app relies on tool calling.
3. `dotnet build` in the target dir; expect 0 errors, 0 warnings.
4. Run it and verify end to end (don't stop at "it builds" — most bugs in this stack only show up at runtime):
   start with `dotnet run`, wait for the log line `Indexing N new or changed document(s)` and the
   `Completed processing` lines, open the page, ask a question about a sample doc, and confirm the answer has a
   citation. Check the log for `fail:` lines.

First start indexes everything in the background (≈1 min per MB of PDF with all-minilm); later starts skip
unchanged files, so questions are answered in ~2 s.

## Customizing

Common changes and where they live (details in `references/architecture.md`):

| Change | Where |
|---|---|
| Chat / embedding model | `Program.cs` (and `VectorDimensions` in `Services/IngestedChunk.cs` if the embedding size changes) |
| Chunk size | `MaxTokensPerChunk` in `Services/IngestedChunk.cs` |
| How many past messages go to the model | `Chat:MaxHistoryMessages` in `appsettings.json` |
| System prompt / answer rules | `SystemPrompt` in `Components/Pages/Chat/Chat.razor` |
| Supported file types | `SupportedExtensions` in `Services/SemanticSearch.cs` + a reader in `Services/Ingestion/DocumentReader.cs` |
| Upload limits | `MaxFileSize` / `MaxFileCount` in `Components/Pages/Documents.razor` |

Changing the embedding model or chunk size invalidates existing vectors. Chunk size is tracked in the index
manifest and triggers re-indexing automatically; for an embedding-model change, delete `vector-store.db` and
`vector-store.manifest.json` in the output folder (`bin/Debug/net10.0/`) so everything is re-embedded.

## Things to tell the user

- There is no authentication: anyone who can reach the app can upload/delete documents. Fine locally; add auth
  before exposing it.
- Ollama must be running; if it isn't, the chat shows "Couldn't reach Ollama…" instead of crashing.
- Three packages are previews (`CommunityToolkit.VectorData.SqliteVec`, `Microsoft.Extensions.DataIngestion*`):
  pin versions and re-test after upgrades.

Attribution

vedatsvedats
View sourceSee grades on GitHubMore from vedats →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →