crestapps/crestapps.agentskills/crestapps-core-ai-markdown

Claude Code and agent skill by crestapps/crestapps.agentskills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Skill for Markdig-backed Markdown normalization in CrestApps.Core 2.0 AI document, data source and RAG flows. Covers the CrestApps.Core.AI.Markdown package, AddMarkdown on the AI suite builder and AddCoreAIMarkdown on IServiceCollection, MarkdownAITextNormalizer replacing the default IAITextNormalizer, RagTextNormalizer content, chunk and title normalization with HTML stripping and Microsoft.Extensions.DataIngestion.Markdig parsing, the gpt-4o tokenizer chunker with 500 tokens per chunk and 50 tokens of overlap, the plain-text fallback for unsupported inline types, where the normalizer is used (data source indexing, preemptive retrieval, reference titles), and pairing it with document processing. Use it when indexing Markdown-heavy content for retrieval, replacing the text normalizer, or troubleshooting chunk sizes and leftover markup in retrieved text.

Install

npx vskill@latest install crestapps/crestapps.agentskills/crestapps-core-ai-markdown

SKILL.md

The same SKILL.md was published earlier as crestapps/crestapps.agentskills/crestapps-core-ai-markdown.

CrestApps.Core AI Markdown

CrestApps.Core.AI.Markdown makes text normalization Markdown-aware. It is opt-in: AddCoreAIServices() registers only the plain DefaultAITextNormalizer, and the core AI package does not depend on Markdig.

Guidelines

  • Reference the CrestApps.Core.AI.Markdown package and call AddMarkdown() on CrestAppsAISuiteBuilder, or AddCoreAIMarkdown() on IServiceCollection (namespace CrestApps.Core.AI.Markdown).
  • Registration adds MarkdownAITextNormalizer as the singleton IAITextNormalizer. The base registration uses TryAddSingleton and this one uses AddSingleton, so the Markdown normalizer wins whichever is called first.
  • The normalizer delegates to the static RagTextNormalizer: HTML is stripped, the text is parsed through Microsoft.Extensions.DataIngestion.Markdig, and plain text is extracted before whitespace is normalized.
  • AddMarkdown() does not register document stores, readers or upload endpoints. Add document processing or ingestion separately (crestapps-core-document-processing).

Register

csharp
using CrestApps.Core.AI.Documents;
using CrestApps.Core.AI.Documents.OpenXml;
using CrestApps.Core.AI.Documents.Pdf;
using CrestApps.Core.AI.Markdown;
using CrestApps.Core.Data.EntityCore;
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddMarkdown()
.AddDocumentProcessing(documentProcessing => documentProcessing
.AddEntityCoreStores()
.AddOpenXml()
.AddPdf())));

Direct registration:

csharp
builder.Services.AddCoreAIMarkdown();

Behavior

IAITextNormalizer has three members, all implemented by MarkdownAITextNormalizer:

MemberBehavior
NormalizeContentAsync(text)Strips HTML (line breaks and block closes become newlines, entities are decoded, pilcrows removed), parses Markdown, joins the extracted text, collapses horizontal spaces and repeated blank lines
NormalizeAndChunkAsync(text)Strips HTML, parses Markdown, then chunks with DocumentTokenChunker using TiktokenTokenizer.CreateForModel("gpt-4o"), MaxTokensPerChunk = 500, OverlapTokens = 50
NormalizeTitle(title)Strips HTML and collapses all whitespace to single spaces

When Markdig reports an unsupported inline type, the normalizer falls back to plain-text normalization and character-based chunking (about 4,000 characters per chunk with 200 characters of overlap) instead of failing the ingestion.

Where It Is Used

The registered IAITextNormalizer is resolved by data source indexing (DefaultAIDataSourceIndexingService), data source retrieval and reference titles (DataSourceRetrieval), and preemptive retrieval (DataSourcePreemptiveRagHandler). Registering Markdown therefore changes both how content is chunked when indexed and how retrieved text and titles look when they reach the model.

Custom Normalizer

Implement IAITextNormalizer (namespace CrestApps.Core.AI.Services) to change chunking, and reuse RagTextNormalizer for the parts you keep:

csharp
using CrestApps.Core.AI.Services;
namespace MyApp.Ingestion;
public sealed class HeadingAwareTextNormalizer : IAITextNormalizer
{
public Task<string> NormalizeContentAsync(string text, CancellationToken cancellationToken = default)
=> RagTextNormalizer.NormalizeContentAsync(text, cancellationToken);
public async Task<List<string>> NormalizeAndChunkAsync(string text, CancellationToken cancellationToken = default)
{
var chunks = await RagTextNormalizer.NormalizeAndChunkAsync(text, cancellationToken);
return chunks
.Where(chunk => chunk.Length >= 40)
.ToList();
}
public string NormalizeTitle(string title)
=> RagTextNormalizer.NormalizeTitle(title);
}
csharp
builder.Services.AddSingleton<IAITextNormalizer, HeadingAwareTextNormalizer>();

RagTextNormalizer ships in the Markdown package, so a custom normalizer that reuses it still needs the package reference. Register the custom normalizer after AddMarkdown() so it is the last registration.

Troubleshooting

  • Retrieved text still contains `, # or HTML tags**: Markdown normalization is not registered; add AddMarkdown()`.
  • Chunks are larger or smaller than expected: the chunker is token-based (gpt-4o tokenizer), not character-based, except in the plain-text fallback.
  • Existing indexes look different after enabling Markdown: content is chunked at index time; re-index data sources and documents to apply the new normalization.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
13
Repository forks
4
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/crestapps/crestapps.agentskills/crestapps-core-ai-markdown/badge)](https://verified-skill.com/skills/crestapps/crestapps.agentskills/crestapps-core-ai-markdown)

Something wrong with this skill or its page? Tell us.