Provides guidance on CrestApps.Core 2.0 document processing and AI ingestion pipelines, including OpenXml, PDF, Word handling, figure processing, and document upload limits.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when a host lets users upload documents into chat sessions, chat interactions or AI profiles, or when it needs to read files into an AI knowledge base without the chat stack. For the Presentation, Word and PDF agents see crestapps-core-document-agents. For scheduled folder and file-server intake see crestapps-core-file-sources.
| Package | Holds | Register with |
|---|---|---|
CrestApps.Core.AI.Ingestion | readers, the processor pipeline, IDocumentFileStore, IKnowledgeIngestionService | AddCoreAIDocumentIngestion(...) |
CrestApps.Core.AI.Ingestion.Pdf | the PdfPig PDF reader and PdfLayoutOptions | AddPdf() on the ingestion builder |
CrestApps.Core.AI.Documents | uploads, tabular workspaces, generated files, the chat tools, the Tabular Data Agent | AddDocumentProcessing(...) / AddCoreAIDocumentProcessing() |
CrestApps.Core.AI.Documents.OpenXml | .docx, .xlsx, .pptx, .potx reader, Office writers, Presentation Agent | AddOpenXml() |
CrestApps.Core.AI.Documents.Pdf | PDF reader plus PDF writer and PDF Agent | AddPdf() on the document-processing builder |
CrestApps.Core.AI.Documents.Word | Word Agent | AddWord() |
CrestApps.Core.Azure.DocumentIntelligence | Azure AI Document Intelligence reader | AddDocumentIntelligence(...) on the ingestion builder |
AddCoreAIDocumentProcessing() calls AddCoreAIDocumentIngestion(i => i.AddPlainTextReader().AddFigureProcessing().AddFigureBackfill()) for you, so a chat host does not register the ingestion half separately.
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddMarkdown()
.AddChatInteractions(chatInteractions => chatInteractions
.AddEntityCoreStores())
.AddDocumentProcessing(documentProcessing => documentProcessing
.AddEntityCoreStores()
.AddOpenXml()
.AddPdf()
.AddWord()
.AddReferenceDownloads())
.AddOpenAI())
.AddEntityCoreSqliteDataStore("Data Source=app.db"));
var app = builder.Build();
app.AddDownloadAIDocumentEndpoint();
app.AddDownloadAIDocumentFigureEndpoint();
app.AddUploadChatInteractionDocumentEndpoint();
app.AddRemoveChatInteractionDocumentEndpoint();
app.AddUploadChatSessionDocumentEndpoint();
app.AddRemoveChatSessionDocumentEndpoint();
AddYesSqlStores() instead of AddEntityCoreStores() on the document-processing builder for YesSql hosts. Both register the document, chunk and data source stores.AddReferenceDownloads() registers the citation link resolvers (DocumentAIReferenceLinkResolver and the File data source FileReferenceLinkResolver).CrestApps.Core.AI.Documents.Endpoints.| Endpoint extension | Route |
|---|---|
AddDownloadAIDocumentEndpoint() | GET ai/documents/{documentId}/download |
AddDownloadAIDocumentFigureEndpoint() | GET ai/documents/{documentId}/figures/{figureId} |
AddDownloadKnowledgeFigureEndpoint() | GET ai/knowledge/{dataSourceId}/figures/{canonicalId} |
Download and figure endpoints authorize through the resource-based AIChatDocumentOperations.ManageDocuments requirement (chat interaction, chat session and AI profile documents). Knowledge figures use AIKnowledgeOperations.ViewFigures against the owning AIDataSource. Register an AuthorizationHandler<OperationAuthorizationRequirement, TResource> that grants them.
AddChatApiEndpoints() is internal composition in the MVC and Blazor sample hosts. Custom hosts map the endpoint extensions above directly.
A host that only reads files into a knowledge base registers the ingestion half on its own. None of the upload, tabular or chat tool services come with it.
builder.Services
.AddCoreAIServices()
.AddCoreAIDocumentIngestion(ingestion => ingestion
.AddPlainTextReader()
.AddFigureProcessing()
.AddFigureBackfill()
.AddPdf());
| Builder call | Registers | Leave out when |
|---|---|---|
| always | pipeline, reader resolver, IDocumentFileStore, IImageAnalysisService, IKnowledgeIngestionService, the File source handler | never |
AddPlainTextReader() | .txt, .csv, .md, .json, .xml, .html, .htm, .log, .yaml, .yml | those types never arrive |
AddFigureProcessing() | FigureCaptionProcessor, FigureSalienceProcessor, FigureDescriptionProcessor | you want no vision calls |
AddFigureBackfill() | IFigureDescriptionBackfillService and its hosted job | you schedule backfill yourself |
AddPdf() | PDF reader only (no writer, no agent) | you read no PDFs |
AddDocumentIntelligence(...) | Azure layout reader wrapped in FallbackIngestionDocumentReader | no Azure endpoint |
Office files are read by CrestApps.Core.AI.Documents.OpenXml, which depends on document processing, so a host ingesting .docx, .xlsx or .pptx still registers AddDocumentProcessing(...).AddOpenXml().
Keyed readers resolve to the last registration. When a host uses both chat document processing and file sources, call AddDocumentProcessing() before AddCoreFileSources() so the HTML reader registered by file sources wins .html over the plain-text reader.
builder.Services.AddCoreAIIngestionDocumentReader<RtfIngestionDocumentReader>(".rtf");
builder.Services.AddCoreAIIngestionDocumentProcessor<EmailRedactionProcessor>();
AddCoreAIIngestionDocumentReader<T>(params ExtractorExtension[]) registers a keyed singleton per extension and per inferred media type, and adds the extension to ChatDocumentsOptions. Use new ExtractorExtension(".tsv", embeddable: false, isTabular: true) for tabular formats.AddCoreAIIngestionDocumentProcessor<T>() registers a scoped processor. Processors run in registration order, so register yours before AddDocumentProcessing() to run ahead of the built-in figure processors.using System.Text.RegularExpressions;
using CrestApps.Core.AI.Ingestion;
using Microsoft.Extensions.DataIngestion;
public sealed partial class EmailRedactionProcessor : AIDocumentIngestionProcessor
{
public override Task<IngestionDocument> ProcessAsync(
IngestionDocument document,
DocumentIngestionContext context,
CancellationToken cancellationToken = default)
{
foreach (var section in document.Sections)
{
cancellationToken.ThrowIfCancellationRequested();
foreach (var paragraph in section.Elements.OfType<IngestionDocumentParagraph>())
{
if (!string.IsNullOrEmpty(paragraph.Text))
{
paragraph.Text = EmailPattern().Replace(paragraph.Text, "[email]");
}
}
}
return Task.FromResult(document);
}
[GeneratedRegex(@"[\w.+-]+@[\w-]+\.[\w.]+")]
private static partial Regex EmailPattern();
}
DocumentIngestionContext carries FigureMode, VisionDeploymentName, UtilityDeploymentName, MaxFigureDescriptionsPerDocument (default 25), Language, DescribeFiguresInline and DataSourceId. The single-argument ProcessAsync is sealed and runs with DocumentIngestionContext.Default.
See references/ingestion-pipeline.md for a custom reader, reader resolution, PDF layout analysis, captions, salience, transcription and Azure Document Intelligence.
The framework reads upload settings from InteractionDocumentOptions (the sample hosts map their InteractionDocumentSettings site settings onto it).
builder.Services.Configure<InteractionDocumentOptions>(options =>
{
options.MaxIndexableCharacters = 50000; // 0 means no limit
options.DescribeFiguresInUploads = true; // false keeps figures but skips vision transcription
options.TopN = 3;
options.AllowImageUploads = true;
});
ChatDocumentsOptions lists the allowed, embeddable and tabular extensions, but its Add methods are internal. An extension becomes uploadable by registering a reader for it with AddCoreAIIngestionDocumentReader<T>(...). Use the public members such as MaxVisionImageBytesPerFile, MaxVisionInputBytesPerRequest, AnalyzeImagesAtUpload and the GetAllowedFileExtensions(...) and IsAllowedFileExtension(...) extensions to drive upload UI and server validation.
MaxIndexableCharacters is refused at upload with its measured size and the limit. The measuring pass runs before ingestion with figure description off.DescribeFiguresInUploads maps to FigureProcessingMode.Auto or Off. Description resolves the AIDeploymentSlotNames.Vision slot, never the utility deployment, and does nothing when no vision deployment exists.DocumentsMetadata.MaxIndexableCharacters (int?) and DocumentsMetadata.DescribeFiguresInUploads (bool?), where null means use the site value. AI templates carry the same fields.Uploaded files, figure images and agent workspaces go through IDocumentFileStore (namespace CrestApps.Core.AI.Ingestion). The default is FileSystemFileStore under DocumentFileSystemFileStoreOptions.BasePath. Replace it with your own singleton for blob storage.
builder.Services.AddSingleton<IDocumentFileStore, BlobDocumentFileStore>();
| Tool | Name | Notes |
|---|---|---|
SearchDocumentsTool | search_documents | vector search over attached documents |
ReadDocumentTool | read_document | full text of one document |
GetDocumentMetadataTool | get_document_metadata | metadata, tabular columns, and the figures a document holds |
ViewDocumentFigureTool | view_document_figure | caption, page, link and markdown image for a figure, optional vision question |
InspectImageTool | inspect_image | detailed look at an uploaded image |
GenerateFileTool | generate_file | writes a downloadable file through IGeneratedFileWriter |
The hidden Tabular Data Agent (tabular-data-agent) tools are list_tabular_data, query_tabular_data, preview_tabular_data, execute_tabular_command, fill_empty_tabular_cells, format_tabular_data, export_tabular_data and compare_tabular_data. Worksheets load as separate tables, rollup rows go to a sibling <table>_rollups table, and TabularPreviewOptions caps the SVG preview.
Tool results that implement IAIToolContentProvider reach a chat model as text, while the MCP server keeps the rich content blocks.
CrestApps.Core.AI.Documents.Pdf no longer uses PDFsharp or MigraDoc; it is built on PdfPig. AddPdf() on the document-processing builder still registers the reader and writer. See crestapps-core-document-agents for the tool-level notes.using directives for types that moved to CrestApps.Core.AI.Ingestion: IDocumentFileStore, FileSystemFileStore, DocumentFileSystemFileStoreOptions, IImageAnalysisService, ChatDocumentsOptions and ExtractorExtension. AddCoreAIIngestionDocumentReader<T> also moved there from CrestApps.Core.AI.Documents.CrestApps.Core.AI.Documents.Pdf to CrestApps.Core.AI.Ingestion.Pdf. AddPdf() on the document-processing builder still registers reader and writer.DefaultAIDocumentProcessingService now takes IAIDocumentIngestionPipeline and IDocumentFileStore. Replace any custom subclass constructor accordingly.AIDocumentIngestionProcessor to receive DocumentIngestionContext.Purpose is gone. Vision transcription resolves the vision slot and needs a deployment that declares image input.What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-core:crestapps-core-document-processingfrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs./crestapps-core-ai-agentsSkill for AI agents in CrestApps.Core 2.0, specialized AIProfile records of type Agent that the primary model invokes as tools. Covers creating agent profiles with AgentMetadata availability (OnDemand or AlwaysAvailable), linking them with AgentInvocationMetadata, how AgentProxyTool runs an agent with tools disabled or through the orchestrator when AllowToolInvocation is set, the AgentInvocationDepth recursion guard, never offering an agent to itself (RunningAgentName), tools of an agent that require an approval and pause the agent, deployment inheritance and the chat slot, code-defined and system agents through IAIProfileProvider including the Tabular Data, PDF, Presentation and Word agents, chat-specific agents that read AIInvocationScope, exposing agents to MCP clients with McpServerOptions Agents and ExposeAllAgents, and SubAgent usage labels. Use it when delegating work to sub-agents, adding a framework-managed agent, publishing an agent over MCP, or troubleshooting an agent the model does not call./crestapps-core-ai-markdownSkill 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./crestapps-core-ai-memorySkill for AI memory in CrestApps.Core. Covers AddAIMemory, AddCoreAIMemory and AddCoreAIMemoryIndexing, Entity Framework Core and YesSql memory stores, the AIMemory index profile on the Elasticsearch, Azure AI Search and PostgreSQL backends, AIMemoryOptions, the store fallback when no index is usable, background memory indexing, the three kinds of memory (session memory with AIConversationMemory summaries and search_conversation, past conversations with search_past_conversations and list_recent_conversations, durable user memory) switched by MemoryMetadata and ChatInteractionMemoryOptions, preemptive memory retrieval and RunsWhenPreemptiveRagIsDisabled, owner-only chat sessions, the user memory tools, IAIMemorySafetyService validation, and custom IMemoryVectorSearchService implementations./crestapps-core-ai-model-capabilitiesSkill for metadata-driven deployment capabilities in CrestApps.Core 2.0. Covers trained model features such as textGeneration, toolCalling, streaming, reasoning, realtime, textEmbedding, speechToText and textToSpeech, model parameters such as reasoningEffort, declaring them with AIDeploymentMetadata or the Features and Parameters configuration shorthand for Azure App Service settings, registering custom features, parameters and slots with AddAIDeploymentFeature, AddAIDeploymentParameter, AddAIDeploymentSlot and AIDeploymentCapabilityOptions, IAIDeploymentCapabilityService, deployment slots and their resolution chain, AIDeploymentParametersMetadata chat and utility values, IAIDeploymentParameterBinder, UseModelParameters, capability enforcement, the ChatApi Responses routing for reasoning with tools, capability-aware chat UIs, and migrating from AIDeploymentPurpose. Use it when declaring what a model supports, adding a new knob, or fixing stripped tools, missing pickers, or reasoning-effort errors.Other plugins' skills for the same job